summaryrefslogtreecommitdiff
path: root/.cirrus.yml
diff options
context:
space:
mode:
authorChris Evich <cevich@redhat.com>2019-03-04 16:57:20 -0500
committerChris Evich <cevich@redhat.com>2019-03-05 11:03:37 -0500
commit142442edaad3ba4c76645f3806519039cb6b7007 (patch)
treebdc74dbd3f6f13be97113558ab520e8c78f6704d /.cirrus.yml
parentac690126f8db7016a8de6f988a10a2a4a39b7301 (diff)
downloadpodman-142442edaad3ba4c76645f3806519039cb6b7007.tar.gz
podman-142442edaad3ba4c76645f3806519039cb6b7007.tar.bz2
podman-142442edaad3ba4c76645f3806519039cb6b7007.zip
Cirrus: Add dedicated rootless mode testing
Certain integration tests require execution as a regular user. This is acomplished by `PodmanTest.PodmanAsUserBase()` wrapping a specialized execution environment, in `test/utils/utils.go`. However, doing this requires passing through python, which vastly increases the complexity of debugging low-level problems. This commit introduces a new parallel task, run as a regular user on the VM as set by three environment variables. All commands executed in the ``rootless_test.sh`` script, will occur as a real user with a name and home directory, just as `$DIETY` intended. All env. vars established during `environment_setup.sh` (for root) are available. The PR source in `$GOSRC` and `$GOPATH` are owned by this user, and ready for use. Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to '.cirrus.yml')
-rw-r--r--.cirrus.yml39
1 files changed, 38 insertions, 1 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
index b473980ea..80486395f 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -61,6 +61,13 @@ env:
RHEL_BASE_IMAGE: "rhel-guest-image-7-6-210-x86-64-qcow2-1548099756"
####
+ #### Default to NOT running in rootless-testing mode
+ ####
+ ROOTLESS_USER:
+ ROOTLESS_UID:
+ ROOTLESS_GID:
+
+ ####
#### Credentials and other secret-sauces, decrypted at runtime when authorized.
####
# Freenode IRC credentials for posting status messages
@@ -88,7 +95,7 @@ env:
CIRRUS_TASK_ID CIRRUS_REPO_NAME CIRRUS_REPO_OWNER CIRRUS_REPO_FULL_NAME
CIRRUS_REPO_CLONE_URL CIRRUS_SHELL CIRRUS_USER_COLLABORATOR CIRRUS_USER_PERMISSION
CIRRUS_WORKING_DIR CIRRUS_HTTP_CACHE_HOST PACKER_BUILDS BUILT_IMAGE_SUFFIX
- XDG_DATA_DIRS XDG_RUNTIME_DIR XDG_SESSION_ID
+ XDG_DATA_DIRS XDG_RUNTIME_DIR XDG_SESSION_ID ROOTLESS_USER ROOTLESS_UID ROOTLESS_GID
# Every *_task runs in parallel in separate VMsd. The name prefix only for reference
@@ -189,6 +196,36 @@ testing_task:
integration_test_script: $SCRIPT_BASE/integration_test.sh
+# This task executes tests as a regular user on a system
+rootless_testing_task:
+
+ depends_on:
+ - "gating"
+ - "build_each_commit"
+
+ gce_instance:
+ image_project: "libpod-218412"
+ zone: "us-central1-a" # Required by Cirrus for the time being
+ cpu: 2
+ memory: "4Gb"
+ disk: 200
+ # A matrix could be used here, for now just one VM
+ image_name: "${FEDORA_CACHE_IMAGE_NAME}"
+
+ env:
+ ROOTLESS_USER: "olympiclongjumpingwithjesus"
+ ROOTLESS_UID: 123456
+ ROOTLESS_GID: 123456
+
+ timeout_in: 120m
+
+ setup_environment_script: $SCRIPT_BASE/setup_environment.sh
+ rootless_test_script: >-
+ ssh $ROOTLESS_USER@localhost
+ -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -o CheckHostIP=no
+ $CIRRUS_WORKING_DIR/$SCRIPT_BASE/rootless_test.sh
+
+
# Because system tests are stored within the repository, it is sometimes
# necessary to execute them within a PR to validate changes.
optional_testing_task: