summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/apiv2/01-basic.at14
-rw-r--r--test/e2e/logs_test.go20
2 files changed, 26 insertions, 8 deletions
diff --git a/test/apiv2/01-basic.at b/test/apiv2/01-basic.at
index 0e94ddb7a..18ec9bbe8 100644
--- a/test/apiv2/01-basic.at
+++ b/test/apiv2/01-basic.at
@@ -10,13 +10,13 @@ t HEAD /_ping 200
t GET /libpod/_ping 200 OK
for i in /version version; do
- t GET $i 200 \
- .Components[0].Name="Podman Engine" \
- .Components[0].Details.APIVersion=1.40 \
- .Components[0].Details.MinAPIVersion=1.24 \
- .Components[0].Details.Os=linux \
- .ApiVersion=1.40 \
- .MinAPIVersion=1.24 \
+ t GET $i 200 \
+ .Components[0].Name="Podman Engine" \
+ .Components[0].Details.APIVersion=1.0.0 \
+ .Components[0].Details.MinAPIVersion=1.0.0 \
+ .Components[0].Details.Os=linux \
+ .ApiVersion=1.0.0 \
+ .MinAPIVersion=1.0.0 \
.Os=linux
done
diff --git a/test/e2e/logs_test.go b/test/e2e/logs_test.go
index 8417051f0..8924db670 100644
--- a/test/e2e/logs_test.go
+++ b/test/e2e/logs_test.go
@@ -19,7 +19,7 @@ var _ = Describe("Podman logs", func() {
)
BeforeEach(func() {
- Skip(v2remotefail)
+ SkipIfRemote() // v2remotefail
tempdir, err = CreateTempDirInTempDir()
if err != nil {
os.Exit(1)
@@ -173,6 +173,24 @@ var _ = Describe("Podman logs", func() {
Expect(string(out)).To(ContainSubstring("alpine"))
})
+ It("podman journald logs for container name", func() {
+ Skip("need to verify images have correct packages for journald")
+ containerName := "inside-journal"
+ logc := podmanTest.Podman([]string{"run", "--log-driver", "journald", "-d", "--name", containerName, ALPINE, "sh", "-c", "echo podman; sleep 0.1; echo podman; sleep 0.1; echo podman"})
+ logc.WaitWithDefaultTimeout()
+ Expect(logc.ExitCode()).To(Equal(0))
+ cid := logc.OutputToString()
+
+ wait := podmanTest.Podman([]string{"wait", "-l"})
+ wait.WaitWithDefaultTimeout()
+ Expect(wait.ExitCode()).To(BeZero())
+
+ cmd := exec.Command("journalctl", "--no-pager", "-o", "json", "--output-fields=CONTAINER_NAME", "-u", fmt.Sprintf("libpod-conmon-%s.scope", cid))
+ out, err := cmd.CombinedOutput()
+ Expect(err).To(BeNil())
+ Expect(string(out)).To(ContainSubstring(containerName))
+ })
+
It("podman journald logs for container", func() {
Skip("need to verify images have correct packages for journald")
logc := podmanTest.Podman([]string{"run", "--log-driver", "journald", "-dt", ALPINE, "sh", "-c", "echo podman; echo podman; echo podman"})