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:
baude
2019-03-06 10:29:11 -06:00
parent be6ad02049
commit d5546008ab
82 changed files with 359 additions and 233 deletions

View File

@ -177,7 +177,7 @@ localunit: test/goecho/goecho varlink_generate
$(MAKE) -C contrib/cirrus/packer test $(MAKE) -C contrib/cirrus/packer test
ginkgo: 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-remote:
ginkgo -v -tags "$(BUILDTAGS) remoteclient" $(GINKGOTIMEOUT) -cover -flakeAttempts 3 -progress -trace -noColor test/e2e/. ginkgo -v -tags "$(BUILDTAGS) remoteclient" $(GINKGOTIMEOUT) -cover -flakeAttempts 3 -progress -trace -noColor test/e2e/.

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,14 +23,14 @@ var _ = Describe("Podman attach", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"net" "net"
"os" "os"
"os/exec" "os/exec"
@ -27,6 +26,7 @@ var _ = Describe("Podman checkpoint", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
// Check if the runtime implements checkpointing. Currently only // Check if the runtime implements checkpointing. Currently only
// runc's checkpoint/restore implementation is supported. // runc's checkpoint/restore implementation is supported.
@ -53,8 +53,8 @@ var _ = Describe("Podman checkpoint", func() {
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman checkpoint bogus container", func() { It("podman checkpoint bogus container", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,14 +23,14 @@ var _ = Describe("Podman commit", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })

View File

@ -3,12 +3,16 @@ package integration
import ( import (
"encoding/json" "encoding/json"
"fmt" "fmt"
"io/ioutil"
"os" "os"
"os/exec" "os/exec"
"path/filepath" "path/filepath"
"sort"
"strings" "strings"
"testing" "testing"
"github.com/containers/storage"
"github.com/containers/libpod/pkg/inspect" "github.com/containers/libpod/pkg/inspect"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
"github.com/containers/storage/pkg/reexec" "github.com/containers/storage/pkg/reexec"
@ -40,13 +44,32 @@ type PodmanTestIntegration struct {
SignaturePolicyPath string SignaturePolicyPath string
CgroupManager string CgroupManager string
Host HostOS Host HostOS
Timings []string
} }
var LockTmpDir string
// PodmanSessionIntegration sturct for command line session // PodmanSessionIntegration sturct for command line session
type PodmanSessionIntegration struct { type PodmanSessionIntegration struct {
*PodmanSession *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 // TestLibpod ginkgo master function
func TestLibpod(t *testing.T) { func TestLibpod(t *testing.T) {
if reexec.Init() { if reexec.Init() {
@ -60,7 +83,7 @@ func TestLibpod(t *testing.T) {
RunSpecs(t, "Libpod Suite") RunSpecs(t, "Libpod Suite")
} }
var _ = BeforeSuite(func() { var _ = SynchronizedBeforeSuite(func() []byte {
//Cache images //Cache images
cwd, _ := os.Getwd() cwd, _ := os.Getwd()
INTEGRATION_ROOT = filepath.Join(cwd, "../../") INTEGRATION_ROOT = filepath.Join(cwd, "../../")
@ -72,6 +95,7 @@ var _ = BeforeSuite(func() {
os.Exit(1) os.Exit(1)
} }
} }
for _, image := range CACHE_IMAGES { for _, image := range CACHE_IMAGES {
if err := podman.CreateArtifact(image); err != nil { if err := podman.CreateArtifact(image); err != nil {
fmt.Printf("%q\n", err) fmt.Printf("%q\n", err)
@ -92,6 +116,68 @@ var _ = BeforeSuite(func() {
} }
f.Close() 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 // PodmanTestCreate creates a PodmanTestIntegration instance for the tests
@ -220,3 +306,19 @@ func (s *PodmanSessionIntegration) InspectImageJSON() []inspect.ImageData {
Expect(err).To(BeNil()) Expect(err).To(BeNil())
return i 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
}

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"io/ioutil" "io/ioutil"
"os" "os"
"os/exec" "os/exec"
@ -27,14 +26,15 @@ var _ = Describe("Podman cp", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman cp file", func() { It("podman cp file", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,6 +23,7 @@ var _ = Describe("Podman create with --ip flag", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
// Cleanup the CNI networks used by the tests // Cleanup the CNI networks used by the tests
os.RemoveAll("/var/lib/cni/networks/podman") os.RemoveAll("/var/lib/cni/networks/podman")
@ -32,8 +32,8 @@ var _ = Describe("Podman create with --ip flag", func() {
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("Podman create --ip with garbage address", func() { It("Podman create --ip with garbage address", func() {

View File

@ -25,14 +25,14 @@ var _ = Describe("Podman create", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
"sort" "sort"
@ -25,14 +24,14 @@ var _ = Describe("Podman diff", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,14 +23,14 @@ var _ = Describe("Podman exec", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })

View File

@ -1,7 +1,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -22,14 +21,14 @@ var _ = Describe("Podman image|container exists", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })

View File

@ -1,7 +1,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
"path/filepath" "path/filepath"
@ -23,14 +22,14 @@ var _ = Describe("Podman export", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -25,14 +24,14 @@ var _ = Describe("Podman generate kube", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })

View File

@ -1,7 +1,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -22,14 +21,14 @@ var _ = Describe("Podman history", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })

View File

@ -24,14 +24,14 @@ var _ = Describe("Podman images", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman images", func() { It("podman images", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
"path/filepath" "path/filepath"
@ -25,14 +24,15 @@ var _ = Describe("Podman import", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman import with source and reference", func() { It("podman import with source and reference", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,13 +23,14 @@ var _ = Describe("Podman Info", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman info json output", func() { It("podman info json output", func() {

View File

@ -1,7 +1,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
"strings" "strings"
@ -23,14 +22,15 @@ var _ = Describe("Podman inspect", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman inspect alpine image", func() { 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 := podmanTest.Podman([]string{"images", "-q", "--no-trunc", ALPINE})
result.WaitWithDefaultTimeout() result.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0)) 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() { It("podman inspect specified type", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,14 +23,14 @@ var _ = Describe("Podman kill", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
"path/filepath" "path/filepath"
@ -25,14 +24,15 @@ var _ = Describe("Podman load", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman load input flag", func() { It("podman load input flag", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,14 +23,15 @@ var _ = Describe("Podman logs", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
//sudo bin/podman run -it --rm fedora-minimal bash -c 'for a in `seq 5`; do echo hello; done' //sudo bin/podman run -it --rm fedora-minimal bash -c 'for a in `seq 5`; do echo hello; done'

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,14 +23,15 @@ var _ = Describe("Podman mount", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman mount", func() { It("podman mount", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,14 +23,15 @@ var _ = Describe("Podman namespaces", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman namespace test", func() { It("podman namespace test", func() {

View File

@ -27,14 +27,15 @@ var _ = Describe("Podman pause", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman pause bogus container", func() { It("podman pause bogus container", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,14 +23,15 @@ var _ = Describe("Podman pod create", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.CleanupPod() podmanTest.CleanupPod()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman create pod", func() { It("podman create pod", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
"strconv" "strconv"
@ -25,6 +24,7 @@ var _ = Describe("Podman pod create", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
podmanTest.RestoreArtifact(infra) podmanTest.RestoreArtifact(infra)
}) })
@ -32,8 +32,8 @@ var _ = Describe("Podman pod create", func() {
AfterEach(func() { AfterEach(func() {
podmanTest.CleanupPod() podmanTest.CleanupPod()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman create infra container", func() { It("podman create infra container", func() {
@ -209,8 +209,7 @@ var _ = Describe("Podman pod create", func() {
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0)) Expect(session.ExitCode()).To(Equal(0))
podmanTest.RestoreArtifact(fedoraMinimal) session = podmanTest.Podman([]string{"run", "--pod", podID, "--network", "bridge", nginx, "curl", "localhost"})
session = podmanTest.Podman([]string{"run", "--pod", podID, "--network", "bridge", fedoraMinimal, "curl", "localhost"})
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Not(Equal(0))) Expect(session.ExitCode()).To(Not(Equal(0)))
}) })

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,14 +23,15 @@ var _ = Describe("Podman pod inspect", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.CleanupPod() podmanTest.CleanupPod()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman inspect bogus pod", func() { It("podman inspect bogus pod", func() {

View File

@ -24,14 +24,15 @@ var _ = Describe("Podman pod kill", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.CleanupPod() podmanTest.CleanupPod()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman pod kill bogus", func() { It("podman pod kill bogus", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -26,14 +25,15 @@ var _ = Describe("Podman pod pause", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.CleanupPod() podmanTest.CleanupPod()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman pod pause bogus pod", func() { It("podman pod pause bogus pod", func() {

View File

@ -24,6 +24,7 @@ var _ = Describe("Podman pod create", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
podmanTest.RestoreArtifact(infra) podmanTest.RestoreArtifact(infra)
}) })
@ -31,8 +32,8 @@ var _ = Describe("Podman pod create", func() {
AfterEach(func() { AfterEach(func() {
podmanTest.CleanupPod() podmanTest.CleanupPod()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman pod container share Namespaces", func() { It("podman pod container share Namespaces", func() {

View File

@ -25,14 +25,15 @@ var _ = Describe("Podman ps", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.CleanupPod() podmanTest.CleanupPod()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman pod ps no pods", func() { It("podman pod ps no pods", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,14 +23,15 @@ var _ = Describe("Podman pod restart", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.CleanupPod() podmanTest.CleanupPod()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman pod restart bogus pod", func() { It("podman pod restart bogus pod", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,14 +23,15 @@ var _ = Describe("Podman pod rm", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.CleanupPod() podmanTest.CleanupPod()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman pod rm empty pod", func() { It("podman pod rm empty pod", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,14 +23,15 @@ var _ = Describe("Podman pod start", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.CleanupPod() podmanTest.CleanupPod()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman pod start bogus pod", func() { It("podman pod start bogus pod", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,14 +23,15 @@ var _ = Describe("Podman pod stats", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.CleanupPod() podmanTest.CleanupPod()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman stats should run with no pods", func() { It("podman stats should run with no pods", func() {
session := podmanTest.Podman([]string{"pod", "stats", "--no-stream"}) session := podmanTest.Podman([]string{"pod", "stats", "--no-stream"})

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,14 +23,15 @@ var _ = Describe("Podman pod stop", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.CleanupPod() podmanTest.CleanupPod()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman pod stop bogus pod", func() { It("podman pod stop bogus pod", func() {

View File

@ -5,6 +5,7 @@ package integration
import ( import (
"fmt" "fmt"
"os" "os"
"time"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
. "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo"
@ -24,14 +25,15 @@ var _ = Describe("Podman top", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.CleanupPod() podmanTest.CleanupPod()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman pod top without pod name or id", func() { It("podman pod top without pod name or id", func() {
@ -127,6 +129,13 @@ var _ = Describe("Podman top", func() {
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0)) 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 := podmanTest.Podman([]string{"pod", "top", podid})
result.WaitWithDefaultTimeout() result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(0)) Expect(result.ExitCode()).To(Equal(0))

View File

@ -25,14 +25,15 @@ var _ = Describe("Podman port", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman port all and latest", func() { It("podman port all and latest", func() {

View File

@ -1,7 +1,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -28,14 +27,15 @@ var _ = Describe("Podman rm", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman container prune containers", func() { It("podman container prune containers", func() {

View File

@ -28,14 +28,15 @@ var _ = Describe("Podman ps", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman ps no containers", func() { It("podman ps no containers", func() {
@ -271,8 +272,7 @@ var _ = Describe("Podman ps", func() {
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0)) Expect(session.ExitCode()).To(Equal(0))
podmanTest.RestoreArtifact(fedoraMinimal) session = podmanTest.Podman([]string{"run", "-d", ALPINE, "pwd"})
session = podmanTest.Podman([]string{"run", "-d", fedoraMinimal, "pwd"})
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
Expect(session.ExitCode()).To(Equal(0)) Expect(session.ExitCode()).To(Equal(0))

View File

@ -27,14 +27,15 @@ var _ = Describe("Podman pull", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman pull from docker with tag", func() { It("podman pull from docker with tag", func() {

View File

@ -26,14 +26,15 @@ var _ = Describe("Podman push", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman push to containers/storage", func() { It("podman push to containers/storage", func() {
@ -62,6 +63,8 @@ var _ = Describe("Podman push", func() {
if podmanTest.Host.Arch == "ppc64le" { if podmanTest.Host.Arch == "ppc64le" {
Skip("No registry image for ppc64le") Skip("No registry image for ppc64le")
} }
lock := GetPortLock("5000")
defer lock.Unlock()
podmanTest.RestoreArtifact(registry) podmanTest.RestoreArtifact(registry)
session := podmanTest.Podman([]string{"run", "-d", "--name", "registry", "-p", "5000:5000", registry, "/entrypoint.sh", "/etc/docker/registry/config.yml"}) session := podmanTest.Podman([]string{"run", "-d", "--name", "registry", "-p", "5000:5000", registry, "/entrypoint.sh", "/etc/docker/registry/config.yml"})
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()
@ -100,6 +103,8 @@ var _ = Describe("Podman push", func() {
}() }()
} }
} }
lock := GetPortLock("5000")
defer lock.Unlock()
podmanTest.RestoreArtifact(registry) podmanTest.RestoreArtifact(registry)
session := podmanTest.Podman([]string{"run", "--entrypoint", "htpasswd", registry, "-Bbn", "podmantest", "test"}) session := podmanTest.Podman([]string{"run", "--entrypoint", "htpasswd", registry, "-Bbn", "podmantest", "test"})
session.WaitWithDefaultTimeout() session.WaitWithDefaultTimeout()

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
"time" "time"
@ -25,14 +24,15 @@ var _ = Describe("Podman refresh", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tmpdir) podmanTest = PodmanTestCreate(tmpdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
Specify("Refresh with no containers succeeds", func() { Specify("Refresh with no containers succeeds", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
"time" "time"
@ -25,14 +24,15 @@ var _ = Describe("Podman restart", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("Podman restart bogus container", func() { It("Podman restart bogus container", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,14 +23,15 @@ var _ = Describe("Podman rm", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman rm stopped container", func() { It("podman rm stopped container", func() {

View File

@ -22,14 +22,14 @@ var _ = Describe("Podman rmi", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })

View File

@ -45,14 +45,15 @@ var _ = Describe("Podman rootless", func() {
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.CgroupManager = "cgroupfs" podmanTest.CgroupManager = "cgroupfs"
podmanTest.StorageOptions = ROOTLESS_STORAGE_OPTIONS podmanTest.StorageOptions = ROOTLESS_STORAGE_OPTIONS
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman rootless help|version", func() { It("podman rootless help|version", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,14 +23,15 @@ var _ = Describe("Podman run with --cgroup-parent", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreArtifact(fedoraMinimal) podmanTest.RestoreArtifact(fedoraMinimal)
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
Specify("valid --cgroup-parent using cgroupfs", func() { Specify("valid --cgroup-parent using cgroupfs", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,14 +23,15 @@ var _ = Describe("Podman run exit", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman run -d mount cleanup test", func() { It("podman run -d mount cleanup test", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,14 +23,15 @@ var _ = Describe("Podman run cpu", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman run cpu-period", func() { It("podman run cpu-period", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,14 +23,15 @@ var _ = Describe("Podman run device", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman run bad device test", func() { It("podman run bad device test", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,14 +23,15 @@ var _ = Describe("Podman run dns", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman run add search domain", func() { It("podman run add search domain", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,14 +23,15 @@ var _ = Describe("Podman run entrypoint", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreArtifact(ALPINE) podmanTest.RestoreArtifact(ALPINE)
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman run no command, entrypoint, or cmd", func() { It("podman run no command, entrypoint, or cmd", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,14 +23,15 @@ var _ = Describe("Podman run exit", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman run exit 125", func() { It("podman run exit 125", func() {
@ -59,8 +59,7 @@ var _ = Describe("Podman run exit", func() {
}) })
It("podman run exit 50", func() { It("podman run exit 50", func() {
podmanTest.RestoreArtifact(fedoraMinimal) result := podmanTest.Podman([]string{"run", ALPINE, "sh", "-c", "exit 50"})
result := podmanTest.Podman([]string{"run", "registry.fedoraproject.org/fedora-minimal", "bash", "-c", "exit 50"})
result.WaitWithDefaultTimeout() result.WaitWithDefaultTimeout()
Expect(result.ExitCode()).To(Equal(50)) Expect(result.ExitCode()).To(Equal(50))
}) })

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,14 +23,15 @@ var _ = Describe("Podman run memory", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman run memory test", func() { It("podman run memory test", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -25,14 +24,15 @@ var _ = Describe("Podman run networking", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman run network connection with default bridge", func() { It("podman run network connection with default bridge", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
"strings" "strings"
@ -25,14 +24,15 @@ var _ = Describe("Podman run ns", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreArtifact(fedoraMinimal) podmanTest.RestoreArtifact(fedoraMinimal)
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman run pidns test", func() { It("podman run pidns test", func() {

View File

@ -5,7 +5,6 @@ package integration
import ( import (
"os" "os"
"fmt"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
. "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo"
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
@ -24,14 +23,15 @@ var _ = Describe("Podman run passwd", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman run no user specified ", func() { It("podman run no user specified ", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
"strings" "strings"
@ -25,14 +24,15 @@ var _ = Describe("Podman privileged container tests", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman privileged make sure sys is mounted rw", func() { It("podman privileged make sure sys is mounted rw", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,14 +23,15 @@ var _ = Describe("Podman run restart containers", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("Podman start after successful run", func() { It("Podman start after successful run", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -25,6 +24,7 @@ var _ = Describe("Podman run", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
if !selinux.GetEnabled() { if !selinux.GetEnabled() {
Skip("SELinux not enabled") Skip("SELinux not enabled")
@ -34,8 +34,8 @@ var _ = Describe("Podman run", func() {
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman run selinux", func() { It("podman run selinux", func() {

View File

@ -32,14 +32,15 @@ var _ = Describe("Podman run with --sig-proxy", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tmpdir) podmanTest = PodmanTestCreate(tmpdir)
podmanTest.Setup()
podmanTest.RestoreArtifact(fedoraMinimal) podmanTest.RestoreArtifact(fedoraMinimal)
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
Specify("signals are forwarded to container using sig-proxy", func() { Specify("signals are forwarded to container using sig-proxy", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,6 +23,7 @@ var _ = Describe("Podman run with --ip flag", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
// Cleanup the CNI networks used by the tests // Cleanup the CNI networks used by the tests
os.RemoveAll("/var/lib/cni/networks/podman") os.RemoveAll("/var/lib/cni/networks/podman")
@ -32,8 +32,8 @@ var _ = Describe("Podman run with --ip flag", func() {
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("Podman run --ip with garbage address", func() { It("Podman run --ip with garbage address", func() {

View File

@ -29,14 +29,15 @@ var _ = Describe("Podman run", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman run a container based on local image", func() { It("podman run a container based on local image", func() {

View File

@ -5,7 +5,6 @@ package integration
import ( import (
"os" "os"
"fmt"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
. "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo"
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
@ -24,14 +23,15 @@ var _ = Describe("Podman UserNS support", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman uidmapping and gidmapping", func() { It("podman uidmapping and gidmapping", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -32,14 +31,14 @@ var _ = Describe("podman container runlabel", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })

View File

@ -1,7 +1,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
"path/filepath" "path/filepath"
@ -23,14 +22,15 @@ var _ = Describe("Podman save", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman save output flag", func() { It("podman save output flag", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
"strconv" "strconv"
@ -44,14 +43,15 @@ var _ = Describe("Podman search", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman search", func() { It("podman search", func() {
@ -134,6 +134,9 @@ var _ = Describe("Podman search", func() {
if podmanTest.Host.Arch == "ppc64le" { if podmanTest.Host.Arch == "ppc64le" {
Skip("No registry image for ppc64le") Skip("No registry image for ppc64le")
} }
lock := GetPortLock("5000")
defer lock.Unlock()
podmanTest.RestoreArtifact(registry) podmanTest.RestoreArtifact(registry)
fakereg := podmanTest.Podman([]string{"run", "-d", "--name", "registry", "-p", "5000:5000", registry, "/entrypoint.sh", "/etc/docker/registry/config.yml"}) fakereg := podmanTest.Podman([]string{"run", "-d", "--name", "registry", "-p", "5000:5000", registry, "/entrypoint.sh", "/etc/docker/registry/config.yml"})
fakereg.WaitWithDefaultTimeout() fakereg.WaitWithDefaultTimeout()
@ -157,6 +160,8 @@ var _ = Describe("Podman search", func() {
if podmanTest.Host.Arch == "ppc64le" { if podmanTest.Host.Arch == "ppc64le" {
Skip("No registry image for ppc64le") Skip("No registry image for ppc64le")
} }
lock := GetPortLock("5000")
defer lock.Unlock()
podmanTest.RestoreArtifact(registry) podmanTest.RestoreArtifact(registry)
registry := podmanTest.Podman([]string{"run", "-d", "--name", "registry3", "-p", "5000:5000", registry, "/entrypoint.sh", "/etc/docker/registry/config.yml"}) registry := podmanTest.Podman([]string{"run", "-d", "--name", "registry3", "-p", "5000:5000", registry, "/entrypoint.sh", "/etc/docker/registry/config.yml"})
registry.WaitWithDefaultTimeout() registry.WaitWithDefaultTimeout()
@ -180,6 +185,8 @@ var _ = Describe("Podman search", func() {
if podmanTest.Host.Arch == "ppc64le" { if podmanTest.Host.Arch == "ppc64le" {
Skip("No registry image for ppc64le") Skip("No registry image for ppc64le")
} }
lock := GetPortLock("5000")
defer lock.Unlock()
podmanTest.RestoreArtifact(registry) podmanTest.RestoreArtifact(registry)
registry := podmanTest.Podman([]string{"run", "-d", "--name", "registry4", "-p", "5000:5000", registry, "/entrypoint.sh", "/etc/docker/registry/config.yml"}) registry := podmanTest.Podman([]string{"run", "-d", "--name", "registry4", "-p", "5000:5000", registry, "/entrypoint.sh", "/etc/docker/registry/config.yml"})
registry.WaitWithDefaultTimeout() registry.WaitWithDefaultTimeout()
@ -212,6 +219,8 @@ var _ = Describe("Podman search", func() {
if podmanTest.Host.Arch == "ppc64le" { if podmanTest.Host.Arch == "ppc64le" {
Skip("No registry image for ppc64le") Skip("No registry image for ppc64le")
} }
lock := GetPortLock("5000")
defer lock.Unlock()
podmanTest.RestoreArtifact(registry) podmanTest.RestoreArtifact(registry)
registry := podmanTest.Podman([]string{"run", "-d", "-p", "5000:5000", "--name", "registry5", registry}) registry := podmanTest.Podman([]string{"run", "-d", "-p", "5000:5000", "--name", "registry5", registry})
registry.WaitWithDefaultTimeout() registry.WaitWithDefaultTimeout()
@ -243,6 +252,8 @@ var _ = Describe("Podman search", func() {
if podmanTest.Host.Arch == "ppc64le" { if podmanTest.Host.Arch == "ppc64le" {
Skip("No registry image for ppc64le") Skip("No registry image for ppc64le")
} }
lock := GetPortLock("5000")
defer lock.Unlock()
podmanTest.RestoreArtifact(registry) podmanTest.RestoreArtifact(registry)
registry := podmanTest.Podman([]string{"run", "-d", "-p", "5000:5000", "--name", "registry6", registry}) registry := podmanTest.Podman([]string{"run", "-d", "-p", "5000:5000", "--name", "registry6", registry})
registry.WaitWithDefaultTimeout() registry.WaitWithDefaultTimeout()
@ -274,6 +285,8 @@ var _ = Describe("Podman search", func() {
if podmanTest.Host.Arch == "ppc64le" { if podmanTest.Host.Arch == "ppc64le" {
Skip("No registry image for ppc64le") Skip("No registry image for ppc64le")
} }
lock := GetPortLock("5000")
defer lock.Unlock()
podmanTest.RestoreArtifact(registry) podmanTest.RestoreArtifact(registry)
registryLocal := podmanTest.Podman([]string{"run", "-d", "-p", "5000:5000", "--name", "registry7", registry}) registryLocal := podmanTest.Podman([]string{"run", "-d", "-p", "5000:5000", "--name", "registry7", registry})
registryLocal.WaitWithDefaultTimeout() registryLocal.WaitWithDefaultTimeout()

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,14 +23,15 @@ var _ = Describe("Podman start", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman start bogus container", func() { It("podman start bogus container", func() {

View File

@ -24,14 +24,15 @@ var _ = Describe("Podman stats", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman stats with bogus container", func() { It("podman stats with bogus container", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,14 +23,15 @@ var _ = Describe("Podman stop", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman stop bogus container", func() { It("podman stop bogus container", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"io/ioutil" "io/ioutil"
"os" "os"
@ -26,6 +25,7 @@ var _ = Describe("Podman systemd", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
systemd_unit_file = `[Unit] systemd_unit_file = `[Unit]
Description=redis container Description=redis container
@ -42,8 +42,8 @@ WantedBy=multi-user.target
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman start container by systemd", func() { It("podman start container by systemd", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,14 +23,15 @@ var _ = Describe("Podman tag", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman tag shortname:latest", func() { It("podman tag shortname:latest", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,14 +23,15 @@ var _ = Describe("Podman top", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman top without container name or id", func() { It("podman top without container name or id", func() {

View File

@ -4,7 +4,6 @@ package integration
import ( import (
"encoding/json" "encoding/json"
"fmt"
"io/ioutil" "io/ioutil"
"os" "os"
"path/filepath" "path/filepath"
@ -27,14 +26,15 @@ var _ = Describe("Podman trust", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman image trust show", func() { It("podman image trust show", func() {

View File

@ -1,7 +1,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -27,8 +26,8 @@ var _ = Describe("Podman version", func() {
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman version", func() { It("podman version", func() {

View File

@ -1,7 +1,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -22,14 +21,15 @@ var _ = Describe("Podman volume create", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.CleanupVolume() podmanTest.CleanupVolume()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman create volume", func() { It("podman create volume", func() {

View File

@ -1,7 +1,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -22,14 +21,15 @@ var _ = Describe("Podman volume inspect", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.CleanupVolume() podmanTest.CleanupVolume()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman inspect volume", func() { It("podman inspect volume", func() {

View File

@ -1,7 +1,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -22,14 +21,15 @@ var _ = Describe("Podman volume ls", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.CleanupVolume() podmanTest.CleanupVolume()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman ls volume", func() { It("podman ls volume", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,14 +23,15 @@ var _ = Describe("Podman volume prune", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.CleanupVolume() podmanTest.CleanupVolume()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman prune volume", func() { It("podman prune volume", func() {

View File

@ -1,7 +1,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -22,14 +21,15 @@ var _ = Describe("Podman volume rm", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.CleanupVolume() podmanTest.CleanupVolume()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman rm volume", func() { It("podman rm volume", func() {

View File

@ -3,7 +3,6 @@
package integration package integration
import ( import (
"fmt"
"os" "os"
. "github.com/containers/libpod/test/utils" . "github.com/containers/libpod/test/utils"
@ -24,14 +23,15 @@ var _ = Describe("Podman wait", func() {
os.Exit(1) os.Exit(1)
} }
podmanTest = PodmanTestCreate(tempdir) podmanTest = PodmanTestCreate(tempdir)
podmanTest.Setup()
podmanTest.RestoreAllArtifacts() podmanTest.RestoreAllArtifacts()
}) })
AfterEach(func() { AfterEach(func() {
podmanTest.Cleanup() podmanTest.Cleanup()
f := CurrentGinkgoTestDescription() f := CurrentGinkgoTestDescription()
timedResult := fmt.Sprintf("Test: %s completed in %f seconds", f.TestText, f.Duration.Seconds()) processTestResult(f)
GinkgoWriter.Write([]byte(timedResult))
}) })
It("podman wait on bogus container", func() { It("podman wait on bogus container", func() {