mirror of
https://github.com/containers/podman.git
synced 2025-05-22 01:27:07 +08:00
ginkgo status improvements
a series of improvements to our ginkgo test framework so we can get better ideas of whats going on when run in CI Signed-off-by: baude <bbaude@redhat.com>
This commit is contained in:
2
Makefile
2
Makefile
@ -177,7 +177,7 @@ localunit: test/goecho/goecho varlink_generate
|
||||
$(MAKE) -C contrib/cirrus/packer test
|
||||
|
||||
ginkgo:
|
||||
ginkgo -v -tags "$(BUILDTAGS)" $(GINKGOTIMEOUT) -cover -flakeAttempts 3 -progress -trace -noColor test/e2e/.
|
||||
ginkgo -v -tags "$(BUILDTAGS)" $(GINKGOTIMEOUT) -cover -flakeAttempts 3 -progress -trace -noColor -nodes 3 test/e2e/.
|
||||
|
||||
ginkgo-remote:
|
||||
ginkgo -v -tags "$(BUILDTAGS) remoteclient" $(GINKGOTIMEOUT) -cover -flakeAttempts 3 -progress -trace -noColor test/e2e/.
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,14 +23,14 @@ var _ = Describe("Podman attach", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
"os"
|
||||
"os/exec"
|
||||
@ -27,6 +26,7 @@ var _ = Describe("Podman checkpoint", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
// Check if the runtime implements checkpointing. Currently only
|
||||
// runc's checkpoint/restore implementation is supported.
|
||||
@ -53,8 +53,8 @@ var _ = Describe("Podman checkpoint", func() {
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman checkpoint bogus container", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,14 +23,14 @@ var _ = Describe("Podman commit", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
|
@ -3,12 +3,16 @@ package integration
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
"sort"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
"github.com/containers/storage"
|
||||
|
||||
"github.com/containers/libpod/pkg/inspect"
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
"github.com/containers/storage/pkg/reexec"
|
||||
@ -40,13 +44,32 @@ type PodmanTestIntegration struct {
|
||||
SignaturePolicyPath string
|
||||
CgroupManager string
|
||||
Host HostOS
|
||||
Timings []string
|
||||
}
|
||||
|
||||
var LockTmpDir string
|
||||
|
||||
// PodmanSessionIntegration sturct for command line session
|
||||
type PodmanSessionIntegration struct {
|
||||
*PodmanSession
|
||||
}
|
||||
|
||||
type testResult struct {
|
||||
name string
|
||||
length float64
|
||||
}
|
||||
|
||||
type testResultsSorted []testResult
|
||||
|
||||
func (a testResultsSorted) Len() int { return len(a) }
|
||||
func (a testResultsSorted) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
|
||||
|
||||
type testResultsSortedLength struct{ testResultsSorted }
|
||||
|
||||
func (a testResultsSorted) Less(i, j int) bool { return a[i].length < a[j].length }
|
||||
|
||||
var testResults []testResult
|
||||
|
||||
// TestLibpod ginkgo master function
|
||||
func TestLibpod(t *testing.T) {
|
||||
if reexec.Init() {
|
||||
@ -60,7 +83,7 @@ func TestLibpod(t *testing.T) {
|
||||
RunSpecs(t, "Libpod Suite")
|
||||
}
|
||||
|
||||
var _ = BeforeSuite(func() {
|
||||
var _ = SynchronizedBeforeSuite(func() []byte {
|
||||
//Cache images
|
||||
cwd, _ := os.Getwd()
|
||||
INTEGRATION_ROOT = filepath.Join(cwd, "../../")
|
||||
@ -72,6 +95,7 @@ var _ = BeforeSuite(func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
for _, image := range CACHE_IMAGES {
|
||||
if err := podman.CreateArtifact(image); err != nil {
|
||||
fmt.Printf("%q\n", err)
|
||||
@ -92,6 +116,68 @@ var _ = BeforeSuite(func() {
|
||||
}
|
||||
f.Close()
|
||||
}
|
||||
path, err := ioutil.TempDir("", "libpodlock")
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
return []byte(path)
|
||||
}, func(data []byte) {
|
||||
LockTmpDir = string(data)
|
||||
})
|
||||
|
||||
func (p *PodmanTestIntegration) Setup() {
|
||||
cwd, _ := os.Getwd()
|
||||
INTEGRATION_ROOT = filepath.Join(cwd, "../../")
|
||||
p.ArtifactPath = ARTIFACT_DIR
|
||||
}
|
||||
|
||||
//var _ = BeforeSuite(func() {
|
||||
// cwd, _ := os.Getwd()
|
||||
// INTEGRATION_ROOT = filepath.Join(cwd, "../../")
|
||||
// podman := PodmanTestCreate("/tmp")
|
||||
// podman.ArtifactPath = ARTIFACT_DIR
|
||||
// if _, err := os.Stat(ARTIFACT_DIR); os.IsNotExist(err) {
|
||||
// if err = os.Mkdir(ARTIFACT_DIR, 0777); err != nil {
|
||||
// fmt.Printf("%q\n", err)
|
||||
// os.Exit(1)
|
||||
// }
|
||||
// }
|
||||
//})
|
||||
// for _, image := range CACHE_IMAGES {
|
||||
// if err := podman.CreateArtifact(image); err != nil {
|
||||
// fmt.Printf("%q\n", err)
|
||||
// os.Exit(1)
|
||||
// }
|
||||
// }
|
||||
// host := GetHostDistributionInfo()
|
||||
// if host.Distribution == "rhel" && strings.HasPrefix(host.Version, "7") {
|
||||
// f, err := os.OpenFile("/proc/sys/user/max_user_namespaces", os.O_WRONLY, 0644)
|
||||
// if err != nil {
|
||||
// fmt.Println("Unable to enable userspace on RHEL 7")
|
||||
// os.Exit(1)
|
||||
// }
|
||||
// _, err = f.WriteString("15000")
|
||||
// if err != nil {
|
||||
// fmt.Println("Unable to enable userspace on RHEL 7")
|
||||
// os.Exit(1)
|
||||
// }
|
||||
// f.Close()
|
||||
// }
|
||||
// path, err := ioutil.TempDir("", "libpodlock")
|
||||
// if err != nil {
|
||||
// fmt.Println(err)
|
||||
// os.Exit(1)
|
||||
// }
|
||||
// LockTmpDir = path
|
||||
//})
|
||||
|
||||
var _ = AfterSuite(func() {
|
||||
sort.Sort(testResultsSortedLength{testResults})
|
||||
fmt.Println("integration timing results")
|
||||
for _, result := range testResults {
|
||||
fmt.Printf("%s\t\t%f\n", result.name, result.length)
|
||||
}
|
||||
})
|
||||
|
||||
// PodmanTestCreate creates a PodmanTestIntegration instance for the tests
|
||||
@ -220,3 +306,19 @@ func (s *PodmanSessionIntegration) InspectImageJSON() []inspect.ImageData {
|
||||
Expect(err).To(BeNil())
|
||||
return i
|
||||
}
|
||||
|
||||
func processTestResult(f GinkgoTestDescription) {
|
||||
tr := testResult{length: f.Duration.Seconds(), name: f.TestText}
|
||||
testResults = append(testResults, tr)
|
||||
}
|
||||
|
||||
func GetPortLock(port string) storage.Locker {
|
||||
lockFile := filepath.Join(LockTmpDir, port)
|
||||
lock, err := storage.GetLockfile(lockFile)
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
os.Exit(1)
|
||||
}
|
||||
lock.Lock()
|
||||
return lock
|
||||
}
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
@ -27,14 +26,15 @@ var _ = Describe("Podman cp", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman cp file", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,6 +23,7 @@ var _ = Describe("Podman create with --ip flag", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
// Cleanup the CNI networks used by the tests
|
||||
os.RemoveAll("/var/lib/cni/networks/podman")
|
||||
@ -32,8 +32,8 @@ var _ = Describe("Podman create with --ip flag", func() {
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("Podman create --ip with garbage address", func() {
|
||||
|
@ -25,14 +25,14 @@ var _ = Describe("Podman create", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"sort"
|
||||
|
||||
@ -25,14 +24,14 @@ var _ = Describe("Podman diff", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,14 +23,14 @@ var _ = Describe("Podman exec", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -22,14 +21,14 @@ var _ = Describe("Podman image|container exists", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
@ -23,14 +22,14 @@ var _ = Describe("Podman export", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -25,14 +24,14 @@ var _ = Describe("Podman generate kube", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -22,14 +21,14 @@ var _ = Describe("Podman history", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
|
@ -24,14 +24,14 @@ var _ = Describe("Podman images", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
It("podman images", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
@ -25,14 +24,15 @@ var _ = Describe("Podman import", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman import with source and reference", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,13 +23,14 @@ var _ = Describe("Podman Info", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman info json output", func() {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
@ -23,14 +22,15 @@ var _ = Describe("Podman inspect", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman inspect alpine image", func() {
|
||||
@ -57,7 +57,7 @@ var _ = Describe("Podman inspect", func() {
|
||||
result := podmanTest.Podman([]string{"images", "-q", "--no-trunc", ALPINE})
|
||||
result.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
Expect(strings.Trim(result.OutputToString(), "sha256:")).To(Equal(session.OutputToString()))
|
||||
Expect(strings.Contains(result.OutputToString(), session.OutputToString()))
|
||||
})
|
||||
|
||||
It("podman inspect specified type", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,14 +23,14 @@ var _ = Describe("Podman kill", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
@ -25,14 +24,15 @@ var _ = Describe("Podman load", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman load input flag", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,14 +23,15 @@ var _ = Describe("Podman logs", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
//sudo bin/podman run -it --rm fedora-minimal bash -c 'for a in `seq 5`; do echo hello; done'
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,14 +23,15 @@ var _ = Describe("Podman mount", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman mount", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,14 +23,15 @@ var _ = Describe("Podman namespaces", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman namespace test", func() {
|
||||
|
@ -27,14 +27,15 @@ var _ = Describe("Podman pause", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman pause bogus container", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,14 +23,15 @@ var _ = Describe("Podman pod create", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.CleanupPod()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman create pod", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strconv"
|
||||
|
||||
@ -25,6 +24,7 @@ var _ = Describe("Podman pod create", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
podmanTest.RestoreArtifact(infra)
|
||||
})
|
||||
@ -32,8 +32,8 @@ var _ = Describe("Podman pod create", func() {
|
||||
AfterEach(func() {
|
||||
podmanTest.CleanupPod()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman create infra container", func() {
|
||||
@ -209,8 +209,7 @@ var _ = Describe("Podman pod create", func() {
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
|
||||
podmanTest.RestoreArtifact(fedoraMinimal)
|
||||
session = podmanTest.Podman([]string{"run", "--pod", podID, "--network", "bridge", fedoraMinimal, "curl", "localhost"})
|
||||
session = podmanTest.Podman([]string{"run", "--pod", podID, "--network", "bridge", nginx, "curl", "localhost"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Not(Equal(0)))
|
||||
})
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,14 +23,15 @@ var _ = Describe("Podman pod inspect", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.CleanupPod()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman inspect bogus pod", func() {
|
||||
|
@ -24,14 +24,15 @@ var _ = Describe("Podman pod kill", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.CleanupPod()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman pod kill bogus", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -26,14 +25,15 @@ var _ = Describe("Podman pod pause", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.CleanupPod()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman pod pause bogus pod", func() {
|
||||
|
@ -24,6 +24,7 @@ var _ = Describe("Podman pod create", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
podmanTest.RestoreArtifact(infra)
|
||||
})
|
||||
@ -31,8 +32,8 @@ var _ = Describe("Podman pod create", func() {
|
||||
AfterEach(func() {
|
||||
podmanTest.CleanupPod()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman pod container share Namespaces", func() {
|
||||
|
@ -25,14 +25,15 @@ var _ = Describe("Podman ps", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.CleanupPod()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman pod ps no pods", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,14 +23,15 @@ var _ = Describe("Podman pod restart", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.CleanupPod()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman pod restart bogus pod", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,14 +23,15 @@ var _ = Describe("Podman pod rm", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.CleanupPod()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman pod rm empty pod", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,14 +23,15 @@ var _ = Describe("Podman pod start", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.CleanupPod()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman pod start bogus pod", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,14 +23,15 @@ var _ = Describe("Podman pod stats", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.CleanupPod()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
It("podman stats should run with no pods", func() {
|
||||
session := podmanTest.Podman([]string{"pod", "stats", "--no-stream"})
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,14 +23,15 @@ var _ = Describe("Podman pod stop", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.CleanupPod()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman pod stop bogus pod", func() {
|
||||
|
@ -5,6 +5,7 @@ package integration
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
. "github.com/onsi/ginkgo"
|
||||
@ -24,14 +25,15 @@ var _ = Describe("Podman top", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.CleanupPod()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman pod top without pod name or id", func() {
|
||||
@ -127,6 +129,13 @@ var _ = Describe("Podman top", func() {
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
|
||||
for i := 0; i < 10; i++ {
|
||||
fmt.Println("Waiting for containers to be running .... ")
|
||||
if podmanTest.NumberOfContainersRunning() == 2 {
|
||||
break
|
||||
}
|
||||
time.Sleep(1 * time.Second)
|
||||
}
|
||||
result := podmanTest.Podman([]string{"pod", "top", podid})
|
||||
result.WaitWithDefaultTimeout()
|
||||
Expect(result.ExitCode()).To(Equal(0))
|
||||
|
@ -25,14 +25,15 @@ var _ = Describe("Podman port", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman port all and latest", func() {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -28,14 +27,15 @@ var _ = Describe("Podman rm", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman container prune containers", func() {
|
||||
|
@ -28,14 +28,15 @@ var _ = Describe("Podman ps", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman ps no containers", func() {
|
||||
@ -271,8 +272,7 @@ var _ = Describe("Podman ps", func() {
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
|
||||
podmanTest.RestoreArtifact(fedoraMinimal)
|
||||
session = podmanTest.Podman([]string{"run", "-d", fedoraMinimal, "pwd"})
|
||||
session = podmanTest.Podman([]string{"run", "-d", ALPINE, "pwd"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
Expect(session.ExitCode()).To(Equal(0))
|
||||
|
||||
|
@ -27,14 +27,15 @@ var _ = Describe("Podman pull", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman pull from docker with tag", func() {
|
||||
|
@ -26,14 +26,15 @@ var _ = Describe("Podman push", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman push to containers/storage", func() {
|
||||
@ -62,6 +63,8 @@ var _ = Describe("Podman push", func() {
|
||||
if podmanTest.Host.Arch == "ppc64le" {
|
||||
Skip("No registry image for ppc64le")
|
||||
}
|
||||
lock := GetPortLock("5000")
|
||||
defer lock.Unlock()
|
||||
podmanTest.RestoreArtifact(registry)
|
||||
session := podmanTest.Podman([]string{"run", "-d", "--name", "registry", "-p", "5000:5000", registry, "/entrypoint.sh", "/etc/docker/registry/config.yml"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
@ -100,6 +103,8 @@ var _ = Describe("Podman push", func() {
|
||||
}()
|
||||
}
|
||||
}
|
||||
lock := GetPortLock("5000")
|
||||
defer lock.Unlock()
|
||||
podmanTest.RestoreArtifact(registry)
|
||||
session := podmanTest.Podman([]string{"run", "--entrypoint", "htpasswd", registry, "-Bbn", "podmantest", "test"})
|
||||
session.WaitWithDefaultTimeout()
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
@ -25,14 +24,15 @@ var _ = Describe("Podman refresh", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tmpdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
Specify("Refresh with no containers succeeds", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
@ -25,14 +24,15 @@ var _ = Describe("Podman restart", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("Podman restart bogus container", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,14 +23,15 @@ var _ = Describe("Podman rm", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman rm stopped container", func() {
|
||||
|
@ -22,14 +22,14 @@ var _ = Describe("Podman rmi", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
|
@ -45,14 +45,15 @@ var _ = Describe("Podman rootless", func() {
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.CgroupManager = "cgroupfs"
|
||||
podmanTest.StorageOptions = ROOTLESS_STORAGE_OPTIONS
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman rootless help|version", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,14 +23,15 @@ var _ = Describe("Podman run with --cgroup-parent", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreArtifact(fedoraMinimal)
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
Specify("valid --cgroup-parent using cgroupfs", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,14 +23,15 @@ var _ = Describe("Podman run exit", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman run -d mount cleanup test", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,14 +23,15 @@ var _ = Describe("Podman run cpu", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman run cpu-period", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,14 +23,15 @@ var _ = Describe("Podman run device", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman run bad device test", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,14 +23,15 @@ var _ = Describe("Podman run dns", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman run add search domain", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,14 +23,15 @@ var _ = Describe("Podman run entrypoint", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreArtifact(ALPINE)
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman run no command, entrypoint, or cmd", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,14 +23,15 @@ var _ = Describe("Podman run exit", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman run exit 125", func() {
|
||||
@ -59,8 +59,7 @@ var _ = Describe("Podman run exit", func() {
|
||||
})
|
||||
|
||||
It("podman run exit 50", func() {
|
||||
podmanTest.RestoreArtifact(fedoraMinimal)
|
||||
result := podmanTest.Podman([]string{"run", "registry.fedoraproject.org/fedora-minimal", "bash", "-c", "exit 50"})
|
||||
result := podmanTest.Podman([]string{"run", ALPINE, "sh", "-c", "exit 50"})
|
||||
result.WaitWithDefaultTimeout()
|
||||
Expect(result.ExitCode()).To(Equal(50))
|
||||
})
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,14 +23,15 @@ var _ = Describe("Podman run memory", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman run memory test", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -25,14 +24,15 @@ var _ = Describe("Podman run networking", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman run network connection with default bridge", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
@ -25,14 +24,15 @@ var _ = Describe("Podman run ns", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreArtifact(fedoraMinimal)
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman run pidns test", func() {
|
||||
|
@ -5,7 +5,6 @@ package integration
|
||||
import (
|
||||
"os"
|
||||
|
||||
"fmt"
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
@ -24,14 +23,15 @@ var _ = Describe("Podman run passwd", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman run no user specified ", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strings"
|
||||
|
||||
@ -25,14 +24,15 @@ var _ = Describe("Podman privileged container tests", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman privileged make sure sys is mounted rw", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,14 +23,15 @@ var _ = Describe("Podman run restart containers", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("Podman start after successful run", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -25,6 +24,7 @@ var _ = Describe("Podman run", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
if !selinux.GetEnabled() {
|
||||
Skip("SELinux not enabled")
|
||||
@ -34,8 +34,8 @@ var _ = Describe("Podman run", func() {
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman run selinux", func() {
|
||||
|
@ -32,14 +32,15 @@ var _ = Describe("Podman run with --sig-proxy", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tmpdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreArtifact(fedoraMinimal)
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
Specify("signals are forwarded to container using sig-proxy", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,6 +23,7 @@ var _ = Describe("Podman run with --ip flag", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
// Cleanup the CNI networks used by the tests
|
||||
os.RemoveAll("/var/lib/cni/networks/podman")
|
||||
@ -32,8 +32,8 @@ var _ = Describe("Podman run with --ip flag", func() {
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("Podman run --ip with garbage address", func() {
|
||||
|
@ -29,14 +29,15 @@ var _ = Describe("Podman run", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman run a container based on local image", func() {
|
||||
|
@ -5,7 +5,6 @@ package integration
|
||||
import (
|
||||
"os"
|
||||
|
||||
"fmt"
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
. "github.com/onsi/ginkgo"
|
||||
. "github.com/onsi/gomega"
|
||||
@ -24,14 +23,15 @@ var _ = Describe("Podman UserNS support", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman uidmapping and gidmapping", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -32,14 +31,14 @@ var _ = Describe("podman container runlabel", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
@ -23,14 +22,15 @@ var _ = Describe("Podman save", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman save output flag", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
"strconv"
|
||||
|
||||
@ -44,14 +43,15 @@ var _ = Describe("Podman search", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman search", func() {
|
||||
@ -134,6 +134,9 @@ var _ = Describe("Podman search", func() {
|
||||
if podmanTest.Host.Arch == "ppc64le" {
|
||||
Skip("No registry image for ppc64le")
|
||||
}
|
||||
lock := GetPortLock("5000")
|
||||
defer lock.Unlock()
|
||||
|
||||
podmanTest.RestoreArtifact(registry)
|
||||
fakereg := podmanTest.Podman([]string{"run", "-d", "--name", "registry", "-p", "5000:5000", registry, "/entrypoint.sh", "/etc/docker/registry/config.yml"})
|
||||
fakereg.WaitWithDefaultTimeout()
|
||||
@ -157,6 +160,8 @@ var _ = Describe("Podman search", func() {
|
||||
if podmanTest.Host.Arch == "ppc64le" {
|
||||
Skip("No registry image for ppc64le")
|
||||
}
|
||||
lock := GetPortLock("5000")
|
||||
defer lock.Unlock()
|
||||
podmanTest.RestoreArtifact(registry)
|
||||
registry := podmanTest.Podman([]string{"run", "-d", "--name", "registry3", "-p", "5000:5000", registry, "/entrypoint.sh", "/etc/docker/registry/config.yml"})
|
||||
registry.WaitWithDefaultTimeout()
|
||||
@ -180,6 +185,8 @@ var _ = Describe("Podman search", func() {
|
||||
if podmanTest.Host.Arch == "ppc64le" {
|
||||
Skip("No registry image for ppc64le")
|
||||
}
|
||||
lock := GetPortLock("5000")
|
||||
defer lock.Unlock()
|
||||
podmanTest.RestoreArtifact(registry)
|
||||
registry := podmanTest.Podman([]string{"run", "-d", "--name", "registry4", "-p", "5000:5000", registry, "/entrypoint.sh", "/etc/docker/registry/config.yml"})
|
||||
registry.WaitWithDefaultTimeout()
|
||||
@ -212,6 +219,8 @@ var _ = Describe("Podman search", func() {
|
||||
if podmanTest.Host.Arch == "ppc64le" {
|
||||
Skip("No registry image for ppc64le")
|
||||
}
|
||||
lock := GetPortLock("5000")
|
||||
defer lock.Unlock()
|
||||
podmanTest.RestoreArtifact(registry)
|
||||
registry := podmanTest.Podman([]string{"run", "-d", "-p", "5000:5000", "--name", "registry5", registry})
|
||||
registry.WaitWithDefaultTimeout()
|
||||
@ -243,6 +252,8 @@ var _ = Describe("Podman search", func() {
|
||||
if podmanTest.Host.Arch == "ppc64le" {
|
||||
Skip("No registry image for ppc64le")
|
||||
}
|
||||
lock := GetPortLock("5000")
|
||||
defer lock.Unlock()
|
||||
podmanTest.RestoreArtifact(registry)
|
||||
registry := podmanTest.Podman([]string{"run", "-d", "-p", "5000:5000", "--name", "registry6", registry})
|
||||
registry.WaitWithDefaultTimeout()
|
||||
@ -274,6 +285,8 @@ var _ = Describe("Podman search", func() {
|
||||
if podmanTest.Host.Arch == "ppc64le" {
|
||||
Skip("No registry image for ppc64le")
|
||||
}
|
||||
lock := GetPortLock("5000")
|
||||
defer lock.Unlock()
|
||||
podmanTest.RestoreArtifact(registry)
|
||||
registryLocal := podmanTest.Podman([]string{"run", "-d", "-p", "5000:5000", "--name", "registry7", registry})
|
||||
registryLocal.WaitWithDefaultTimeout()
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,14 +23,15 @@ var _ = Describe("Podman start", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman start bogus container", func() {
|
||||
|
@ -24,14 +24,15 @@ var _ = Describe("Podman stats", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman stats with bogus container", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,14 +23,15 @@ var _ = Describe("Podman stop", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman stop bogus container", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
@ -26,6 +25,7 @@ var _ = Describe("Podman systemd", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
systemd_unit_file = `[Unit]
|
||||
Description=redis container
|
||||
@ -42,8 +42,8 @@ WantedBy=multi-user.target
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman start container by systemd", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,14 +23,15 @@ var _ = Describe("Podman tag", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman tag shortname:latest", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,14 +23,15 @@ var _ = Describe("Podman top", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman top without container name or id", func() {
|
||||
|
@ -4,7 +4,6 @@ package integration
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
@ -27,14 +26,15 @@ var _ = Describe("Podman trust", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman image trust show", func() {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -27,8 +26,8 @@ var _ = Describe("Podman version", func() {
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman version", func() {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -22,14 +21,15 @@ var _ = Describe("Podman volume create", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.CleanupVolume()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman create volume", func() {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -22,14 +21,15 @@ var _ = Describe("Podman volume inspect", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.CleanupVolume()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman inspect volume", func() {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -22,14 +21,15 @@ var _ = Describe("Podman volume ls", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.CleanupVolume()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman ls volume", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,14 +23,15 @@ var _ = Describe("Podman volume prune", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.CleanupVolume()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman prune volume", func() {
|
||||
|
@ -1,7 +1,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -22,14 +21,15 @@ var _ = Describe("Podman volume rm", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.CleanupVolume()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman rm volume", func() {
|
||||
|
@ -3,7 +3,6 @@
|
||||
package integration
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
. "github.com/containers/libpod/test/utils"
|
||||
@ -24,14 +23,15 @@ var _ = Describe("Podman wait", func() {
|
||||
os.Exit(1)
|
||||
}
|
||||
podmanTest = PodmanTestCreate(tempdir)
|
||||
podmanTest.Setup()
|
||||
podmanTest.RestoreAllArtifacts()
|
||||
})
|
||||
|
||||
AfterEach(func() {
|
||||
podmanTest.Cleanup()
|
||||
f := CurrentGinkgoTestDescription()
|
||||
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds())
|
||||
GinkgoWriter.Write([]byte(timedResult))
|
||||
processTestResult(f)
|
||||
|
||||
})
|
||||
|
||||
It("podman wait on bogus container", func() {
|
||||
|
Reference in New Issue
Block a user