mirror of
https://github.com/containers/podman.git
synced 2025-06-21 01:19:15 +08:00
add provided cni networks to spec gen
enable final integration tests for networking. Signed-off-by: baude <bbaude@redhat.com>
This commit is contained in:
@ -400,6 +400,7 @@ func FillOutSpecGen(s *specgen.SpecGenerator, c *ContainerCLIOpts, args []string
|
|||||||
}
|
}
|
||||||
s.ShmSize = &shmSize
|
s.ShmSize = &shmSize
|
||||||
}
|
}
|
||||||
|
s.CNINetworks = c.Net.CNINetworks
|
||||||
s.HostAdd = c.Net.AddHosts
|
s.HostAdd = c.Net.AddHosts
|
||||||
s.UseImageResolvConf = c.Net.UseImageResolvConf
|
s.UseImageResolvConf = c.Net.UseImageResolvConf
|
||||||
s.DNSServers = c.Net.DNSServers
|
s.DNSServers = c.Net.DNSServers
|
||||||
|
@ -140,7 +140,6 @@ var _ = Describe("Podman network create", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
It("podman network create with name and subnet", func() {
|
It("podman network create with name and subnet", func() {
|
||||||
Skip(v2fail)
|
|
||||||
var (
|
var (
|
||||||
results []network.NcList
|
results []network.NcList
|
||||||
)
|
)
|
||||||
|
@ -34,6 +34,7 @@ var _ = Describe("Podman network", func() {
|
|||||||
)
|
)
|
||||||
|
|
||||||
BeforeEach(func() {
|
BeforeEach(func() {
|
||||||
|
SkipIfRootless()
|
||||||
tempdir, err = CreateTempDirInTempDir()
|
tempdir, err = CreateTempDirInTempDir()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
@ -79,7 +80,6 @@ var _ = Describe("Podman network", func() {
|
|||||||
)
|
)
|
||||||
|
|
||||||
It("podman network list", func() {
|
It("podman network list", func() {
|
||||||
SkipIfRootless()
|
|
||||||
// Setup, use uuid to prevent conflict with other tests
|
// Setup, use uuid to prevent conflict with other tests
|
||||||
uuid := stringid.GenerateNonCryptoID()
|
uuid := stringid.GenerateNonCryptoID()
|
||||||
secondPath := filepath.Join(cniPath, fmt.Sprintf("%s.conflist", uuid))
|
secondPath := filepath.Join(cniPath, fmt.Sprintf("%s.conflist", uuid))
|
||||||
@ -93,7 +93,6 @@ var _ = Describe("Podman network", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
It("podman network list -q", func() {
|
It("podman network list -q", func() {
|
||||||
SkipIfRootless()
|
|
||||||
// Setup, use uuid to prevent conflict with other tests
|
// Setup, use uuid to prevent conflict with other tests
|
||||||
uuid := stringid.GenerateNonCryptoID()
|
uuid := stringid.GenerateNonCryptoID()
|
||||||
secondPath := filepath.Join(cniPath, fmt.Sprintf("%s.conflist", uuid))
|
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() {
|
It("podman network rm no args", func() {
|
||||||
SkipIfRootless()
|
|
||||||
session := podmanTest.Podman([]string{"network", "rm"})
|
session := podmanTest.Podman([]string{"network", "rm"})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session.ExitCode()).ToNot(BeZero())
|
Expect(session.ExitCode()).ToNot(BeZero())
|
||||||
})
|
})
|
||||||
|
|
||||||
It("podman network rm", func() {
|
It("podman network rm", func() {
|
||||||
SkipIfRootless()
|
|
||||||
// Setup, use uuid to prevent conflict with other tests
|
// Setup, use uuid to prevent conflict with other tests
|
||||||
uuid := stringid.GenerateNonCryptoID()
|
uuid := stringid.GenerateNonCryptoID()
|
||||||
secondPath := filepath.Join(cniPath, fmt.Sprintf("%s.conflist", uuid))
|
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() {
|
It("podman network inspect no args", func() {
|
||||||
SkipIfRootless()
|
|
||||||
session := podmanTest.Podman([]string{"network", "inspect"})
|
session := podmanTest.Podman([]string{"network", "inspect"})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session.ExitCode()).ToNot(BeZero())
|
Expect(session.ExitCode()).ToNot(BeZero())
|
||||||
})
|
})
|
||||||
|
|
||||||
It("podman network inspect", func() {
|
It("podman network inspect", func() {
|
||||||
SkipIfRootless()
|
|
||||||
// Setup, use uuid to prevent conflict with other tests
|
// Setup, use uuid to prevent conflict with other tests
|
||||||
uuid := stringid.GenerateNonCryptoID()
|
uuid := stringid.GenerateNonCryptoID()
|
||||||
secondPath := filepath.Join(cniPath, fmt.Sprintf("%s.conflist", uuid))
|
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() {
|
It("podman inspect container single CNI network", func() {
|
||||||
Skip(v2fail)
|
|
||||||
SkipIfRootless()
|
|
||||||
netName := "testNetSingleCNI"
|
netName := "testNetSingleCNI"
|
||||||
network := podmanTest.Podman([]string{"network", "create", "--subnet", "10.50.50.0/24", netName})
|
network := podmanTest.Podman([]string{"network", "create", "--subnet", "10.50.50.0/24", netName})
|
||||||
network.WaitWithDefaultTimeout()
|
network.WaitWithDefaultTimeout()
|
||||||
@ -190,8 +183,6 @@ var _ = Describe("Podman network", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
It("podman inspect container two CNI networks", func() {
|
It("podman inspect container two CNI networks", func() {
|
||||||
Skip(v2fail)
|
|
||||||
SkipIfRootless()
|
|
||||||
netName1 := "testNetTwoCNI1"
|
netName1 := "testNetTwoCNI1"
|
||||||
network1 := podmanTest.Podman([]string{"network", "create", "--subnet", "10.50.51.0/25", netName1})
|
network1 := podmanTest.Podman([]string{"network", "create", "--subnet", "10.50.51.0/25", netName1})
|
||||||
network1.WaitWithDefaultTimeout()
|
network1.WaitWithDefaultTimeout()
|
||||||
|
Reference in New Issue
Block a user