test: add Ginkgo-based integration test framework for vpp-manager component#840
test: add Ginkgo-based integration test framework for vpp-manager component#840
Conversation
fd955e4 to
cec41af
Compare
| } | ||
|
|
||
| // ConfigureUplink configures a TAP interface as uplink with the specified configuration | ||
| func (v *VppInstance) ConfigureUplink(config *UplinkConfig) (uint32, error) { |
There was a problem hiding this comment.
Maybe we could call vpp_runner.go:configureVppUplinkInterface() directly instead of having a custom logic for tests
There was a problem hiding this comment.
Ran into some issues while trying to test VppRunner.configureVppUplinkInterface() directly.
It creates a TAP with HostNamespace:"pid:1" that requires access to the host's PID 1 network namespace. In a Docker container, pid:1 refers to the container's init process, not the host, causing the Linux-side tap setup to fail.
For now, I have added a very basic uplink interface test that only verifies the VPP-side operations performed in configureVppUplinkInterface() - (i) VRF allocation (via allocateStaticVRFs()) (ii) Interface address configuration (via AddInterfaceAddress()) (iii) Interface state management (via InterfaceAdminUp())
Need to discuss how we can test the entire VppRunner.configureVppUplinkInterface() functionality using this framework, maybe handle it as a part of a separate task/PR?
2bbd152 to
6517f90
Compare
6517f90 to
7ee666a
Compare
Signed-off-by: Aritra Basu <aritrbas@cisco.com>
7ee666a to
8218c12
Compare
Summary
This PR introduces Ginkgo based tests for
vpp-managercomponent.Architecture
Environment Variables
VPP_IMAGEVPP_BINARY/usr/bin/vppTest Structure
Test Coverage
VppRunner.allocateStaticVRFspunt-tableandcalico-podsVRFs are created for IPv4/IPv6VppRunner.AllocatePhysicalNetworkVRFsconfig.InforegistrationVPP Configurationuplink Interfaceuplinkinterface addresses and VRFs configurationTAP InterfaceTAPinterface creationAF_PACKET InterfaceAF_PACKETinterface creation onvethpairsmemif Interfacememifinterface creationRunning Tests
make testThe tests are integrated into the main
make testtarget:go test