summaryrefslogtreecommitdiffstats
path: root/extras/hs-test/vppinstance.go
diff options
context:
space:
mode:
authorMaros Ondrejicka <mondreji@cisco.com>2023-02-27 13:22:45 +0100
committerFlorin Coras <florin.coras@gmail.com>2023-02-28 18:27:17 +0000
commitc2f76f4590f57729d1bcf03bd816c10991431b18 (patch)
tree9ab0273c87c3f5ba21cf0ee8277f60f73e95f762 /extras/hs-test/vppinstance.go
parentb0116a13dcc631d5128209dec867c3fb5209629d (diff)
hs-test: test vpp+nginx mirroring with tap ifaces
Type: test Signed-off-by: Maros Ondrejicka <mondreji@cisco.com> Change-Id: I05bbed8fd9d40929f040574044aed5292a475e91
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,