diff options
author | Kir Kolyshkin <kolyshkin@gmail.com> | 2022-09-13 15:13:09 -0700 |
---|---|---|
committer | Kir Kolyshkin <kolyshkin@gmail.com> | 2022-09-13 16:26:26 -0700 |
commit | 75740be39541296d379e34902e11ba49e96a1867 (patch) | |
tree | 9b4a5a807803d399787d0466221f25dab6240064 /test/e2e/network_create_test.go | |
parent | c64388728f5efec2658cf9097dbe15126f30753e (diff) | |
download | podman-75740be39541296d379e34902e11ba49e96a1867.tar.gz podman-75740be39541296d379e34902e11ba49e96a1867.tar.bz2 podman-75740be39541296d379e34902e11ba49e96a1867.zip |
all: stop using deprecated GenerateNonCryptoID
In view of https://github.com/containers/storage/pull/1337, do this:
for f in $(git grep -l stringid.GenerateNonCryptoID | grep -v '^vendor/'); do
sed -i 's/stringid.GenerateNonCryptoID/stringid.GenerateRandomID/g' $f;
done
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Diffstat (limited to 'test/e2e/network_create_test.go')
-rw-r--r-- | test/e2e/network_create_test.go | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/test/e2e/network_create_test.go b/test/e2e/network_create_test.go index 69966b07e..f7855581b 100644 --- a/test/e2e/network_create_test.go +++ b/test/e2e/network_create_test.go @@ -41,7 +41,7 @@ var _ = Describe("Podman network create", func() { }) It("podman network create with name and subnet", func() { - netName := "subnet-" + stringid.GenerateNonCryptoID() + netName := "subnet-" + stringid.GenerateRandomID() nc := podmanTest.Podman([]string{"network", "create", "--subnet", "10.11.12.0/24", "--ip-range", "10.11.12.0/26", netName}) nc.WaitWithDefaultTimeout() defer podmanTest.removeNetwork(netName) @@ -84,7 +84,7 @@ var _ = Describe("Podman network create", func() { }) It("podman network create with name and IPv6 subnet", func() { - netName := "ipv6-" + stringid.GenerateNonCryptoID() + netName := "ipv6-" + stringid.GenerateRandomID() nc := podmanTest.Podman([]string{"network", "create", "--subnet", "fd00:1:2:3:4::/64", netName}) nc.WaitWithDefaultTimeout() defer podmanTest.removeNetwork(netName) @@ -123,7 +123,7 @@ var _ = Describe("Podman network create", func() { }) It("podman network create with name and IPv6 flag (dual-stack)", func() { - netName := "dual-" + stringid.GenerateNonCryptoID() + netName := "dual-" + stringid.GenerateRandomID() nc := podmanTest.Podman([]string{"network", "create", "--subnet", "fd00:4:3:2::/64", "--ipv6", netName}) nc.WaitWithDefaultTimeout() defer podmanTest.removeNetwork(netName) @@ -156,7 +156,7 @@ var _ = Describe("Podman network create", func() { // create a second network to check the auto assigned ipv4 subnet does not overlap // https://github.com/containers/podman/issues/11032 - netName2 := "dual-" + stringid.GenerateNonCryptoID() + netName2 := "dual-" + stringid.GenerateRandomID() nc = podmanTest.Podman([]string{"network", "create", "--subnet", "fd00:10:3:2::/64", "--ipv6", netName2}) nc.WaitWithDefaultTimeout() defer podmanTest.removeNetwork(netName2) @@ -204,13 +204,13 @@ var _ = Describe("Podman network create", func() { }) It("podman network create with invalid subnet", func() { - nc := podmanTest.Podman([]string{"network", "create", "--subnet", "10.11.12.0/17000", stringid.GenerateNonCryptoID()}) + nc := podmanTest.Podman([]string{"network", "create", "--subnet", "10.11.12.0/17000", stringid.GenerateRandomID()}) nc.WaitWithDefaultTimeout() Expect(nc).To(ExitWithError()) }) It("podman network create with ipv4 subnet and ipv6 flag", func() { - name := stringid.GenerateNonCryptoID() + name := stringid.GenerateRandomID() nc := podmanTest.Podman([]string{"network", "create", "--subnet", "10.11.12.0/24", "--ipv6", name}) nc.WaitWithDefaultTimeout() Expect(nc).To(Exit(0)) @@ -224,7 +224,7 @@ var _ = Describe("Podman network create", func() { }) It("podman network create with empty subnet and ipv6 flag", func() { - name := stringid.GenerateNonCryptoID() + name := stringid.GenerateRandomID() nc := podmanTest.Podman([]string{"network", "create", "--ipv6", name}) nc.WaitWithDefaultTimeout() Expect(nc).To(Exit(0)) @@ -238,19 +238,19 @@ var _ = Describe("Podman network create", func() { }) It("podman network create with invalid IP", func() { - nc := podmanTest.Podman([]string{"network", "create", "--subnet", "10.11.0/17000", stringid.GenerateNonCryptoID()}) + nc := podmanTest.Podman([]string{"network", "create", "--subnet", "10.11.0/17000", stringid.GenerateRandomID()}) nc.WaitWithDefaultTimeout() Expect(nc).To(ExitWithError()) }) It("podman network create with invalid gateway for subnet", func() { - nc := podmanTest.Podman([]string{"network", "create", "--subnet", "10.11.12.0/24", "--gateway", "192.168.1.1", stringid.GenerateNonCryptoID()}) + nc := podmanTest.Podman([]string{"network", "create", "--subnet", "10.11.12.0/24", "--gateway", "192.168.1.1", stringid.GenerateRandomID()}) nc.WaitWithDefaultTimeout() Expect(nc).To(ExitWithError()) }) It("podman network create two networks with same name should fail", func() { - netName := "same-" + stringid.GenerateNonCryptoID() + netName := "same-" + stringid.GenerateRandomID() nc := podmanTest.Podman([]string{"network", "create", netName}) nc.WaitWithDefaultTimeout() defer podmanTest.removeNetwork(netName) @@ -262,13 +262,13 @@ var _ = Describe("Podman network create", func() { }) It("podman network create two networks with same subnet should fail", func() { - netName1 := "sub1-" + stringid.GenerateNonCryptoID() + netName1 := "sub1-" + stringid.GenerateRandomID() nc := podmanTest.Podman([]string{"network", "create", "--subnet", "10.11.13.0/24", netName1}) nc.WaitWithDefaultTimeout() defer podmanTest.removeNetwork(netName1) Expect(nc).Should(Exit(0)) - netName2 := "sub2-" + stringid.GenerateNonCryptoID() + netName2 := "sub2-" + stringid.GenerateRandomID() ncFail := podmanTest.Podman([]string{"network", "create", "--subnet", "10.11.13.0/24", netName2}) ncFail.WaitWithDefaultTimeout() defer podmanTest.removeNetwork(netName2) @@ -276,13 +276,13 @@ var _ = Describe("Podman network create", func() { }) It("podman network create two IPv6 networks with same subnet should fail", func() { - netName1 := "subipv61-" + stringid.GenerateNonCryptoID() + netName1 := "subipv61-" + stringid.GenerateRandomID() nc := podmanTest.Podman([]string{"network", "create", "--subnet", "fd00:4:4:4:4::/64", "--ipv6", netName1}) nc.WaitWithDefaultTimeout() defer podmanTest.removeNetwork(netName1) Expect(nc).Should(Exit(0)) - netName2 := "subipv62-" + stringid.GenerateNonCryptoID() + netName2 := "subipv62-" + stringid.GenerateRandomID() ncFail := podmanTest.Podman([]string{"network", "create", "--subnet", "fd00:4:4:4:4::/64", "--ipv6", netName2}) ncFail.WaitWithDefaultTimeout() defer podmanTest.removeNetwork(netName2) @@ -296,7 +296,7 @@ var _ = Describe("Podman network create", func() { }) It("podman network create with mtu option", func() { - net := "mtu-test" + stringid.GenerateNonCryptoID() + net := "mtu-test" + stringid.GenerateRandomID() nc := podmanTest.Podman([]string{"network", "create", "--opt", "mtu=9000", net}) nc.WaitWithDefaultTimeout() defer podmanTest.removeNetwork(net) @@ -309,7 +309,7 @@ var _ = Describe("Podman network create", func() { }) It("podman network create with vlan option", func() { - net := "vlan-test" + stringid.GenerateNonCryptoID() + net := "vlan-test" + stringid.GenerateRandomID() nc := podmanTest.Podman([]string{"network", "create", "--opt", "vlan=9", net}) nc.WaitWithDefaultTimeout() defer podmanTest.removeNetwork(net) @@ -322,7 +322,7 @@ var _ = Describe("Podman network create", func() { }) It("podman network create with invalid option", func() { - net := "invalid-test" + stringid.GenerateNonCryptoID() + net := "invalid-test" + stringid.GenerateRandomID() nc := podmanTest.Podman([]string{"network", "create", "--opt", "foo=bar", net}) nc.WaitWithDefaultTimeout() defer podmanTest.removeNetwork(net) @@ -331,7 +331,7 @@ var _ = Describe("Podman network create", func() { It("podman CNI network create with internal should not have dnsname", func() { SkipIfNetavark(podmanTest) - net := "internal-test" + stringid.GenerateNonCryptoID() + net := "internal-test" + stringid.GenerateRandomID() nc := podmanTest.Podman([]string{"network", "create", "--internal", net}) nc.WaitWithDefaultTimeout() defer podmanTest.removeNetwork(net) @@ -349,7 +349,7 @@ var _ = Describe("Podman network create", func() { It("podman Netavark network create with internal should have dnsname", func() { SkipIfCNI(podmanTest) - net := "internal-test" + stringid.GenerateNonCryptoID() + net := "internal-test" + stringid.GenerateRandomID() nc := podmanTest.Podman([]string{"network", "create", "--internal", net}) nc.WaitWithDefaultTimeout() defer podmanTest.removeNetwork(net) @@ -375,7 +375,7 @@ var _ = Describe("Podman network create", func() { }) It("podman network create with multiple subnets", func() { - name := "subnets-" + stringid.GenerateNonCryptoID() + name := "subnets-" + stringid.GenerateRandomID() subnet1 := "10.10.0.0/24" subnet2 := "10.10.1.0/24" nc := podmanTest.Podman([]string{"network", "create", "--subnet", subnet1, "--subnet", subnet2, name}) @@ -393,7 +393,7 @@ var _ = Describe("Podman network create", func() { }) It("podman network create with multiple subnets dual stack", func() { - name := "subnets-" + stringid.GenerateNonCryptoID() + name := "subnets-" + stringid.GenerateRandomID() subnet1 := "10.10.2.0/24" subnet2 := "fd52:2a5a:747e:3acd::/64" nc := podmanTest.Podman([]string{"network", "create", "--subnet", subnet1, "--subnet", subnet2, name}) @@ -411,7 +411,7 @@ var _ = Describe("Podman network create", func() { }) It("podman network create with multiple subnets dual stack with gateway and range", func() { - name := "subnets-" + stringid.GenerateNonCryptoID() + name := "subnets-" + stringid.GenerateRandomID() subnet1 := "10.10.3.0/24" gw1 := "10.10.3.10" range1 := "10.10.3.0/26" @@ -436,7 +436,7 @@ var _ = Describe("Podman network create", func() { }) It("podman network create invalid options with multiple subnets", func() { - name := "subnets-" + stringid.GenerateNonCryptoID() + name := "subnets-" + stringid.GenerateRandomID() subnet1 := "10.10.3.0/24" gw1 := "10.10.3.10" gw2 := "fd52:2a5a:747e:3acf::10" |