summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAnsible Core Team <info@ansible.com>2020-03-09 09:40:26 +0000
committerAnsible Core Team <info@ansible.com>2020-03-09 09:40:26 +0000
commit29ae7a227426a46250a232a5f05d6cc62e9299d6 (patch)
tree39c134f62c89e5805007d24df627dff94778c218 /test
parenta5cf62599d75e339734ab23ca30e387c7b4401ec (diff)
downloadansible-29ae7a227426a46250a232a5f05d6cc62e9299d6.tar.gz
Migrated to containers.podman
Diffstat (limited to 'test')
-rw-r--r--test/integration/targets/connection_buildah/aliases3
l---------test/integration/targets/connection_buildah/posix.sh1
-rwxr-xr-xtest/integration/targets/connection_buildah/runme.sh7
-rw-r--r--test/integration/targets/connection_buildah/test_connection.inventory12
-rw-r--r--test/integration/targets/connection_podman/aliases2
l---------test/integration/targets/connection_podman/posix.sh1
-rwxr-xr-xtest/integration/targets/connection_podman/runme.sh14
-rw-r--r--test/integration/targets/connection_podman/test_connection.inventory15
-rw-r--r--test/integration/targets/podman_container_info/aliases5
-rw-r--r--test/integration/targets/podman_container_info/meta/main.yml2
-rw-r--r--test/integration/targets/podman_container_info/tasks/main.yml91
-rw-r--r--test/integration/targets/podman_image/aliases5
-rw-r--r--test/integration/targets/podman_image/files/Containerfile3
-rw-r--r--test/integration/targets/podman_image/meta/main.yml2
-rw-r--r--test/integration/targets/podman_image/tasks/main.yml144
-rw-r--r--test/integration/targets/podman_image_info/aliases5
-rw-r--r--test/integration/targets/podman_image_info/meta/main.yml2
-rw-r--r--test/integration/targets/podman_image_info/tasks/main.yml53
-rw-r--r--test/integration/targets/podman_volume_info/aliases5
-rw-r--r--test/integration/targets/podman_volume_info/meta/main.yml2
-rw-r--r--test/integration/targets/podman_volume_info/tasks/main.yml62
-rw-r--r--test/integration/targets/setup_podman/defaults/main.yml1
-rw-r--r--test/integration/targets/setup_podman/handlers/main.yml9
-rw-r--r--test/integration/targets/setup_podman/tasks/main.yml19
-rw-r--r--test/integration/targets/setup_podman/vars/main.yml4
-rw-r--r--test/sanity/ignore.txt7
26 files changed, 0 insertions, 476 deletions
diff --git a/test/integration/targets/connection_buildah/aliases b/test/integration/targets/connection_buildah/aliases
deleted file mode 100644
index 3f0abcf972..0000000000
--- a/test/integration/targets/connection_buildah/aliases
+++ /dev/null
@@ -1,3 +0,0 @@
-needs/root
-non_local
-unsupported
diff --git a/test/integration/targets/connection_buildah/posix.sh b/test/integration/targets/connection_buildah/posix.sh
deleted file mode 120000
index 70aa5dbdba..0000000000
--- a/test/integration/targets/connection_buildah/posix.sh
+++ /dev/null
@@ -1 +0,0 @@
-../connection_posix/test.sh \ No newline at end of file
diff --git a/test/integration/targets/connection_buildah/runme.sh b/test/integration/targets/connection_buildah/runme.sh
deleted file mode 100755
index 09902adc18..0000000000
--- a/test/integration/targets/connection_buildah/runme.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/usr/bin/env bash
-
-set -eux
-
-./posix.sh "$@"
-
-ANSIBLE_REMOTE_USER="1000" ./posix.sh "$@"
diff --git a/test/integration/targets/connection_buildah/test_connection.inventory b/test/integration/targets/connection_buildah/test_connection.inventory
deleted file mode 100644
index 1c3d8714b3..0000000000
--- a/test/integration/targets/connection_buildah/test_connection.inventory
+++ /dev/null
@@ -1,12 +0,0 @@
-[buildah]
-buildah-container ansible_ssh_pipelining=true
-[buildah:vars]
-# 1. install buildah
-# 2. create container:
-# $ sudo buildah from --name=buildah-container python:2
-# 3. run test:
-# $ ansible-test integration connection_buildah
-# 6. remove container
-# $ sudo buildah rm buildah-container
-ansible_host=buildah-container
-ansible_connection=buildah
diff --git a/test/integration/targets/connection_podman/aliases b/test/integration/targets/connection_podman/aliases
deleted file mode 100644
index 33b258daef..0000000000
--- a/test/integration/targets/connection_podman/aliases
+++ /dev/null
@@ -1,2 +0,0 @@
-non_local
-unsupported
diff --git a/test/integration/targets/connection_podman/posix.sh b/test/integration/targets/connection_podman/posix.sh
deleted file mode 120000
index 70aa5dbdba..0000000000
--- a/test/integration/targets/connection_podman/posix.sh
+++ /dev/null
@@ -1 +0,0 @@
-../connection_posix/test.sh \ No newline at end of file
diff --git a/test/integration/targets/connection_podman/runme.sh b/test/integration/targets/connection_podman/runme.sh
deleted file mode 100755
index 36dfefc4b4..0000000000
--- a/test/integration/targets/connection_podman/runme.sh
+++ /dev/null
@@ -1,14 +0,0 @@
-#!/usr/bin/env bash
-
-set -eux
-
-./posix.sh "$@"
-
-ANSIBLE_REMOTE_TMP="/tmp" ANSIBLE_REMOTE_USER="1000" ./posix.sh "$@"
-ANSIBLE_PODMAN_EXECUTABLE=fakepodman ./posix.sh "$@" 2>&1 | grep "fakepodman command not found in PATH"
-
-ANSIBLE_PODMAN_EXECUTABLE=fakepodman ./posix.sh "$@" && {
- echo "Playbook with fakepodman should fail!"
- exit 1
-}
-ANSIBLE_VERBOSITY=4 ANSIBLE_PODMAN_EXTRA_ARGS=" --log-level debug " ./posix.sh "$@" | grep "level=debug msg="
diff --git a/test/integration/targets/connection_podman/test_connection.inventory b/test/integration/targets/connection_podman/test_connection.inventory
deleted file mode 100644
index 04c5bcae95..0000000000
--- a/test/integration/targets/connection_podman/test_connection.inventory
+++ /dev/null
@@ -1,15 +0,0 @@
-[podman]
-podman-container
-[podman:vars]
-# 1. install podman
-# 2. create container:
-# podman pull python:3-alpine
-# podman run -d --name podman-container python:3-alpine sleep 999999
-# 3. run test:
-# ./bin/ansible-test integration connection_podman
-# 6. remove container
-# podman stop podman-container
-# podman rm podman-container
-ansible_host=podman-container
-ansible_connection=podman
-ansible_python_interpreter=/usr/local/bin/python
diff --git a/test/integration/targets/podman_container_info/aliases b/test/integration/targets/podman_container_info/aliases
deleted file mode 100644
index 7a020910ed..0000000000
--- a/test/integration/targets/podman_container_info/aliases
+++ /dev/null
@@ -1,5 +0,0 @@
-shippable/posix/group2
-skip/aix
-skip/osx
-skip/freebsd
-destructive
diff --git a/test/integration/targets/podman_container_info/meta/main.yml b/test/integration/targets/podman_container_info/meta/main.yml
deleted file mode 100644
index f5140043a8..0000000000
--- a/test/integration/targets/podman_container_info/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - setup_podman
diff --git a/test/integration/targets/podman_container_info/tasks/main.yml b/test/integration/targets/podman_container_info/tasks/main.yml
deleted file mode 100644
index c361faeaf6..0000000000
--- a/test/integration/targets/podman_container_info/tasks/main.yml
+++ /dev/null
@@ -1,91 +0,0 @@
-- name: Test podman_container_info
- when:
- - ansible_facts.virtualization_type != 'docker'
- - ansible_facts.distribution == 'RedHat'
- block:
-
- - name: Generate random value for container name
- set_fact:
- container_name: "{{ 'ansible-test-podman-%0x' % ((2**32) | random) }}"
-
- - name: Make sure container doesn't exist
- command: podman container rm -f {{ container_name }}
- ignore_errors: true
-
- - name: Get missing container info
- podman_container_info:
- name: "{{ container_name }}"
- register: nonexist
-
- - name: Check results of missing container info
- assert:
- that:
- - "'containers' in nonexist"
- - nonexist is succeeded
- - nonexist.containers == []
-
- - name: Get missing multiple container info
- podman_container_info:
- name:
- - "{{ container_name }}"
- - neverexist
- - whatever
- register: nonexist2
- ignore_errors: true
-
- - name: Check results of missing multiple container info
- assert:
- that:
- - "'containers' in nonexist2"
- - nonexist2 is succeeded
- - nonexist2.containers == []
-
- - name: Make sure container exists
- command: podman container run -d --name {{ container_name }} alpine sleep 15m
-
- - name: Get existing container info
- podman_container_info:
- name: "{{ container_name }}"
- register: existing_container
-
- - name: Get mixed existing and non-existing container info
- podman_container_info:
- name:
- - "{{ container_name }}"
- - whatever
- register: mixed_existing_container
-
- - name: Get all containers info
- podman_container_info:
- register: all_containers
-
- - name: Dump podman container inspect result
- debug: var=existing_container
-
- - name: Comparison with 'podman container inspect'
- command: podman container inspect "{{ container_name }}"
- register: podman_inspect
-
- - name: Convert podman inspect output to JSON
- set_fact:
- podman_inspect_result: "{{ podman_inspect.stdout | from_json }}"
-
- - name: Cleanup
- command: podman container rm -f {{ container_name }}
-
- - name: Make checks
- assert:
- that:
- - "'containers' in existing_container"
- - existing_container.containers
- - "existing_container.containers == podman_inspect_result"
- - all_containers.containers == existing_container.containers
- - "'containers' in mixed_existing_container"
- - mixed_existing_container.containers
- - existing_container.containers == mixed_existing_container.containers
-
- always:
-
- - name: Cleanup
- command: podman container rm -f {{ container_name }}
- ignore_errors: true
diff --git a/test/integration/targets/podman_image/aliases b/test/integration/targets/podman_image/aliases
deleted file mode 100644
index 137b82807b..0000000000
--- a/test/integration/targets/podman_image/aliases
+++ /dev/null
@@ -1,5 +0,0 @@
-shippable/posix/group3
-skip/aix
-skip/osx
-skip/freebsd
-destructive
diff --git a/test/integration/targets/podman_image/files/Containerfile b/test/integration/targets/podman_image/files/Containerfile
deleted file mode 100644
index d4bd8edb99..0000000000
--- a/test/integration/targets/podman_image/files/Containerfile
+++ /dev/null
@@ -1,3 +0,0 @@
-FROM quay.io/coreos/alpine-sh
-ENV VAR testing
-WORKDIR ${VAR}
diff --git a/test/integration/targets/podman_image/meta/main.yml b/test/integration/targets/podman_image/meta/main.yml
deleted file mode 100644
index f5140043a8..0000000000
--- a/test/integration/targets/podman_image/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - setup_podman
diff --git a/test/integration/targets/podman_image/tasks/main.yml b/test/integration/targets/podman_image/tasks/main.yml
deleted file mode 100644
index 94397e8f33..0000000000
--- a/test/integration/targets/podman_image/tasks/main.yml
+++ /dev/null
@@ -1,144 +0,0 @@
-- name: Test podman_image
- when:
- - ansible_facts.virtualization_type != 'docker'
- - ansible_facts.distribution == 'RedHat'
- block:
- - name: Pull image
- podman_image:
- name: quay.io/coreos/alpine-sh
- register: pull1
-
- - name: Pull image again
- podman_image:
- name: quay.io/coreos/alpine-sh
- register: pull2
-
- - name: List images
- command: podman image ls
- register: images
-
- - name: Ensure image was pulled properly
- assert:
- that:
- - pull1 is changed
- - pull2 is not changed
- - "'alpine-sh' in images.stdout"
-
- - name: Remove image
- podman_image:
- name: quay.io/coreos/alpine-sh
- state: absent
- register: rmi1
-
- - name: Remove image again
- podman_image:
- name: quay.io/coreos/alpine-sh
- state: absent
- register: rmi2
-
- - name: List images
- command: podman image ls
- register: images
-
- - name: Ensure image was removed properly
- assert:
- that:
- - rmi1 is changed
- - rmi2 is not changed
- - "'alpine-sh' not in images.stdout"
-
- - name: Pull a specific version of an image
- podman_image:
- name: quay.io/coreos/etcd
- tag: v3.3.11
- register: specific_image1
-
- - name: Pull a specific version of an image again
- podman_image:
- name: quay.io/coreos/etcd
- tag: v3.3.11
- register: specific_image2
-
- - name: List images
- command: podman image ls
- register: images
-
- - name: Ensure specific image was pulled properly
- assert:
- that:
- - specific_image1 is changed
- - specific_image2 is not changed
- - "'v3.3.11' in images.stdout"
-
- - name: Create a build dir
- file:
- path: /var/tmp/build
- state: directory
-
- - name: Copy Containerfile
- copy:
- src: Containerfile
- dest: /var/tmp/build/Dockerfile
-
- - name: Build OCI image
- podman_image:
- name: testimage
- path: /var/tmp/build
- register: oci_build1
-
- - name: Build OCI image again
- podman_image:
- name: testimage
- path: /var/tmp/build
- register: oci_build2
-
- - name: Inspect build image
- podman_image_info:
- name: testimage
- register: testimage_info
-
- - name: Ensure OCI image was built properly
- assert:
- that:
- - oci_build1 is changed
- - oci_build2 is not changed
- - "'localhost/testimage:latest' in testimage_info.images[0]['RepoTags'][0]"
-
- - name: Build Docker image
- podman_image:
- name: dockerimage
- path: /var/tmp/build
- build:
- format: docker
- register: docker_build1
-
- - name: Build Docker image again
- podman_image:
- name: dockerimage
- path: /var/tmp/build
- build:
- format: docker
- register: docker_build2
-
- - name: Inspect build image
- podman_image_info:
- name: dockerimage
- register: dockerimage_info
-
- - name: Ensure Docker image was built properly
- assert:
- that:
- - docker_build1 is changed
- - docker_build2 is not changed
- - "'localhost/dockerimage:latest' in dockerimage_info.images[0]['RepoTags'][0]"
-
- always:
- - name: Cleanup images
- podman_image:
- name: "{{ item }}"
- state: absent
- loop:
- - quay.io/coreos/alpine-sh
- - quay.io/coreos/etcd:v3.3.11
- - localhost/testimage
- - localhost/dockerimage
diff --git a/test/integration/targets/podman_image_info/aliases b/test/integration/targets/podman_image_info/aliases
deleted file mode 100644
index 7a020910ed..0000000000
--- a/test/integration/targets/podman_image_info/aliases
+++ /dev/null
@@ -1,5 +0,0 @@
-shippable/posix/group2
-skip/aix
-skip/osx
-skip/freebsd
-destructive
diff --git a/test/integration/targets/podman_image_info/meta/main.yml b/test/integration/targets/podman_image_info/meta/main.yml
deleted file mode 100644
index f5140043a8..0000000000
--- a/test/integration/targets/podman_image_info/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - setup_podman
diff --git a/test/integration/targets/podman_image_info/tasks/main.yml b/test/integration/targets/podman_image_info/tasks/main.yml
deleted file mode 100644
index 259fc11f1f..0000000000
--- a/test/integration/targets/podman_image_info/tasks/main.yml
+++ /dev/null
@@ -1,53 +0,0 @@
-- name: Test podman_image_info
- when:
- - ansible_facts.virtualization_type != 'docker'
- - ansible_facts.distribution == 'RedHat'
- block:
- - name: Pull image
- command: podman pull quay.io/coreos/etcd
-
- - name: Get info on all images
- podman_image_info:
- register: all_image_result
-
- - name: Pull another image
- command: podman pull quay.io/coreos/dnsmasq
-
- - name: Get info on specific image
- podman_image_info:
- name: dnsmasq
- register: named_image_result
-
- - name:
- assert:
- that:
- - all_image_result.images | length > 0
- - named_image_result.images | length == 1
- - "'dnsmasq' in named_image_result.images[0]['RepoTags'][0]"
-
- - name: Get info on single image that does not exist
- podman_image_info:
- name: nope
- register: single_nonexistant
-
- - name: Get info on multiple images that do not exist
- podman_image_info:
- name:
- - nope
- - reallynope
- register: multiple_nonexistant
-
- - name: Get info with one image that does not exist
- podman_image_info:
- name:
- - dnsmasq
- - nope
- - etcd
- register: mixed_nonexistant
-
- - name: Ensure image info was returned when non-existant image info was requisted
- assert:
- that:
- - single_nonexistant.images | length == 0
- - multiple_nonexistant.images | length == 0
- - mixed_nonexistant.images | length == 2
diff --git a/test/integration/targets/podman_volume_info/aliases b/test/integration/targets/podman_volume_info/aliases
deleted file mode 100644
index 7a020910ed..0000000000
--- a/test/integration/targets/podman_volume_info/aliases
+++ /dev/null
@@ -1,5 +0,0 @@
-shippable/posix/group2
-skip/aix
-skip/osx
-skip/freebsd
-destructive
diff --git a/test/integration/targets/podman_volume_info/meta/main.yml b/test/integration/targets/podman_volume_info/meta/main.yml
deleted file mode 100644
index f5140043a8..0000000000
--- a/test/integration/targets/podman_volume_info/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - setup_podman
diff --git a/test/integration/targets/podman_volume_info/tasks/main.yml b/test/integration/targets/podman_volume_info/tasks/main.yml
deleted file mode 100644
index ca8b49e975..0000000000
--- a/test/integration/targets/podman_volume_info/tasks/main.yml
+++ /dev/null
@@ -1,62 +0,0 @@
-- name: Test podman_volume_info
- when:
- - ansible_facts.virtualization_type != 'docker'
- - ansible_facts.distribution == 'RedHat'
- block:
-
- - name: Print podman version
- command: podman version
-
- - name: Generate random value for volume name
- set_fact:
- volume_name: "{{ 'ansible-test-podman-%0x' % ((2**32) | random) }}"
-
- - name: Make sure volume doesn't exist
- command: podman volume rm {{ volume_name }}
- ignore_errors: true
-
- - name: Get missing volume info
- podman_volume_info:
- name: "{{ volume_name }}"
- register: nonexist
- ignore_errors: true
-
- - name: Check results
- assert:
- that:
- - "'volumes' not in nonexist"
- - nonexist is failed
-
- - name: Make sure volume exists
- command: podman volume create {{ volume_name }}
-
- - name: Get existing volume info
- podman_volume_info:
- name: "{{ volume_name }}"
- register: existing_volume
-
- - name: Dump podman volume inspect result
- debug: var=existing_volume
-
- - name: Comparison with 'podman volume inspect'
- command: podman volume inspect "{{ volume_name }}"
- register: podman_inspect
-
- - name: Convert podman inspect output to JSON
- set_fact:
- podman_inspect_result: "{{ podman_inspect.stdout | from_json }}"
-
- - name: Cleanup
- command: podman volume rm {{ volume_name }}
-
- - name: Make checks
- assert:
- that:
- - "'volumes' in existing_volume"
- - existing_volume.volumes
- - "existing_volume.volumes == podman_inspect_result"
- always:
-
- - name: Cleanup
- command: podman volume rm {{ volume_name }}
- ignore_errors: true
diff --git a/test/integration/targets/setup_podman/defaults/main.yml b/test/integration/targets/setup_podman/defaults/main.yml
deleted file mode 100644
index be88827987..0000000000
--- a/test/integration/targets/setup_podman/defaults/main.yml
+++ /dev/null
@@ -1 +0,0 @@
-podman_package: podman-1.4.*
diff --git a/test/integration/targets/setup_podman/handlers/main.yml b/test/integration/targets/setup_podman/handlers/main.yml
deleted file mode 100644
index 93f11e5e84..0000000000
--- a/test/integration/targets/setup_podman/handlers/main.yml
+++ /dev/null
@@ -1,9 +0,0 @@
-- name: remove podman packages
- yum:
- name: 'podman*'
- state: absent
- listen: cleanup podman
-
-- name: remove extras repo
- command: "{{ repo_command[ansible_facts.distribution ~ ansible_facts.distribution_major_version]['disable'] | default('echo') }}"
- listen: cleanup podman
diff --git a/test/integration/targets/setup_podman/tasks/main.yml b/test/integration/targets/setup_podman/tasks/main.yml
deleted file mode 100644
index ab7b66f7d9..0000000000
--- a/test/integration/targets/setup_podman/tasks/main.yml
+++ /dev/null
@@ -1,19 +0,0 @@
-- block:
- - name: Enable extras repo
- command: "{{ repo_command[ansible_facts.distribution ~ ansible_facts.distribution_major_version]['enable'] | default('echo') }}"
- notify: cleanup podman
-
- - name: Install podman
- yum:
- name: "{{ podman_package }}"
- state: present
- when: ansible_facts.pkg_mgr in ['yum', 'dnf']
- notify: cleanup podman
-
- - name: Get podman version
- command: podman --version
-
- when:
- - ansible_facts.distribution == 'RedHat'
- - ansible_facts.virtualization_type != 'docker'
- - ansible_facts.distribution_major_version is version_compare('7', '>=')
diff --git a/test/integration/targets/setup_podman/vars/main.yml b/test/integration/targets/setup_podman/vars/main.yml
deleted file mode 100644
index a79922f9fb..0000000000
--- a/test/integration/targets/setup_podman/vars/main.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-repo_command:
- RedHat7:
- enable: yum-config-manager --enable rhui-REGION-rhel-server-extras
- disable: yum-config-manager --disable rhui-REGION-rhel-server-extras
diff --git a/test/sanity/ignore.txt b/test/sanity/ignore.txt
index a228c54d9a..eac7e6f06b 100644
--- a/test/sanity/ignore.txt
+++ b/test/sanity/ignore.txt
@@ -2305,13 +2305,6 @@ lib/ansible/modules/cloud/packet/packet_sshkey.py validate-modules:parameter-typ
lib/ansible/modules/cloud/packet/packet_sshkey.py validate-modules:undocumented-parameter
lib/ansible/modules/cloud/packet/packet_volume_attachment.py pylint:ansible-bad-function
lib/ansible/modules/cloud/packet/packet_volume_attachment.py validate-modules:doc-required-mismatch
-lib/ansible/modules/cloud/podman/podman_image.py validate-modules:doc-type-does-not-match-spec
-lib/ansible/modules/cloud/podman/podman_image.py validate-modules:mutually_exclusive-unknown
-lib/ansible/modules/cloud/podman/podman_image.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/podman/podman_image.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/cloud/podman/podman_image.py validate-modules:undocumented-parameter
-lib/ansible/modules/cloud/podman/podman_image_info.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/cloud/podman/podman_image_info.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/cloud/profitbricks/profitbricks.py validate-modules:doc-choices-do-not-match-spec
lib/ansible/modules/cloud/profitbricks/profitbricks.py validate-modules:doc-default-does-not-match-spec
lib/ansible/modules/cloud/profitbricks/profitbricks.py validate-modules:doc-missing-type