diff --git a/fence-agents.spec b/fence-agents.spec index 88c94d3..09ae39f 100644 --- a/fence-agents.spec +++ b/fence-agents.spec @@ -9,7 +9,7 @@ Name: fence-agents Summary: Set of unified programs capable of host isolation ("fencing") Version: 4.10.0 -Release: 1%{?alphatag:.%{alphatag}}%{?dist} +Release: 2%{?alphatag:.%{alphatag}}%{?dist} License: GPLv2+ and LGPLv2+ URL: https://github.com/ClusterLabs/fence-agents Source0: https://fedorahosted.org/releases/f/e/fence-agents/%{name}-%{version}.tar.gz @@ -1241,7 +1241,7 @@ are located on corosync cluster nodes. %{_libdir}/fence-virt/cpg.so %changelog -* Mon Jul 26 2021 Oyvind Albrigtsen - 4.10.0-1 +* Mon Jul 26 2021 Oyvind Albrigtsen - 4.10.0-2 - new upstream release Resolves: rhbz#1984803 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/run_tests.sh b/tests/run_tests.sh new file mode 100755 index 0000000..d9e5fd0 --- /dev/null +++ b/tests/run_tests.sh @@ -0,0 +1,32 @@ +#!/bin/sh + +err=0 + +if [ "$(pcs stonith list 2> /dev/null | wc -l)" -eq 0 ]; then + echo "ERROR: pcs: no agents available..." + err=$((err+1)) +fi +echo "INFO: pcs: agents available..." + +# test bundled libraries +declare -A libs=( + ["aliyunsdkcore"]="sys.path.insert(0, '/usr/lib/fence-agents/bundled/aliyun');" + ["azure"]="sys.path.insert(0, '/usr/lib/fence-agents/bundled/azure');" + ["msrestazure"]="sys.path.insert(0, '/usr/lib/fence-agents/bundled/azure');" + ) +for lib in "${!libs[@]}"; do + output=$(python3 -c "import sys; sys.path.append('/usr/share/fence'); \ + ${libs[$lib]} \ + import $lib" 2>&1) + if [ $? -ne 0 ]; then + echo -e "ERROR: Failed to import $lib:\n$output" + err=$((err+1)) + else + echo "INFO: importing $lib works..." + fi +done + +if [ $err -ge 1 ]; then + echo -e "\nERROR: $err tests FAILED..." + exit 1 +fi diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..0cbc907 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,19 @@ +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + - container + required_packages: + - fence-agents-all + - fence-agents-aliyun + - fence-agents-aws + - fence-agents-azure-arm + - fence-agents-gce + - fence-agents-virsh + - pcs + + tests: + - subpackage_tests: + dir: . + run: ./run_tests.sh