From 050700651b86dcd90266e3592f3ecf41bfddc24d Mon Sep 17 00:00:00 2001 From: "Brian C. Lane" Date: Mon, 3 May 2021 15:39:00 -0700 Subject: [PATCH] tests: Add gating tests --- gating.yaml | 7 +++++++ tests/.fmf/version | 1 + tests/provision.fmf | 5 +++++ tests/scripts/run_tests.sh | 13 +++++++++++++ tests/tests.yml | 15 +++++++++++++++ 5 files changed, 41 insertions(+) create mode 100644 gating.yaml create mode 100644 tests/.fmf/version create mode 100644 tests/provision.fmf create mode 100755 tests/scripts/run_tests.sh create mode 100644 tests/tests.yml diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..0c1cc35 --- /dev/null +++ b/gating.yaml @@ -0,0 +1,7 @@ +--- !Policy +product_versions: + - fedora-* +decision_contexts: [bodhi_update_push_stable] +subject_type: koji_build +rules: + - !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional} diff --git a/tests/.fmf/version b/tests/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/tests/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/tests/provision.fmf b/tests/provision.fmf new file mode 100644 index 0000000..dd69f34 --- /dev/null +++ b/tests/provision.fmf @@ -0,0 +1,5 @@ +--- + +standard-inventory-qcow2: + qemu: + m: 4G diff --git a/tests/scripts/run_tests.sh b/tests/scripts/run_tests.sh new file mode 100755 index 0000000..9d31c2f --- /dev/null +++ b/tests/scripts/run_tests.sh @@ -0,0 +1,13 @@ +#!/bin/bash +set -eux +# Gather up the list of system repo files and use them for lorax +REPOS=$(for f in /etc/yum.repos.d/*repo; do echo -n "--repo $f "; done) +if [ -z "$REPOS" ]; then + echo "No system repos found" + exit 1 +fi + +# NOTE: We must use --nomacboot because the test system doesn't have the hfsplus fs available +# Run lorax using the host's repository configuration file +lorax --product="Fedora" --version=rawhide --release=rawhide --volid="Fedora-rawhide-test" \ + $REPOS --isfinal --nomacboot /var/tmp/lorax-fedora-iso/ diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..d39d256 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,15 @@ +--- +# Run lorax with the new templates +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + + required_packages: + - lorax + + tests: + - simple: + dir: scripts + run: ./run_tests.sh