mirror of https://github.com/containers/podman.git
test/e2e: dedup Before/AfterEach nodes
There is no reason to define the same code every time in each file, just use global nodes. This diff should speak for itself. CleanupSecrets()/Volume() no longer call Cleanup() directly, as the global AfterEach node will always call Cleanup() this is no longer necessary. If one AfterEach() node fails it will still run the others. Also always unset the CONTAINERS_CONF env vars. This prevents people from forgetting to unset it. And fix the special CONTAINERS_CONF logic in the system connection tests, we do not want to preserve CONTAINERS_CONF anyway so just remove this logic. Ginkgo orders the BeforeEach and AfterEach nodes. They will be executed from the outer-most defined to inner-most. This means our global BeforeEach is always first. Only then the inner one (in the Describe() function in each file). For AfterEach it is inverted, from the inner to the outer. Also see https://onsi.github.io/ginkgo/#organizing-specs-with-container-nodes Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
parent
493aac69e0
commit
ab29ff2f66
|
@ -4,31 +4,12 @@ import (
|
|||
"syscall"
|
||||
"time"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
)
|
||||
|
||||
var _ = Describe("Podman attach", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
})
|
||||
|
||||
It("podman attach to bogus container", func() {
|
||||
session := podmanTest.Podman([]string{"attach", "foobar"})
|
||||
|
|
|
@ -10,34 +10,12 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/containers/buildah"
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
)
|
||||
|
||||
var _ = Describe("Podman build", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
})
|
||||
|
||||
// Let's first do the most simple build possible to make sure stuff is
|
||||
// happy and then clean up after ourselves to make sure that works too.
|
||||
It("podman build and remove basic alpine", func() {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"strconv"
|
||||
"strings"
|
||||
|
@ -14,21 +13,10 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman checkpoint", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
SkipIfContainerized("FIXME: #15015. All checkpoint tests hang when containerized.")
|
||||
SkipIfRootless("checkpoint not supported in rootless mode")
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
// Check if the runtime implements checkpointing. Currently only
|
||||
// runc's checkpoint/restore implementation is supported.
|
||||
cmd := exec.Command(podmanTest.OCIRuntime, "checkpoint", "--help")
|
||||
|
@ -44,12 +32,6 @@ var _ = Describe("Podman checkpoint", func() {
|
|||
}
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
})
|
||||
|
||||
It("podman checkpoint --create-image with bogus container", func() {
|
||||
checkpointImage := "foobar-checkpoint"
|
||||
session := podmanTest.Podman([]string{"container", "checkpoint", "--create-image", checkpointImage, "foobar"})
|
||||
|
|
|
@ -28,20 +28,11 @@ func getRunString(input []string) []string {
|
|||
}
|
||||
|
||||
var _ = Describe("Podman checkpoint", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
SkipIfRootless("checkpoint not supported in rootless mode")
|
||||
SkipIfContainerized("FIXME: #15015. All checkpoint tests hang when containerized.")
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
// Check if the runtime implements checkpointing. Currently only
|
||||
// runc's checkpoint/restore implementation is supported.
|
||||
cmd := exec.Command(podmanTest.OCIRuntime, "checkpoint", "--help")
|
||||
|
@ -64,13 +55,6 @@ var _ = Describe("Podman checkpoint", func() {
|
|||
}
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman checkpoint bogus container", func() {
|
||||
session := podmanTest.Podman([]string{"container", "checkpoint", "foobar"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
|
|
|
@ -1,36 +1,15 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
)
|
||||
|
||||
var _ = Describe("Podman container cleanup", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
SkipIfRemote("podman container cleanup is not supported in remote")
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman cleanup bogus container", func() {
|
||||
|
|
|
@ -12,25 +12,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman commit", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman commit container", func() {
|
||||
_, ec, _ := podmanTest.RunLsContainer("test1")
|
||||
|
|
|
@ -102,6 +102,29 @@ func TestLibpod(t *testing.T) {
|
|||
RunSpecs(t, "Libpod Suite")
|
||||
}
|
||||
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
|
||||
_ = BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
_ = AfterEach(func() {
|
||||
// First unset CONTAINERS_CONF before doing Cleanup() to prevent
|
||||
// invalid containers.conf files to fail the cleanup.
|
||||
os.Unsetenv("CONTAINERS_CONF")
|
||||
os.Unsetenv("CONTAINERS_CONF_OVERRIDE")
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
})
|
||||
)
|
||||
|
||||
var _ = SynchronizedBeforeSuite(func() []byte {
|
||||
// make cache dir
|
||||
ImageCacheDir = filepath.Join(os.TempDir(), "imagecachedir")
|
||||
|
@ -643,8 +666,6 @@ func (p *PodmanTestIntegration) CleanupVolume() {
|
|||
// Remove all containers
|
||||
session := p.Podman([]string{"volume", "rm", "-fa"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
|
||||
p.Cleanup()
|
||||
Expect(session).To(Exit(0), "command: %v\nstdout: %s\nstderr: %s", session.Command.Args, session.OutputToString(), session.ErrorToString())
|
||||
}
|
||||
|
||||
|
@ -654,8 +675,6 @@ func (p *PodmanTestIntegration) CleanupSecrets() {
|
|||
// Remove all containers
|
||||
session := p.Podman([]string{"secret", "rm", "-a"})
|
||||
session.Wait(90)
|
||||
|
||||
p.Cleanup()
|
||||
Expect(session).To(Exit(0), "command: %v\nstdout: %s\nstderr: %s", session.Command.Args, session.OutputToString(), session.ErrorToString())
|
||||
}
|
||||
|
||||
|
|
|
@ -1,36 +1,14 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
)
|
||||
|
||||
var _ = Describe("Podman container clone", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
SkipIfRemote("podman container clone is not supported in remote")
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman container clone basic test", func() {
|
||||
|
|
|
@ -5,7 +5,6 @@ import (
|
|||
"os"
|
||||
"path/filepath"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
|
@ -69,27 +68,6 @@ func checkDataVolumeContainer(pTest *PodmanTestIntegration, image, cont, dest, d
|
|||
}
|
||||
|
||||
var _ = Describe("Podman create data volume", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
os.Unsetenv("CONTAINERS_CONF")
|
||||
})
|
||||
|
||||
It("podman create with volume data copy turned off", func() {
|
||||
imgName, volData, volDest := "dataimg", "dummy", "/test"
|
||||
|
|
|
@ -1,37 +1,14 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"github.com/containers/podman/v4/libpod/define"
|
||||
"github.com/containers/podman/v4/pkg/annotations"
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
)
|
||||
|
||||
var _ = Describe("Podman container inspect", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
})
|
||||
|
||||
It("podman inspect a container for the container manager annotation", func() {
|
||||
const testContainer = "container-inspect-test-1"
|
||||
|
|
|
@ -16,19 +16,8 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Verify podman containers.conf usage", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
os.Setenv("CONTAINERS_CONF", "config/containers.conf")
|
||||
if IsRemote() {
|
||||
podmanTest.RestartRemoteService()
|
||||
|
@ -36,14 +25,6 @@ var _ = Describe("Verify podman containers.conf usage", func() {
|
|||
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
os.Unsetenv("CONTAINERS_CONF")
|
||||
os.Unsetenv("CONTAINERS_CONF_OVERRIDE")
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
})
|
||||
|
||||
It("limits test", func() {
|
||||
SkipIfRootlessCgroupsV1("Setting limits not supported on cgroupv1 for rootless users")
|
||||
// containers.conf is set to "nofile=500:500"
|
||||
|
|
|
@ -17,27 +17,6 @@ import (
|
|||
// rather than e2e tests. System tests are used in RHEL gating.
|
||||
|
||||
var _ = Describe("Podman cp", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
// Copy a file to the container, then back to the host and make sure
|
||||
// that the contents match.
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
"time"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
|
@ -11,27 +10,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman create with --ip flag", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("Podman create --ip with garbage address", func() {
|
||||
result := podmanTest.Podman([]string{"create", "--name", "test", "--ip", "114232346", ALPINE, "ls"})
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
"github.com/containers/storage/pkg/stringid"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
|
@ -11,27 +8,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman run with --mac-address flag", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("Podman run --mac-address", func() {
|
||||
result := podmanTest.Podman([]string{"run", "--mac-address", "92:d0:c6:0a:29:34", ALPINE, "ip", "addr"})
|
||||
|
|
|
@ -15,25 +15,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman create", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman create container based on a local image", func() {
|
||||
session := podmanTest.Podman([]string{"create", "--name", "local_image_test", ALPINE, "ls"})
|
||||
|
|
|
@ -2,7 +2,6 @@ package integration
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"sort"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
|
@ -13,27 +12,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman diff", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman diff of image", func() {
|
||||
session := podmanTest.Podman([]string{"diff", ALPINE})
|
||||
|
|
|
@ -3,12 +3,10 @@ package integration
|
|||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/containers/podman/v4/libpod/events"
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
"github.com/containers/storage/pkg/stringid"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
|
@ -16,26 +14,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman events", func() {
|
||||
var (
|
||||
tempdir string
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
var err error
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
})
|
||||
|
||||
// For most, all, of these tests we do not "live" test following a log because it may make a fragile test
|
||||
// system more complex. Instead we run the "events" and then verify that the events are processed correctly.
|
||||
|
|
|
@ -13,27 +13,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman exec", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman exec into bogus container", func() {
|
||||
session := podmanTest.Podman([]string{"exec", "foobar", "ls"})
|
||||
|
|
|
@ -1,36 +1,12 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
)
|
||||
|
||||
var _ = Describe("Podman image|container exists", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman image exists in local storage by fq name", func() {
|
||||
session := podmanTest.Podman([]string{"image", "exists", ALPINE})
|
||||
|
|
|
@ -11,27 +11,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman export", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman export output flag", func() {
|
||||
_, ec, cid := podmanTest.RunLsContainer("")
|
||||
|
|
|
@ -19,27 +19,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman kube generate", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman kube generate pod on bogus object", func() {
|
||||
session := podmanTest.Podman([]string{"generate", "kube", "foobar"})
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
|
@ -11,27 +10,9 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman generate spec", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
SkipIfRemote("podman generate spec is not supported on the remote client")
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman generate spec bogus should fail", func() {
|
||||
|
|
|
@ -11,27 +11,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman generate systemd", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman generate systemd on bogus container/pod", func() {
|
||||
session := podmanTest.Podman([]string{"generate", "systemd", "foobar"})
|
||||
|
|
|
@ -14,27 +14,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman healthcheck run", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman healthcheck run bogus container", func() {
|
||||
session := podmanTest.Podman([]string{"healthcheck", "run", "foobar"})
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
|
@ -10,27 +8,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman history", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman history output flag", func() {
|
||||
session := podmanTest.Podman([]string{"history", ALPINE})
|
||||
|
|
|
@ -13,42 +13,8 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("podman image scp", func() {
|
||||
ConfPath := struct {
|
||||
Value string
|
||||
IsSet bool
|
||||
}{}
|
||||
var (
|
||||
tempdir string
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
ConfPath.Value, ConfPath.IsSet = os.LookupEnv("CONTAINERS_CONF")
|
||||
conf, err := os.CreateTemp("", "containersconf")
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
os.Setenv("CONTAINERS_CONF", conf.Name())
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
|
||||
os.Remove(os.Getenv("CONTAINERS_CONF"))
|
||||
if ConfPath.IsSet {
|
||||
os.Setenv("CONTAINERS_CONF", ConfPath.Value)
|
||||
} else {
|
||||
os.Unsetenv("CONTAINERS_CONF")
|
||||
}
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
BeforeEach(setupEmptyContainersConf)
|
||||
|
||||
It("podman image scp bogus image", func() {
|
||||
scp := podmanTest.Podman([]string{"image", "scp", "FOOBAR"})
|
||||
|
|
|
@ -5,28 +5,16 @@ import (
|
|||
"os/exec"
|
||||
"path/filepath"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
)
|
||||
|
||||
var _ = Describe("Podman image sign", func() {
|
||||
var (
|
||||
origGNUPGHOME string
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
var origGNUPGHOME string
|
||||
|
||||
BeforeEach(func() {
|
||||
SkipIfRemote("podman-remote image sign is not supported")
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
tempGNUPGHOME := filepath.Join(podmanTest.TempDir, "tmpGPG")
|
||||
err := os.Mkdir(tempGNUPGHOME, os.ModePerm)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
@ -38,9 +26,6 @@ var _ = Describe("Podman image sign", func() {
|
|||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
os.Setenv("GNUPGHOME", origGNUPGHOME)
|
||||
})
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@ package integration
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"sort"
|
||||
"strings"
|
||||
|
||||
|
@ -14,27 +13,7 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman images", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
It("podman images", func() {
|
||||
session := podmanTest.Podman([]string{"images"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
|
@ -11,27 +10,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman import", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman import with source and reference", func() {
|
||||
outfile := filepath.Join(podmanTest.TempDir, "container.tar")
|
||||
|
|
|
@ -7,33 +7,12 @@ import (
|
|||
"os/user"
|
||||
"path/filepath"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
)
|
||||
|
||||
var _ = Describe("Podman Info", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
})
|
||||
|
||||
It("podman info --format json", func() {
|
||||
tests := []struct {
|
||||
|
|
|
@ -1,36 +1,12 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
)
|
||||
|
||||
var _ = Describe("Podman init", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman init bogus container", func() {
|
||||
session := podmanTest.Podman([]string{"start", "123456"})
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
|
@ -11,27 +9,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman inspect", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman inspect alpine image", func() {
|
||||
session := podmanTest.Podman([]string{"inspect", "--format=json", ALPINE})
|
||||
|
|
|
@ -10,27 +10,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman kill", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman kill bogus container", func() {
|
||||
session := podmanTest.Podman([]string{"kill", "foobar"})
|
||||
|
|
|
@ -2,7 +2,6 @@ package integration
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
|
@ -12,29 +11,11 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman load", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.AddImageToRWStore(ALPINE)
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman load input flag", func() {
|
||||
outfile := filepath.Join(podmanTest.TempDir, "alpine.tar")
|
||||
|
||||
|
|
|
@ -16,9 +16,7 @@ import (
|
|||
|
||||
var _ = Describe("Podman login and logout", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
authPath string
|
||||
certPath string
|
||||
certDirPath string
|
||||
|
@ -28,11 +26,6 @@ var _ = Describe("Podman login and logout", func() {
|
|||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
|
||||
authPath = filepath.Join(podmanTest.TempDir, "auth")
|
||||
err := os.Mkdir(authPath, os.ModePerm)
|
||||
|
@ -98,7 +91,6 @@ var _ = Describe("Podman login and logout", func() {
|
|||
|
||||
AfterEach(func() {
|
||||
os.Unsetenv("REGISTRY_AUTH_FILE")
|
||||
podmanTest.Cleanup()
|
||||
os.RemoveAll(authPath)
|
||||
os.RemoveAll(certDirPath)
|
||||
})
|
||||
|
|
|
@ -2,7 +2,6 @@ package integration
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"os/exec"
|
||||
"time"
|
||||
|
||||
|
@ -24,26 +23,6 @@ func isEventBackendJournald(podmanTest *PodmanTestIntegration) bool {
|
|||
}
|
||||
|
||||
var _ = Describe("Podman logs", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
})
|
||||
|
||||
It("podman logs on not existent container", func() {
|
||||
results := podmanTest.Podman([]string{"logs", "notexist"})
|
||||
|
|
|
@ -16,11 +16,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman manifest", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
const (
|
||||
imageList = "docker://registry.k8s.io/pause:3.1"
|
||||
|
@ -32,20 +27,6 @@ var _ = Describe("Podman manifest", func() {
|
|||
imageListS390XInstanceDigest = "sha256:882a20ee0df7399a445285361d38b711c299ca093af978217112c73803546d5e"
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
})
|
||||
It("create w/o image and attempt push w/o dest", func() {
|
||||
for _, amend := range []string{"--amend", "-a"} {
|
||||
session := podmanTest.Podman([]string{"manifest", "create", "foo"})
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
|
@ -10,28 +8,10 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman mount", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
SkipIfNotRootless("This function is not enabled for rootful podman")
|
||||
SkipIfRemote("Podman mount not supported for remote connections")
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman mount", func() {
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
|
@ -10,31 +8,13 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman mount", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
SkipIfRemote("Podman mount not supported for remote connections")
|
||||
SkipIfRootless("Podman mount requires podman unshare first to work")
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.AddImageToRWStore(ALPINE)
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman mount", func() {
|
||||
setup := podmanTest.Podman([]string{"create", ALPINE, "ls"})
|
||||
setup.WaitWithDefaultTimeout()
|
||||
|
|
|
@ -1,34 +1,12 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
)
|
||||
|
||||
var _ = Describe("Podman negative command-line", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman snuffleupagus exits non-zero", func() {
|
||||
session := podmanTest.Podman([]string{"snuffleupagus"})
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
"github.com/containers/storage/pkg/stringid"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
|
@ -12,27 +10,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman network connect and disconnect", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("bad network name in disconnect should result in error", func() {
|
||||
dis := podmanTest.Podman([]string{"network", "disconnect", "foobar", "test"})
|
||||
|
|
|
@ -3,7 +3,6 @@ package integration
|
|||
import (
|
||||
"encoding/json"
|
||||
"net"
|
||||
"os"
|
||||
|
||||
"github.com/containers/common/libnetwork/types"
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
|
@ -19,26 +18,6 @@ func removeNetworkDevice(name string) {
|
|||
}
|
||||
|
||||
var _ = Describe("Podman network create", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
})
|
||||
|
||||
It("podman network create with name and subnet", func() {
|
||||
netName := "subnet-" + stringid.GenerateRandomID()
|
||||
|
|
|
@ -3,7 +3,6 @@ package integration
|
|||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"time"
|
||||
|
||||
|
@ -16,27 +15,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman network", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman --cni-config-dir backwards compat", func() {
|
||||
SkipIfRemote("--cni-config-dir only works locally")
|
||||
|
|
|
@ -13,21 +13,11 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman pause", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
pausedState := "paused"
|
||||
createdState := "created"
|
||||
|
||||
BeforeEach(func() {
|
||||
SkipIfRootlessCgroupsV1("Pause is not supported in cgroups v1")
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
if CGROUPSV2 {
|
||||
b, err := os.ReadFile("/proc/self/cgroup")
|
||||
|
@ -42,15 +32,6 @@ var _ = Describe("Podman pause", func() {
|
|||
}
|
||||
}
|
||||
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman pause bogus container", func() {
|
||||
|
|
|
@ -16,27 +16,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman play kube with build", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
var testYAML = `
|
||||
apiVersion: v1
|
||||
|
|
|
@ -1854,29 +1854,12 @@ func verifyPodPorts(podmanTest *PodmanTestIntegration, podName string, ports ...
|
|||
}
|
||||
|
||||
var _ = Describe("Podman play kube", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
kubeYaml string
|
||||
)
|
||||
var kubeYaml string
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
kubeYaml = filepath.Join(podmanTest.TempDir, "kube.yaml")
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
})
|
||||
|
||||
It("podman play kube fail with yaml of unsupported kind", func() {
|
||||
err := writeYaml(unknownKindYaml, kubeYaml)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
@ -1966,7 +1949,6 @@ var _ = Describe("Podman play kube", func() {
|
|||
Expect(err).ToNot(HaveOccurred())
|
||||
|
||||
os.Setenv("CONTAINERS_CONF", conffile)
|
||||
defer os.Unsetenv("CONTAINERS_CONF")
|
||||
|
||||
if IsRemote() {
|
||||
podmanTest.RestartRemoteService()
|
||||
|
@ -4105,7 +4087,6 @@ invalid kube kind
|
|||
confPath, err := filepath.Abs("config/containers-netns2.conf")
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
os.Setenv("CONTAINERS_CONF", confPath)
|
||||
defer os.Unsetenv("CONTAINERS_CONF")
|
||||
if IsRemote() {
|
||||
podmanTest.RestartRemoteService()
|
||||
}
|
||||
|
@ -4897,7 +4878,6 @@ ENV OPENJ9_JAVA_OPTIONS=%q
|
|||
ipcns="host"
|
||||
cgroups="disabled"`), 0644)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
defer os.Unsetenv("CONTAINERS_CONF")
|
||||
os.Setenv("CONTAINERS_CONF", conffile)
|
||||
err = writeYaml(simplePodYaml, kubeYaml)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
|
|
@ -3,35 +3,17 @@ package integration
|
|||
import (
|
||||
"os"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
)
|
||||
|
||||
var _ = Describe("Podman pod clone", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
hostname, _ = os.Hostname()
|
||||
)
|
||||
|
||||
hostname, _ := os.Hostname()
|
||||
|
||||
BeforeEach(func() {
|
||||
SkipIfRemote("podman pod clone is not supported in remote")
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman pod clone basic test", func() {
|
||||
|
|
|
@ -21,28 +21,7 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman pod create", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
hostname, _ = os.Hostname()
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
hostname, _ := os.Hostname()
|
||||
|
||||
It("podman create pod", func() {
|
||||
_, ec, podID := podmanTest.CreatePod(nil)
|
||||
|
@ -952,7 +931,6 @@ ENTRYPOINT ["sleep","99999"]
|
|||
confPath, err := filepath.Abs("config/containers-netns.conf")
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
os.Setenv("CONTAINERS_CONF", confPath)
|
||||
defer os.Unsetenv("CONTAINERS_CONF")
|
||||
if IsRemote() {
|
||||
podmanTest.RestartRemoteService()
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
"strconv"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
|
@ -11,27 +10,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman pod create", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman create infra container", func() {
|
||||
session := podmanTest.Podman([]string{"pod", "create"})
|
||||
|
|
|
@ -2,7 +2,6 @@ package integration
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/containers/podman/v4/libpod/define"
|
||||
|
@ -13,27 +12,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman init containers", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman create init container without --pod should fail", func() {
|
||||
session := podmanTest.Podman([]string{"create", "--init-ctr", "always", ALPINE, "top"})
|
||||
|
|
|
@ -2,7 +2,6 @@ package integration
|
|||
|
||||
import (
|
||||
"encoding/json"
|
||||
"os"
|
||||
|
||||
"github.com/containers/podman/v4/libpod/define"
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
|
@ -12,27 +11,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman pod inspect", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman inspect bogus pod", func() {
|
||||
session := podmanTest.Podman([]string{"pod", "inspect", "foobar"})
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
|
@ -10,27 +8,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman pod kill", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman pod kill bogus", func() {
|
||||
session := podmanTest.Podman([]string{"pod", "kill", "foobar"})
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
|
@ -10,29 +8,10 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman pod pause", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
pausedState := "Paused"
|
||||
|
||||
BeforeEach(func() {
|
||||
SkipIfRootlessCgroupsV1("Pause is not supported in cgroups v1")
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman pod pause bogus pod", func() {
|
||||
|
|
|
@ -1,36 +1,12 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
)
|
||||
|
||||
var _ = Describe("Podman pod create", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman pod container share Namespaces", func() {
|
||||
session := podmanTest.Podman([]string{"pod", "create"})
|
||||
|
|
|
@ -1,36 +1,12 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
)
|
||||
|
||||
var _ = Describe("Podman pod prune", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman pod prune empty pod", func() {
|
||||
_, ec, _ := podmanTest.CreatePod(nil)
|
||||
|
|
|
@ -2,7 +2,6 @@ package integration
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"sort"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
|
@ -13,27 +12,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman ps", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman pod ps no pods", func() {
|
||||
session := podmanTest.Podman([]string{"pod", "ps"})
|
||||
|
|
|
@ -1,36 +1,12 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
)
|
||||
|
||||
var _ = Describe("Podman pod restart", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman pod restart bogus pod", func() {
|
||||
session := podmanTest.Podman([]string{"pod", "restart", "123"})
|
||||
|
|
|
@ -15,27 +15,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman pod rm", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman pod rm empty pod", func() {
|
||||
_, ec, podid := podmanTest.CreatePod(nil)
|
||||
|
|
|
@ -13,27 +13,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman pod start", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman pod start bogus pod", func() {
|
||||
session := podmanTest.Podman([]string{"pod", "start", "123"})
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
|
@ -10,32 +8,14 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman pod stats", func() {
|
||||
var (
|
||||
err error
|
||||
tempdir string
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
SkipIfRootlessCgroupsV1("Tests fail with both CGv1 + required --cgroup-manager=cgroupfs")
|
||||
if isContainerized() {
|
||||
SkipIfCgroupV1("All tests fail Error: unable to load cgroup at ...: cgroup deleted")
|
||||
}
|
||||
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
It("podman pod stats should run with no pods", func() {
|
||||
session := podmanTest.Podman([]string{"pod", "stats", "--no-stream"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
|
|
|
@ -3,34 +3,12 @@ package integration
|
|||
import (
|
||||
"os"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
)
|
||||
|
||||
var _ = Describe("Podman pod stop", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman pod stop bogus pod", func() {
|
||||
session := podmanTest.Podman([]string{"pod", "stop", "123"})
|
||||
|
|
|
@ -2,37 +2,14 @@ package integration
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
)
|
||||
|
||||
var _ = Describe("Podman top", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman pod top without pod name or id", func() {
|
||||
result := podmanTest.Podman([]string{"pod", "top"})
|
||||
|
|
|
@ -2,7 +2,6 @@ package integration
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
|
@ -12,27 +11,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman port", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman port all and latest", func() {
|
||||
result := podmanTest.Podman([]string{"port", "-a", "-l"})
|
||||
|
|
|
@ -5,7 +5,6 @@ import (
|
|||
"os"
|
||||
"path/filepath"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
|
@ -23,27 +22,6 @@ ENV test1=test1
|
|||
ENV test2=test2`
|
||||
|
||||
var _ = Describe("Podman prune", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman container prune containers", func() {
|
||||
top := podmanTest.RunTopContainer("")
|
||||
|
|
|
@ -2,7 +2,6 @@ package integration
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"regexp"
|
||||
"sort"
|
||||
"strconv"
|
||||
|
@ -16,27 +15,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman ps", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman ps no containers", func() {
|
||||
session := podmanTest.Podman([]string{"ps"})
|
||||
|
|
|
@ -13,27 +13,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman pull", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman pull multiple images with/without tag/digest", func() {
|
||||
session := podmanTest.Podman([]string{"pull", "busybox:musl", "alpine", "alpine:latest", "quay.io/libpod/cirros", "quay.io/libpod/testdigest_v2s2@sha256:755f4d90b3716e2bf57060d249e2cd61c9ac089b1233465c5c2cb2d7ee550fdb"})
|
||||
|
|
|
@ -15,29 +15,11 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman push", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.AddImageToRWStore(ALPINE)
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman push to containers/storage", func() {
|
||||
SkipIfRemote("Remote push does not support containers-storage transport")
|
||||
session := podmanTest.Podman([]string{"push", ALPINE, "containers-storage:busybox:test"})
|
||||
|
|
|
@ -12,7 +12,6 @@ import (
|
|||
"github.com/containers/podman/v4/version"
|
||||
"github.com/mattn/go-shellwords"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
|
@ -395,21 +394,12 @@ func (t *quadletTestcase) check(generateDir string, session *PodmanSessionIntegr
|
|||
|
||||
var _ = Describe("quadlet system generator", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
generatedDir string
|
||||
quadletDir string
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
|
||||
generatedDir = filepath.Join(podmanTest.TempDir, "generated")
|
||||
err = os.Mkdir(generatedDir, os.ModePerm)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
|
@ -419,13 +409,6 @@ var _ = Describe("quadlet system generator", func() {
|
|||
Expect(err).ToNot(HaveOccurred())
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
Describe("quadlet -version", func() {
|
||||
It("Should print correct version", func() {
|
||||
session := podmanTest.Quadlet([]string{"-version"}, "/something")
|
||||
|
|
|
@ -2,7 +2,6 @@ package integration
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
|
@ -11,27 +10,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("podman rename", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman rename on non-existent container", func() {
|
||||
session := podmanTest.Podman([]string{"rename", "doesNotExist", "aNewName"})
|
||||
|
|
|
@ -12,27 +12,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman restart", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman restart bogus container", func() {
|
||||
session := podmanTest.Podman([]string{"start", "123"})
|
||||
|
|
|
@ -4,34 +4,12 @@ import (
|
|||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
)
|
||||
|
||||
var _ = Describe("Podman rm", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman rm stopped container", func() {
|
||||
_, ec, cid := podmanTest.RunLsContainer("")
|
||||
|
|
|
@ -2,7 +2,6 @@ package integration
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"sync"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
|
@ -12,27 +11,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman rmi", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman rmi bogus image", func() {
|
||||
session := podmanTest.Podman([]string{"rmi", "debian:6.0.10"})
|
||||
|
|
|
@ -2,39 +2,19 @@ package integration
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
)
|
||||
|
||||
var _ = Describe("Podman run networking", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
SkipIfCNI(podmanTest)
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("Aardvark Test 1: One container", func() {
|
||||
netName := createNetworkName("Test")
|
||||
session := podmanTest.Podman([]string{"network", "create", netName})
|
||||
|
|
|
@ -28,27 +28,6 @@ func skipIfAppArmorDisabled() {
|
|||
}
|
||||
|
||||
var _ = Describe("Podman run", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman run apparmor default", func() {
|
||||
skipIfAppArmorDisabled()
|
||||
|
|
|
@ -15,27 +15,9 @@ import (
|
|||
const cgroupRoot = "/sys/fs/cgroup"
|
||||
|
||||
var _ = Describe("Podman run with --cgroup-parent", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
SkipIfRootlessCgroupsV1("cgroup parent is not supported in cgroups v1")
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
Specify("valid --cgroup-parent using cgroupfs", func() {
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
|
@ -10,29 +8,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman run exit", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
err = podmanTest.RestoreArtifact(ALPINE)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman run -d mount cleanup test", func() {
|
||||
SkipIfRemote("podman-remote does not support mount")
|
||||
|
|
|
@ -10,35 +10,15 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman run cpu", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
SkipIfRootlessCgroupsV1("Setting CPU not supported on cgroupv1 for rootless users")
|
||||
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
if CGROUPSV2 {
|
||||
if err := os.WriteFile("/sys/fs/cgroup/cgroup.subtree_control", []byte("+cpuset"), 0644); err != nil {
|
||||
Skip("cpuset controller not available on the current kernel")
|
||||
}
|
||||
}
|
||||
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman run cpu-period", func() {
|
||||
|
|
|
@ -26,27 +26,6 @@ func createContainersConfFileWithDevices(pTest *PodmanTestIntegration, devices s
|
|||
}
|
||||
|
||||
var _ = Describe("Podman run device", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
os.Unsetenv("CONTAINERS_CONF")
|
||||
})
|
||||
|
||||
It("podman run bad device test", func() {
|
||||
session := podmanTest.Podman([]string{"run", "-q", "--device", "/dev/baddevice", ALPINE, "true"})
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
|
@ -10,27 +8,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman run dns", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman run add search domain", func() {
|
||||
session := podmanTest.Podman([]string{"run", "--dns-search=foobar.com", ALPINE, "cat", "/etc/resolv.conf"})
|
||||
|
|
|
@ -1,36 +1,12 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
)
|
||||
|
||||
var _ = Describe("Podman run entrypoint", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman run no command, entrypoint, or cmd", func() {
|
||||
dockerfile := `FROM quay.io/libpod/alpine:latest
|
||||
|
|
|
@ -3,34 +3,12 @@ package integration
|
|||
import (
|
||||
"os"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
)
|
||||
|
||||
var _ = Describe("Podman run", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman run environment test", func() {
|
||||
session := podmanTest.Podman([]string{"run", "--rm", ALPINE, "printenv", "HOME"})
|
||||
|
|
|
@ -2,37 +2,14 @@ package integration
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/containers/podman/v4/libpod/define"
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
)
|
||||
|
||||
var _ = Describe("Podman run exit", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman run exit define.ExecErrorCodeGeneric", func() {
|
||||
result := podmanTest.Podman([]string{"run", "--foobar", ALPINE, "ls", "$tmp"})
|
||||
|
|
|
@ -2,37 +2,16 @@ package integration
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
)
|
||||
|
||||
var _ = Describe("Podman run memory", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
SkipIfRootlessCgroupsV1("Setting Memory not supported on cgroupv1 for rootless users")
|
||||
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman run memory test", func() {
|
||||
|
|
|
@ -19,28 +19,8 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman run networking", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
hostname, _ = os.Hostname()
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
hostname, _ := os.Hostname()
|
||||
|
||||
It("podman verify network scoped DNS server and also verify updating network dns server", func() {
|
||||
// Following test is only functional with netavark and aardvark
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/exec"
|
||||
"strings"
|
||||
|
||||
|
@ -12,27 +11,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman run ns", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman run pidns test", func() {
|
||||
SkipIfRootlessCgroupsV1("Not supported for rootless + CgroupsV1")
|
||||
|
|
|
@ -2,7 +2,6 @@ package integration
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
|
@ -11,27 +10,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman run passwd", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman run no user specified ", func() {
|
||||
session := podmanTest.Podman([]string{"run", "--read-only", BB, "mount"})
|
||||
|
|
|
@ -36,27 +36,6 @@ func containerCapMatchesHost(ctrCap string, hostCap string) {
|
|||
}
|
||||
|
||||
var _ = Describe("Podman privileged container tests", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman privileged make sure sys is mounted rw", func() {
|
||||
session := podmanTest.Podman([]string{"run", "--privileged", BB, "mount"})
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
|
@ -10,27 +8,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman run restart containers", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("Podman start after successful run", func() {
|
||||
session := podmanTest.Podman([]string{"run", "--name", "test", ALPINE, "ls"})
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
|
@ -10,27 +8,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman run", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman run --seccomp-policy default", func() {
|
||||
session := podmanTest.Podman([]string{"run", "--seccomp-policy", "default", alpineSeccomp, "ls"})
|
||||
|
|
|
@ -2,36 +2,14 @@ package integration
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
)
|
||||
|
||||
var _ = Describe("Podman generate kube", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
})
|
||||
|
||||
It("podman security labels", func() {
|
||||
test1 := podmanTest.Podman([]string{"create", "--label", "io.containers.capabilities=setuid,setgid", "--name", "test1", "alpine", "echo", "test1"})
|
||||
|
|
|
@ -4,7 +4,6 @@ import (
|
|||
"os"
|
||||
"path/filepath"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
|
@ -12,31 +11,12 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman run", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
if !selinux.GetEnabled() {
|
||||
Skip("SELinux not enabled")
|
||||
}
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman run selinux", func() {
|
||||
session := podmanTest.Podman([]string{"run", ALPINE, "cat", "/proc/self/attr/current"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
|
|
|
@ -20,27 +20,6 @@ const sigCatch = "trap \"echo FOO >> /h/fifo \" 8; echo READY >> /h/fifo; while
|
|||
const sigCatch2 = "trap \"echo Received\" SIGFPE; while :; do sleep 0.25; done"
|
||||
|
||||
var _ = Describe("Podman run with --sig-proxy", func() {
|
||||
var (
|
||||
tmpdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tmpdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tmpdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
Specify("signals are forwarded to container using sig-proxy", func() {
|
||||
if podmanTest.Host.Arch == "ppc64le" {
|
||||
|
@ -48,7 +27,7 @@ var _ = Describe("Podman run with --sig-proxy", func() {
|
|||
}
|
||||
signal := syscall.SIGFPE
|
||||
// Set up a socket for communication
|
||||
udsDir := filepath.Join(tmpdir, "socket")
|
||||
udsDir := filepath.Join(tempdir, "socket")
|
||||
err := os.Mkdir(udsDir, 0700)
|
||||
Expect(err).ToNot(HaveOccurred())
|
||||
udsPath := filepath.Join(udsDir, "fifo")
|
||||
|
|
|
@ -3,7 +3,6 @@ package integration
|
|||
import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
|
@ -14,27 +13,9 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman run with --ip flag", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
SkipIfRootless("rootless does not support --ip without network")
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("Podman run --ip with garbage address", func() {
|
||||
|
|
|
@ -21,26 +21,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman run", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
})
|
||||
|
||||
It("podman run a container based on local image", func() {
|
||||
session := podmanTest.Podman([]string{"run", ALPINE, "ls"})
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package integration
|
||||
|
||||
import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
|
@ -12,10 +11,6 @@ import (
|
|||
|
||||
var _ = Describe("Podman run with volumes", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
|
||||
containerStorageDir string
|
||||
dbDir string
|
||||
runContainerStorageDir string
|
||||
|
@ -23,25 +18,12 @@ var _ = Describe("Podman run with volumes", func() {
|
|||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
|
||||
containerStorageDir = filepath.Join(podmanTest.Root, podmanTest.ImageCacheFS+"-containers")
|
||||
dbDir = filepath.Join(podmanTest.Root, "libpod")
|
||||
runContainerStorageDir = filepath.Join(podmanTest.RunRoot, podmanTest.ImageCacheFS+"-containers")
|
||||
runDBDir = tempdir
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
})
|
||||
|
||||
It("podman run with no transient-store", func() {
|
||||
session := podmanTest.Podman([]string{"run", ALPINE, "true"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
|
|
|
@ -7,7 +7,6 @@ import (
|
|||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
"github.com/containers/storage"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
|
@ -28,12 +27,6 @@ func createContainersConfFileWithCustomUserns(pTest *PodmanTestIntegration, user
|
|||
}
|
||||
|
||||
var _ = Describe("Podman UserNS support", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
if os.Getenv("SKIP_USERNS") != "" {
|
||||
Skip("Skip userns tests.")
|
||||
|
@ -41,19 +34,6 @@ var _ = Describe("Podman UserNS support", func() {
|
|||
if _, err := os.Stat("/proc/self/uid_map"); err != nil {
|
||||
Skip("User namespaces not supported.")
|
||||
}
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
os.Unsetenv("CONTAINERS_CONF")
|
||||
})
|
||||
|
||||
// Note: Lot of tests for build with --userns=auto are already there in buildah
|
||||
|
|
|
@ -19,26 +19,6 @@ import (
|
|||
const dest = "/unique/path"
|
||||
|
||||
var _ = Describe("Podman run with volumes", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
})
|
||||
|
||||
// Returns the /proc/self/mountinfo line for a given mount point
|
||||
getMountInfo := func(volume string) []string {
|
||||
|
|
|
@ -5,34 +5,12 @@ import (
|
|||
"os"
|
||||
"path/filepath"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
. "github.com/onsi/gomega"
|
||||
. "github.com/onsi/gomega/gexec"
|
||||
)
|
||||
|
||||
var _ = Describe("Podman run", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman run a container without workdir", func() {
|
||||
session := podmanTest.Podman([]string{"run", ALPINE, "pwd"})
|
||||
|
|
|
@ -2,7 +2,6 @@ package integration
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/podman/v4/test/utils"
|
||||
. "github.com/onsi/ginkgo/v2"
|
||||
|
@ -23,27 +22,9 @@ FROM %s
|
|||
LABEL RUN podman run --name NAME IMAGE`, ALPINE)
|
||||
|
||||
var _ = Describe("podman container runlabel", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
SkipIfRemote("runlabel is not supported for remote connections")
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman container runlabel (podman --version)", func() {
|
||||
|
|
|
@ -14,27 +14,6 @@ import (
|
|||
)
|
||||
|
||||
var _ = Describe("Podman save", func() {
|
||||
var (
|
||||
tempdir string
|
||||
err error
|
||||
podmanTest *PodmanTestIntegration
|
||||
)
|
||||
|
||||
BeforeEach(func() {
|
||||
tempdir, err = CreateTempDirInTempDir()
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentSpecReport()
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman save output flag", func() {
|
||||
outfile := filepath.Join(podmanTest.TempDir, "alpine.tar")
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue