mirror of
https://github.com/containers/podman.git
synced 2025-06-20 00:51:16 +08:00
make network name uniq for dnsname tests
ed identified that the dnsname integration test does not use a unique name and therefore cannot be cleaned up. this was made worse by a improper defer statement to remove the network should the test fail. Signed-off-by: baude <bbaude@redhat.com>
This commit is contained in:
@ -6,6 +6,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
. "github.com/containers/podman/v2/test/utils"
|
. "github.com/containers/podman/v2/test/utils"
|
||||||
|
"github.com/containers/storage/pkg/stringid"
|
||||||
. "github.com/onsi/ginkgo"
|
. "github.com/onsi/ginkgo"
|
||||||
. "github.com/onsi/gomega"
|
. "github.com/onsi/gomega"
|
||||||
"github.com/uber/jaeger-client-go/utils"
|
"github.com/uber/jaeger-client-go/utils"
|
||||||
@ -601,11 +602,11 @@ var _ = Describe("Podman run networking", func() {
|
|||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session.ExitCode()).To(BeZero())
|
Expect(session.ExitCode()).To(BeZero())
|
||||||
|
|
||||||
net := "dnsNetTest"
|
net := "IntTest" + stringid.GenerateNonCryptoID()
|
||||||
session = podmanTest.Podman([]string{"network", "create", net})
|
session = podmanTest.Podman([]string{"network", "create", net})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session.ExitCode()).To(BeZero())
|
|
||||||
defer podmanTest.removeCNINetwork(net)
|
defer podmanTest.removeCNINetwork(net)
|
||||||
|
Expect(session.ExitCode()).To(BeZero())
|
||||||
|
|
||||||
pod2 := "testpod2"
|
pod2 := "testpod2"
|
||||||
session = podmanTest.Podman([]string{"pod", "create", "--network", net, "--name", pod2})
|
session = podmanTest.Podman([]string{"pod", "create", "--network", net, "--name", pod2})
|
||||||
|
Reference in New Issue
Block a user