From 92baedb48187e9c18ad63ef957f28fbf9cd6358f Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Mon, 30 Sep 2019 15:02:19 -0600 Subject: [PATCH] Add gating tests (copied from podman) Add gating tests, rawhide only. These are an almost-verbatim copy of podman's gating tests - as of this writing there is no way for CI tests to say "run another package's tests". Miro is aware of the need for this, and says the feature may be available "sooner or later" [conversation in #osci] Signed-off-by: Ed Santiago --- gating.yaml | 6 ++++++ tests/test_podman.sh | 11 +++++++++++ tests/test_podman.yml | 23 +++++++++++++++++++++++ tests/tests.yml | 1 + 4 files changed, 41 insertions(+) create mode 100644 gating.yaml create mode 100755 tests/test_podman.sh create mode 100644 tests/test_podman.yml create mode 100644 tests/tests.yml diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..92d738a --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - fedora-* +decision_context: bodhi_update_push_stable +rules: + - !PassingTestCaseRule {test_case_name: org.centos.prod.ci.pipeline.allpackages-build.complete} diff --git a/tests/test_podman.sh b/tests/test_podman.sh new file mode 100755 index 0000000..efeabdd --- /dev/null +++ b/tests/test_podman.sh @@ -0,0 +1,11 @@ +#!/bin/bash -e +# +# Simple podman tests +# + +# Log program and kernel versions +echo "Important package versions:" +rpm -qa | egrep 'conmon|podman|iptable|slirp|systemd' | sort | sed -e 's/^/ /' +uname -a + +bats /usr/share/podman/test/system diff --git a/tests/test_podman.yml b/tests/test_podman.yml new file mode 100644 index 0000000..8d7b4cf --- /dev/null +++ b/tests/test_podman.yml @@ -0,0 +1,23 @@ +--- +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + - container + required_packages: + - bats + - conmon + - podman + - podman-tests + tests: + - root-test: + dir: ./ + run: ./test_podman.sh + timeout: 15m + - rootless-test: + # running the test with su doesn't create the directory for fedora user on /run/user/ + # so create it manually + dir: ./ + run: mkdir /run/user/$(id -u fedora); chown fedora /run/user/$(id -u fedora); su -c ${PWD}/test_podman.sh - fedora + timeout: 15m diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..80caee7 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1 @@ +- import_playbook: test_podman.yml