From 056fee7e785cc1c28cb1dee17aea2406c7a22086 Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Apr 20 2021 12:52:28 +0000 Subject: Add gating tests Resolves: #1950051 --- diff --git a/gating.yaml b/gating.yaml new file mode 100644 index 0000000..648918d --- /dev/null +++ b/gating.yaml @@ -0,0 +1,6 @@ +--- !Policy +product_versions: + - rhel-9 +decision_context: osci_compose_gate +rules: + - !PassingTestCaseRule {test_case_name: osci.brew-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..fa02c6d --- /dev/null +++ b/tests/provision.fmf @@ -0,0 +1,5 @@ +--- + +standard-inventory-qcow2: + qemu: + m: 5G diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..0e3348a --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,80 @@ +--- +- hosts: localhost + roles: + - role: standard-test-source # Fetch source tarball and unpack it into the test environment + tags: + - always + + - role: standard-test-basic + tags: + - classic + + required_packages: # Install test dependencies + - dbus-daemon + - python3-blivet + - python3-bytesize + - python3-systemd + - targetcli + - smartmontools + - genisoimage + - xfsprogs + - dosfstools + - e2fsprogs + - cryptsetup + - python3-six + - kmod-kvdo + - sqlite + - libstoragemgmt + - python3-libstoragemgmt + - udisks2-iscsi + - udisks2-lsm + - udisks2-lvm2 + - udisks2-zram + + tests: + - start-lsmd: + dir: . + run: "systemctl start libstoragemgmt.service" + - udisksctl-dump: + dir: . + run: "/usr/bin/udisksctl dump" + + - increase-timeouts: + dir: ./source/src/tests/ + run: "find -name '*.py' -or -name integration-test | while read i; do sed -e 's/time\\.sleep(/time.sleep(5*/' -i $i; done" + + + - dbus-tests-start: + dir: . + run: "targetcli clearconfig confirm=True" + - dbus-tests-disable-vdo: + dir: ./source/src/tests/dbus-tests/ + run: "sed -i test_10_basic.py -e 's/find_executable(\"vdo\")/find_executable(\"vdo-disabled\")/'" + - dbus-tests: + dir: ./source/ + run: "python3 src/tests/dbus-tests/run_tests.py --system" + + + - integration-tests-start: + dir: . + run: "targetcli clearconfig confirm=True" + - integration-tests: + dir: ./source/src/tests/ + run: "python3 ./integration-test --log-file=integration-tests.log 2>&1" + + + - dump-integration-tests-log: + dir: ./source/src/tests/ + run: "cat integration-tests.log" + - dump-flight_record: + dir: ./source/ + run: "cat flight_record.log" + - dump-journal-dbus_tests: + dir: ./source/ + run: "cat journaldump.log" + - dump-journal-system: + dir: . + run: "journalctl --all --no-pager" + - dump-dmesg: + dir: . + run: "dmesg"