summaryrefslogtreecommitdiff
path: root/test/integration/targets/connection_buildah
diff options
context:
space:
mode:
authorTomas Tomecek <ttomecek@redhat.com>2017-07-12 04:36:25 +0200
committerBrian Coca <bcoca@users.noreply.github.com>2017-07-11 22:36:25 -0400
commit5b898a7732efb646881bfbfb5e1bf5f058b45105 (patch)
treef885074320fdeee6ee9763d9836884fae7ade1cb /test/integration/targets/connection_buildah
parent63fe40c691dd7199ad9ee40dbd09f5e9cfa84c49 (diff)
downloadansible-5b898a7732efb646881bfbfb5e1bf5f058b45105.tar.gz
add connection plugin for buildah (#26170)
* add connection plugin for buildah Signed-off-by: Tomas Tomecek <ttomecek@redhat.com> * fixup * create a method to invoke buildah * mount container filesystem persistently so we can access it during put and fetch * use copyfile function for copying files Signed-off-by: Tomas Tomecek <ttomecek@redhat.com> * revert tests Signed-off-by: Tomas Tomecek <ttomecek@redhat.com> * fixup Signed-off-by: Tomas Tomecek <ttomecek@redhat.com> * progress (this will be squashed into a single commit before merge) * add docs for the conn plugin * fix issue invoking the integration tests * add a way to invoke commands inside the container as a different user Signed-off-by: Tomas Tomecek <ttomecek@redhat.com> * fix shellcheck warning Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
Diffstat (limited to 'test/integration/targets/connection_buildah')
-rw-r--r--test/integration/targets/connection_buildah/aliases1
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
4 files changed, 21 insertions, 0 deletions
diff --git a/test/integration/targets/connection_buildah/aliases b/test/integration/targets/connection_buildah/aliases
new file mode 100644
index 0000000000..ca5668ce04
--- /dev/null
+++ b/test/integration/targets/connection_buildah/aliases
@@ -0,0 +1 @@
+needs/root
diff --git a/test/integration/targets/connection_buildah/posix.sh b/test/integration/targets/connection_buildah/posix.sh
new file mode 120000
index 0000000000..70aa5dbdba
--- /dev/null
+++ b/test/integration/targets/connection_buildah/posix.sh
@@ -0,0 +1 @@
+../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
new file mode 100755
index 0000000000..b1acf92376
--- /dev/null
+++ b/test/integration/targets/connection_buildah/runme.sh
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+set -eux
+
+ANSIBLE_TEST_REMOTE_INTERPRETER='' ./posix.sh "$@"
+
+ANSIBLE_TEST_REMOTE_INTERPRETER='' 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
new file mode 100644
index 0000000000..6a3c41f1fe
--- /dev/null
+++ b/test/integration/targets/connection_buildah/test_connection.inventory
@@ -0,0 +1,12 @@
+[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_REMOTE_INTERPRETER= ansible-test integration --local connection_buildah
+# 6. remove container
+# $ sudo buildah rm buildah-container
+ansible_host=buildah-container
+ansible_connection=buildah