aboutsummaryrefslogtreecommitdiff
path: root/test/compose/mount_and_label
diff options
context:
space:
mode:
Diffstat (limited to 'test/compose/mount_and_label')
-rw-r--r--test/compose/mount_and_label/README.md9
-rw-r--r--test/compose/mount_and_label/docker-compose.yml2
-rw-r--r--test/compose/mount_and_label/frontend/Dockerfile2
-rw-r--r--test/compose/mount_and_label/readme.txt5
-rw-r--r--test/compose/mount_and_label/setup.sh2
-rw-r--r--test/compose/mount_and_label/teardown.sh1
-rw-r--r--test/compose/mount_and_label/tests.sh4
7 files changed, 18 insertions, 7 deletions
diff --git a/test/compose/mount_and_label/README.md b/test/compose/mount_and_label/README.md
new file mode 100644
index 000000000..623b38cac
--- /dev/null
+++ b/test/compose/mount_and_label/README.md
@@ -0,0 +1,9 @@
+mount and label
+===============
+
+This test creates a container with a mount (not volume) and also adds a label to the container.
+
+Validation
+------------
+* curl http://localhost:5000 and verify message
+* inspect the container to make the label exists on it
diff --git a/test/compose/mount_and_label/docker-compose.yml b/test/compose/mount_and_label/docker-compose.yml
index 6487067e3..112d7e134 100644
--- a/test/compose/mount_and_label/docker-compose.yml
+++ b/test/compose/mount_and_label/docker-compose.yml
@@ -5,6 +5,6 @@ services:
ports:
- '5000:5000'
volumes:
- - /tmp/mount:/data:ro
+ - /tmp/data:/data:ro
labels:
- "io.podman=the_best"
diff --git a/test/compose/mount_and_label/frontend/Dockerfile b/test/compose/mount_and_label/frontend/Dockerfile
index a393a0dcb..8d5c45401 100644
--- a/test/compose/mount_and_label/frontend/Dockerfile
+++ b/test/compose/mount_and_label/frontend/Dockerfile
@@ -1,4 +1,4 @@
-FROM podman_python
+FROM quay.io/libpod/podman_python
WORKDIR /app
COPY . /app
ENTRYPOINT ["python3"]
diff --git a/test/compose/mount_and_label/readme.txt b/test/compose/mount_and_label/readme.txt
deleted file mode 100644
index bba769c51..000000000
--- a/test/compose/mount_and_label/readme.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-this test creates a container with a mount (not volume) and also adds a label to the container.
-
-validate by curl http://localhost:5000 and message should be same message as piped into the mount message.
-
-also verify the label with podman ps and a filter that only catches that container
diff --git a/test/compose/mount_and_label/setup.sh b/test/compose/mount_and_label/setup.sh
new file mode 100644
index 000000000..8633d65d5
--- /dev/null
+++ b/test/compose/mount_and_label/setup.sh
@@ -0,0 +1,2 @@
+mkdir -p /tmp/data
+echo "Podman rulez!" > /tmp/data/message
diff --git a/test/compose/mount_and_label/teardown.sh b/test/compose/mount_and_label/teardown.sh
new file mode 100644
index 000000000..57867c28a
--- /dev/null
+++ b/test/compose/mount_and_label/teardown.sh
@@ -0,0 +1 @@
+rm /tmp/data/message
diff --git a/test/compose/mount_and_label/tests.sh b/test/compose/mount_and_label/tests.sh
new file mode 100644
index 000000000..07ff089b5
--- /dev/null
+++ b/test/compose/mount_and_label/tests.sh
@@ -0,0 +1,4 @@
+# -*- bash -*-
+
+test_port 5000 = "Podman rulez!"
+podman container inspect -l --format '{{.Config.Labels}}' | grep "the_best"