summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/apiv2/python/rest_api/test_v2_0_0_image.py5
-rw-r--r--test/e2e/logs_test.go14
2 files changed, 13 insertions, 6 deletions
diff --git a/test/apiv2/python/rest_api/test_v2_0_0_image.py b/test/apiv2/python/rest_api/test_v2_0_0_image.py
index 243b1d5f5..2cd7bfa96 100644
--- a/test/apiv2/python/rest_api/test_v2_0_0_image.py
+++ b/test/apiv2/python/rest_api/test_v2_0_0_image.py
@@ -86,6 +86,11 @@ class ImageTestCase(APITestCase):
self.assertTrue(keys["id"], "Expected to find id stanza")
self.assertTrue(keys["images"], "Expected to find images stanza")
self.assertTrue(keys["stream"], "Expected to find stream progress stanza's")
+ def test_create(self):
+ r = requests.post(self.podman_url + "/v1.40/images/create?fromImage=alpine&platform=linux/amd64/v8", timeout=15)
+ self.assertEqual(r.status_code, 200, r.text)
+ r = requests.post(self.podman_url + "/v1.40/images/create?fromSrc=-&repo=fedora&message=testing123", timeout=15)
+ self.assertEqual(r.status_code, 200, r.text)
def test_search_compat(self):
url = self.podman_url + "/v1.40/images/search"
diff --git a/test/e2e/logs_test.go b/test/e2e/logs_test.go
index 4d9cbb48b..b576fa072 100644
--- a/test/e2e/logs_test.go
+++ b/test/e2e/logs_test.go
@@ -173,9 +173,9 @@ var _ = Describe("Podman logs", func() {
})
It("streaming output: "+log, func() {
- containerName := "logs-f-rm"
+ containerName := "logs-f"
- logc := podmanTest.Podman([]string{"run", "--log-driver", log, "--rm", "--name", containerName, "-dt", ALPINE, "sh", "-c", "echo podman; sleep 1; echo podman"})
+ logc := podmanTest.Podman([]string{"run", "--log-driver", log, "--name", containerName, "-dt", ALPINE, "sh", "-c", "echo podman-1; sleep 1; echo podman-2"})
logc.WaitWithDefaultTimeout()
Expect(logc).To(Exit(0))
@@ -183,10 +183,8 @@ var _ = Describe("Podman logs", func() {
results.WaitWithDefaultTimeout()
Expect(results).To(Exit(0))
- // TODO: we should actually check for two podman lines,
- // but as of 2020-06-17 there's a race condition in which
- // 'logs -f' may not catch all output from a container
- Expect(results.OutputToString()).To(ContainSubstring("podman"))
+ Expect(results.OutputToString()).To(ContainSubstring("podman-1"))
+ Expect(results.OutputToString()).To(ContainSubstring("podman-2"))
// Container should now be terminatING or terminatED, but we
// have no guarantee of which: 'logs -f' does not necessarily
@@ -199,6 +197,10 @@ var _ = Describe("Podman logs", func() {
} else {
Expect(inspect.ErrorToString()).To(ContainSubstring("no such container"))
}
+
+ results = podmanTest.Podman([]string{"rm", "-f", containerName})
+ results.WaitWithDefaultTimeout()
+ Expect(results).To(Exit(0))
})
It("follow output stopped container: "+log, func() {