Skip to content

Commit

Permalink
cnf network: fix rdma metrics tests (#225)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaggapa authored Sep 29, 2024
1 parent 0199cc6 commit 6d78e4a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/cnf/core/network/sriov/tests/rdmametrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
"github.com/openshift-kni/eco-goinfra/pkg/mco"
"github.com/openshift-kni/eco-goinfra/pkg/nad"
"github.com/openshift-kni/eco-goinfra/pkg/namespace"
"github.com/openshift-kni/eco-goinfra/pkg/nodes"
"github.com/openshift-kni/eco-goinfra/pkg/pod"
Expand Down Expand Up @@ -322,6 +323,14 @@ func defineAndCreatePod(netName1, netName2 string) *pod.Builder {
})
}

for _, net := range netAnnotations {
Eventually(func() error {
_, err := nad.Pull(APIClient, net.Name, tsparams.TestNamespaceName)

return err
}, 10*time.Second, 1*time.Second).Should(BeNil(), fmt.Sprintf("Failed to pull NAD %s", net.Name))
}

tPod, err := pod.NewBuilder(APIClient, "testpod", tsparams.TestNamespaceName, NetConfig.CnfNetTestContainer).
WithSecondaryNetwork(netAnnotations).
WithPrivilegedFlag().
Expand Down

0 comments on commit 6d78e4a

Please sign in to comment.