From c2f76f4590f57729d1bcf03bd816c10991431b18 Mon Sep 17 00:00:00 2001 From: Maros Ondrejicka Date: Mon, 27 Feb 2023 13:22:45 +0100 Subject: hs-test: test vpp+nginx mirroring with tap ifaces Type: test Signed-off-by: Maros Ondrejicka Change-Id: I05bbed8fd9d40929f040574044aed5292a475e91 --- extras/hs-test/vppinstance.go | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'extras/hs-test/vppinstance.go') diff --git a/extras/hs-test/vppinstance.go b/extras/hs-test/vppinstance.go index 29b86d5adcb..4092d35cfd6 100644 --- a/extras/hs-test/vppinstance.go +++ b/extras/hs-test/vppinstance.go @@ -160,15 +160,16 @@ func (vpp *VppInstance) vppctl(command string, arguments ...any) string { return string(output) } -func (vpp *VppInstance) waitForApp(appName string, timeout int) error { +func (vpp *VppInstance) waitForApp(appName string, timeout int) { for i := 0; i < timeout; i++ { o := vpp.vppctl("show app") if strings.Contains(o, appName) { - return nil + return } time.Sleep(1 * time.Second) } - return fmt.Errorf("timeout while waiting for app '%s'", appName) + vpp.Suite().assertNil(1, "Timeout while waiting for app '%s'", appName) + return } func (vpp *VppInstance) createAfPacket( @@ -253,9 +254,13 @@ func (vpp *VppInstance) addAppNamespace( } func (vpp *VppInstance) createTap( - id uint32, tap *NetInterface, + tapId ...uint32, ) error { + var id uint32 = 1 + if len(tapId) > 0 { + id = tapId[0] + } createTapReq := &tapv2.TapCreateV2{ ID: id, HostIfNameSet: true, -- cgit 1.2.3-korg