summaryrefslogtreecommitdiff
path: root/test/e2e
diff options
context:
space:
mode:
Diffstat (limited to 'test/e2e')
-rw-r--r--test/e2e/commit_test.go6
-rw-r--r--test/e2e/generate_kube_test.go16
-rw-r--r--test/e2e/tag_test.go12
3 files changed, 17 insertions, 17 deletions
diff --git a/test/e2e/commit_test.go b/test/e2e/commit_test.go
index d40faf54b..20e1360de 100644
--- a/test/e2e/commit_test.go
+++ b/test/e2e/commit_test.go
@@ -47,7 +47,7 @@ var _ = Describe("Podman commit", func() {
check := podmanTest.Podman([]string{"inspect", "foobar.com/test1-image:latest"})
check.WaitWithDefaultTimeout()
data := check.InspectImageJSON()
- Expect(StringInSlice("foobar.com/test1-image:latest", data[0].RepoTags)).To(BeTrue())
+ Expect(data[0].RepoTags).To(ContainElement("foobar.com/test1-image:latest"))
})
It("podman commit single letter container", func() {
@@ -62,7 +62,7 @@ var _ = Describe("Podman commit", func() {
check := podmanTest.Podman([]string{"inspect", "localhost/a:latest"})
check.WaitWithDefaultTimeout()
data := check.InspectImageJSON()
- Expect(StringInSlice("localhost/a:latest", data[0].RepoTags)).To(BeTrue())
+ Expect(data[0].RepoTags).To(ContainElement("localhost/a:latest"))
})
It("podman container commit container", func() {
@@ -77,7 +77,7 @@ var _ = Describe("Podman commit", func() {
check := podmanTest.Podman([]string{"image", "inspect", "foobar.com/test1-image:latest"})
check.WaitWithDefaultTimeout()
data := check.InspectImageJSON()
- Expect(StringInSlice("foobar.com/test1-image:latest", data[0].RepoTags)).To(BeTrue())
+ Expect(data[0].RepoTags).To(ContainElement("foobar.com/test1-image:latest"))
})
It("podman commit container with message", func() {
diff --git a/test/e2e/generate_kube_test.go b/test/e2e/generate_kube_test.go
index d95555068..a148025e5 100644
--- a/test/e2e/generate_kube_test.go
+++ b/test/e2e/generate_kube_test.go
@@ -775,8 +775,8 @@ var _ = Describe("Podman generate kube", func() {
err := yaml.Unmarshal(kube.Out.Contents(), pod)
Expect(err).To(BeNil())
- Expect(StringInSlice("8.8.8.8", pod.Spec.DNSConfig.Nameservers)).To(BeTrue())
- Expect(StringInSlice("foobar.com", pod.Spec.DNSConfig.Searches)).To(BeTrue())
+ Expect(pod.Spec.DNSConfig.Nameservers).To(ContainElement("8.8.8.8"))
+ Expect(pod.Spec.DNSConfig.Searches).To(ContainElement("foobar.com"))
Expect(len(pod.Spec.DNSConfig.Options)).To(BeNumerically(">", 0))
Expect(pod.Spec.DNSConfig.Options[0].Name).To(Equal("color"))
Expect(*pod.Spec.DNSConfig.Options[0].Value).To(Equal("blue"))
@@ -799,10 +799,10 @@ var _ = Describe("Podman generate kube", func() {
err := yaml.Unmarshal(kube.Out.Contents(), pod)
Expect(err).To(BeNil())
- Expect(StringInSlice("8.8.8.8", pod.Spec.DNSConfig.Nameservers)).To(BeTrue())
- Expect(StringInSlice("8.7.7.7", pod.Spec.DNSConfig.Nameservers)).To(BeTrue())
- Expect(StringInSlice("foobar.com", pod.Spec.DNSConfig.Searches)).To(BeTrue())
- Expect(StringInSlice("homer.com", pod.Spec.DNSConfig.Searches)).To(BeTrue())
+ Expect(pod.Spec.DNSConfig.Nameservers).To(ContainElement("8.8.8.8"))
+ Expect(pod.Spec.DNSConfig.Nameservers).To(ContainElement("8.7.7.7"))
+ Expect(pod.Spec.DNSConfig.Searches).To(ContainElement("foobar.com"))
+ Expect(pod.Spec.DNSConfig.Searches).To(ContainElement("homer.com"))
})
It("podman generate kube on a pod with dns options", func() {
@@ -818,8 +818,8 @@ var _ = Describe("Podman generate kube", func() {
err := yaml.Unmarshal(kube.Out.Contents(), pod)
Expect(err).To(BeNil())
- Expect(StringInSlice("8.8.8.8", pod.Spec.DNSConfig.Nameservers)).To(BeTrue())
- Expect(StringInSlice("foobar.com", pod.Spec.DNSConfig.Searches)).To(BeTrue())
+ Expect(pod.Spec.DNSConfig.Nameservers).To(ContainElement("8.8.8.8"))
+ Expect(pod.Spec.DNSConfig.Searches).To(ContainElement("foobar.com"))
Expect(len(pod.Spec.DNSConfig.Options)).To(BeNumerically(">", 0))
Expect(pod.Spec.DNSConfig.Options[0].Name).To(Equal("color"))
Expect(*pod.Spec.DNSConfig.Options[0].Value).To(Equal("blue"))
diff --git a/test/e2e/tag_test.go b/test/e2e/tag_test.go
index b835d3776..743f58ea2 100644
--- a/test/e2e/tag_test.go
+++ b/test/e2e/tag_test.go
@@ -42,8 +42,8 @@ var _ = Describe("Podman tag", func() {
results.WaitWithDefaultTimeout()
Expect(results).Should(Exit(0))
inspectData := results.InspectImageJSON()
- Expect(StringInSlice("quay.io/libpod/alpine:latest", inspectData[0].RepoTags)).To(BeTrue())
- Expect(StringInSlice("localhost/foobar:latest", inspectData[0].RepoTags)).To(BeTrue())
+ Expect(inspectData[0].RepoTags).To(ContainElement("quay.io/libpod/alpine:latest"))
+ Expect(inspectData[0].RepoTags).To(ContainElement("localhost/foobar:latest"))
})
It("podman tag shortname", func() {
@@ -55,8 +55,8 @@ var _ = Describe("Podman tag", func() {
results.WaitWithDefaultTimeout()
Expect(results).Should(Exit(0))
inspectData := results.InspectImageJSON()
- Expect(StringInSlice("quay.io/libpod/alpine:latest", inspectData[0].RepoTags)).To(BeTrue())
- Expect(StringInSlice("localhost/foobar:latest", inspectData[0].RepoTags)).To(BeTrue())
+ Expect(inspectData[0].RepoTags).To(ContainElement("quay.io/libpod/alpine:latest"))
+ Expect(inspectData[0].RepoTags).To(ContainElement("localhost/foobar:latest"))
})
It("podman tag shortname:tag", func() {
@@ -68,8 +68,8 @@ var _ = Describe("Podman tag", func() {
results.WaitWithDefaultTimeout()
Expect(results).Should(Exit(0))
inspectData := results.InspectImageJSON()
- Expect(StringInSlice("quay.io/libpod/alpine:latest", inspectData[0].RepoTags)).To(BeTrue())
- Expect(StringInSlice("localhost/foobar:new", inspectData[0].RepoTags)).To(BeTrue())
+ Expect(inspectData[0].RepoTags).To(ContainElement("quay.io/libpod/alpine:latest"))
+ Expect(inspectData[0].RepoTags).To(ContainElement("localhost/foobar:new"))
})
It("podman tag shortname image no tag", func() {