summaryrefslogtreecommitdiffstats
path: root/tests/roles/cli/tasks/inspect.yaml
diff options
context:
space:
mode:
authorGuohua Ouyang <gouyang@redhat.com>2018-04-19 21:43:06 +0800
committerGuohua Ouyang <gouyang@redhat.com>2018-04-19 21:43:06 +0800
commit619163f3a6ef9c19a644bd314382b0ff6edbddbc (patch)
treeb620ef957f3ccf2de3c3e60a2165244707ccdf0f /tests/roles/cli/tasks/inspect.yaml
parent4770dbb8bf1af8c6a58c2cc154838bc613d939e4 (diff)
downloadbuildah-master.tar.gz
buildah-master.tar.xz
buildah-master.zip
Sync new tests from upstreamfirstHEADmaster
* the tests is quite old since it moved from upstreamfirst * lots of new cases are added, like option 'run', 'inspect' etc * save log to TEST_ARTIFACTS when the variable is set * always run tests with latest runc built from source Signed-off-by: Guohua Ouyang <gouyang@redhat.com>
Diffstat (limited to 'tests/roles/cli/tasks/inspect.yaml')
-rw-r--r--tests/roles/cli/tasks/inspect.yaml25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/roles/cli/tasks/inspect.yaml b/tests/roles/cli/tasks/inspect.yaml
new file mode 100644
index 0000000..d1d8024
--- /dev/null
+++ b/tests/roles/cli/tasks/inspect.yaml
@@ -0,0 +1,25 @@
+---
+- name: buildah inspect an image by name
+ command: buildah inspect docker.io/library/nginx:latest
+
+- name: get image ID
+ command: buildah images -q docker.io/library/nginx:latest
+ register: imgid
+
+- name: buildah inspect an image by ID
+ command: buildah inspect --type image {{ imgid.stdout }}
+
+- name: buildah inspect image with format
+ command: buildah inspect -t image -f {% raw %}'{{ .FromImageID }}'{% endraw %} {{ imgid.stdout }}
+ register: inspectid
+ failed_when: 'inspectid.stdout != imgid.stdout'
+
+- name: buildah inspect container by name
+ command: buildah inspect -t container nginxc-2
+
+- name: buildah inspect container with format
+ shell: buildah inspect -f {% raw %}'{{ .ContainerID }}'{% endraw %} nginxc-2
+ register: inspectcid
+
+- name: buildah inspect container by ID
+ command: buildah inspect {{ inspectcid.stdout }}