Update tests to utilize ginkgo/v2

This commit updates the import of ginkgo to v2 in
all of the tests.

Signed-off-by: liornoy <lnoy@redhat.com>
Co-authored-by: Sascha Grunert <sgrunert@redhat.com>
This commit is contained in:
liornoy
2023-01-18 12:30:11 +02:00
parent 23c2134110
commit 2d1005ec02
73 changed files with 107 additions and 99 deletions

View File

@ -23,7 +23,7 @@ import (
"github.com/containernetworking/plugins/pkg/ns"
"github.com/containernetworking/plugins/pkg/testutils"
"github.com/coreos/go-iptables/iptables"
. "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
@ -36,7 +36,7 @@ var _ = Describe("chain tests", func() {
var testNs ns.NetNS
var cleanup func()
BeforeEach(func() {
beforeEach := func() {
// Save a reference to the original namespace,
// Add a new NS
@ -84,9 +84,10 @@ var _ = Describe("chain tests", func() {
currNs.Set()
}
})
}
It("creates and destroys a chain", func() {
beforeEach()
defer cleanup()
tlChainName := testChain.entryChains[0]
@ -152,6 +153,7 @@ var _ = Describe("chain tests", func() {
})
It("creates chains idempotently", func() {
beforeEach()
defer cleanup()
err := testChain.setup(ipt)
@ -171,6 +173,7 @@ var _ = Describe("chain tests", func() {
})
It("deletes chains idempotently", func() {
beforeEach()
defer cleanup()
err := testChain.setup(ipt)
@ -199,6 +202,7 @@ var _ = Describe("chain tests", func() {
})
It("deletes chains idempotently in parallel", func() {
beforeEach()
defer cleanup()
// number of parallel executions
N := 10