summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2020-05-01 09:14:27 -0500
committerbaude <bbaude@redhat.com>2020-05-01 09:20:52 -0500
commit98e71583a4e7a0bf1f4a00fcab8bafa4915eb14a (patch)
treeb7caa4844678401b3947878ad0800d870dd1fcf4
parente88a418528173c1bccc9bea6a9eaf3b389d57e47 (diff)
downloadpodman-98e71583a4e7a0bf1f4a00fcab8bafa4915eb14a.tar.gz
podman-98e71583a4e7a0bf1f4a00fcab8bafa4915eb14a.tar.bz2
podman-98e71583a4e7a0bf1f4a00fcab8bafa4915eb14a.zip
add provided cni networks to spec gen
enable final integration tests for networking. Signed-off-by: baude <bbaude@redhat.com>
-rw-r--r--cmd/podman/common/specgen.go1
-rw-r--r--test/e2e/network_create_test.go1
-rw-r--r--test/e2e/network_test.go11
3 files changed, 2 insertions, 11 deletions
diff --git a/cmd/podman/common/specgen.go b/cmd/podman/common/specgen.go
index 96cd630a3..07936dfed 100644
--- a/cmd/podman/common/specgen.go
+++ b/cmd/podman/common/specgen.go
@@ -400,6 +400,7 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *ContainerCLIOpts, args []string
}
s.ShmSize = &shmSize
}
+ s.CNINetworks = c.Net.CNINetworks
s.HostAdd = c.Net.AddHosts
s.UseImageResolvConf = c.Net.UseImageResolvConf
s.DNSServers = c.Net.DNSServers
diff --git a/test/e2e/network_create_test.go b/test/e2e/network_create_test.go
index a1fdccab6..7eccaa9ab 100644
--- a/test/e2e/network_create_test.go
+++ b/test/e2e/network_create_test.go
@@ -140,7 +140,6 @@ var _ = Describe("Podman network create", func() {
})
It("podman network create with name and subnet", func() {
- Skip(v2fail)
var (
results []network.NcList
)
diff --git a/test/e2e/network_test.go b/test/e2e/network_test.go
index a00d70b36..8d575d7f9 100644
--- a/test/e2e/network_test.go
+++ b/test/e2e/network_test.go
@@ -34,6 +34,7 @@ var _ = Describe("Podman network", func() {
)
BeforeEach(func() {
+ SkipIfRootless()
tempdir, err = CreateTempDirInTempDir()
if err != nil {
os.Exit(1)
@@ -79,7 +80,6 @@ var _ = Describe("Podman network", func() {
)
It("podman network list", func() {
- SkipIfRootless()
// Setup, use uuid to prevent conflict with other tests
uuid := stringid.GenerateNonCryptoID()
secondPath := filepath.Join(cniPath, fmt.Sprintf("%s.conflist", uuid))
@@ -93,7 +93,6 @@ var _ = Describe("Podman network", func() {
})
It("podman network list -q", func() {
- SkipIfRootless()
// Setup, use uuid to prevent conflict with other tests
uuid := stringid.GenerateNonCryptoID()
secondPath := filepath.Join(cniPath, fmt.Sprintf("%s.conflist", uuid))
@@ -107,14 +106,12 @@ var _ = Describe("Podman network", func() {
})
It("podman network rm no args", func() {
- SkipIfRootless()
session := podmanTest.Podman([]string{"network", "rm"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).ToNot(BeZero())
})
It("podman network rm", func() {
- SkipIfRootless()
// Setup, use uuid to prevent conflict with other tests
uuid := stringid.GenerateNonCryptoID()
secondPath := filepath.Join(cniPath, fmt.Sprintf("%s.conflist", uuid))
@@ -137,14 +134,12 @@ var _ = Describe("Podman network", func() {
})
It("podman network inspect no args", func() {
- SkipIfRootless()
session := podmanTest.Podman([]string{"network", "inspect"})
session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).ToNot(BeZero())
})
It("podman network inspect", func() {
- SkipIfRootless()
// Setup, use uuid to prevent conflict with other tests
uuid := stringid.GenerateNonCryptoID()
secondPath := filepath.Join(cniPath, fmt.Sprintf("%s.conflist", uuid))
@@ -158,8 +153,6 @@ var _ = Describe("Podman network", func() {
})
It("podman inspect container single CNI network", func() {
- Skip(v2fail)
- SkipIfRootless()
netName := "testNetSingleCNI"
network := podmanTest.Podman([]string{"network", "create", "--subnet", "10.50.50.0/24", netName})
network.WaitWithDefaultTimeout()
@@ -190,8 +183,6 @@ var _ = Describe("Podman network", func() {
})
It("podman inspect container two CNI networks", func() {
- Skip(v2fail)
- SkipIfRootless()
netName1 := "testNetTwoCNI1"
network1 := podmanTest.Podman([]string{"network", "create", "--subnet", "10.50.51.0/25", netName1})
network1.WaitWithDefaultTimeout()