summaryrefslogtreecommitdiffstats
path: root/extras/hs-test/vppinstance.go
diff options
context:
space:
mode:
Diffstat (limited to 'extras/hs-test/vppinstance.go')
-rw-r--r--extras/hs-test/vppinstance.go13
1 files changed, 9 insertions, 4 deletions
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,