integration test: fix network backend option with remote
I honestly do not understand all this extra option parsing here but there is really no reason to exclude the option for remote, all the other global options are also set there. This fixes a problem with mixed cni/netavark use because the option was unset. Fixes #15017 Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
parent
99bf6f96cd
commit
290116bf81
|
|
@ -856,12 +856,8 @@ func (p *PodmanTestIntegration) makeOptions(args []string, noEvents, noCache boo
|
||||||
eventsType = "none"
|
eventsType = "none"
|
||||||
}
|
}
|
||||||
|
|
||||||
podmanOptions := strings.Split(fmt.Sprintf("%s--root %s --runroot %s --runtime %s --conmon %s --network-config-dir %s --cgroup-manager %s --tmpdir %s --events-backend %s",
|
podmanOptions := strings.Split(fmt.Sprintf("%s--root %s --runroot %s --runtime %s --conmon %s --network-config-dir %s --network-backend %s --cgroup-manager %s --tmpdir %s --events-backend %s",
|
||||||
debug, p.Root, p.RunRoot, p.OCIRuntime, p.ConmonBinary, p.NetworkConfigDir, p.CgroupManager, p.TmpDir, eventsType), " ")
|
debug, p.Root, p.RunRoot, p.OCIRuntime, p.ConmonBinary, p.NetworkConfigDir, p.NetworkBackend.ToString(), p.CgroupManager, p.TmpDir, eventsType), " ")
|
||||||
|
|
||||||
if !p.RemoteTest {
|
|
||||||
podmanOptions = append(podmanOptions, "--network-backend", p.NetworkBackend.ToString())
|
|
||||||
}
|
|
||||||
|
|
||||||
podmanOptions = append(podmanOptions, strings.Split(p.StorageOptions, " ")...)
|
podmanOptions = append(podmanOptions, strings.Split(p.StorageOptions, " ")...)
|
||||||
if !noCache {
|
if !noCache {
|
||||||
|
|
|
||||||
|
|
@ -136,11 +136,8 @@ func (p *PodmanTestIntegration) StopRemoteService() {
|
||||||
// MakeOptions assembles all the podman main options
|
// MakeOptions assembles all the podman main options
|
||||||
func getRemoteOptions(p *PodmanTestIntegration, args []string) []string {
|
func getRemoteOptions(p *PodmanTestIntegration, args []string) []string {
|
||||||
networkDir := p.NetworkConfigDir
|
networkDir := p.NetworkConfigDir
|
||||||
podmanOptions := strings.Split(fmt.Sprintf("--root %s --runroot %s --runtime %s --conmon %s --network-config-dir %s --cgroup-manager %s",
|
podmanOptions := strings.Split(fmt.Sprintf("--root %s --runroot %s --runtime %s --conmon %s --network-config-dir %s --network-backend %s --cgroup-manager %s",
|
||||||
p.Root, p.RunRoot, p.OCIRuntime, p.ConmonBinary, networkDir, p.CgroupManager), " ")
|
p.Root, p.RunRoot, p.OCIRuntime, p.ConmonBinary, networkDir, p.NetworkBackend.ToString(), p.CgroupManager), " ")
|
||||||
if p.NetworkBackend.ToString() == "netavark" {
|
|
||||||
podmanOptions = append(podmanOptions, "--network-backend", "netavark")
|
|
||||||
}
|
|
||||||
podmanOptions = append(podmanOptions, strings.Split(p.StorageOptions, " ")...)
|
podmanOptions = append(podmanOptions, strings.Split(p.StorageOptions, " ")...)
|
||||||
podmanOptions = append(podmanOptions, args...)
|
podmanOptions = append(podmanOptions, args...)
|
||||||
return podmanOptions
|
return podmanOptions
|
||||||
|
|
|
||||||
|
|
@ -293,9 +293,6 @@ var _ = Describe("Podman manifest", func() {
|
||||||
})
|
})
|
||||||
|
|
||||||
It("authenticated push", func() {
|
It("authenticated push", func() {
|
||||||
if podmanTest.Host.Distribution == "ubuntu" && IsRemote() {
|
|
||||||
Skip("FIXME: #15017. Registry times out.")
|
|
||||||
}
|
|
||||||
registryOptions := &podmanRegistry.Options{
|
registryOptions := &podmanRegistry.Options{
|
||||||
Image: "docker-archive:" + imageTarPath(REGISTRY_IMAGE),
|
Image: "docker-archive:" + imageTarPath(REGISTRY_IMAGE),
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -110,9 +110,6 @@ func (p *PodmanTest) PodmanAsUserBase(args []string, uid, gid uint32, cwd string
|
||||||
}
|
}
|
||||||
runCmd := wrapper
|
runCmd := wrapper
|
||||||
runCmd = append(runCmd, podmanBinary)
|
runCmd = append(runCmd, podmanBinary)
|
||||||
if !p.RemoteTest && p.NetworkBackend == Netavark {
|
|
||||||
runCmd = append(runCmd, []string{"--network-backend", "netavark"}...)
|
|
||||||
}
|
|
||||||
|
|
||||||
if env == nil {
|
if env == nil {
|
||||||
fmt.Printf("Running: %s %s\n", strings.Join(runCmd, " "), strings.Join(podmanOptions, " "))
|
fmt.Printf("Running: %s %s\n", strings.Join(runCmd, " "), strings.Join(podmanOptions, " "))
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue