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/resource-agents.spec b/resource-agents.spec index fae165a..75337b1 100644 --- a/resource-agents.spec +++ b/resource-agents.spec @@ -45,7 +45,7 @@ Name: resource-agents Summary: Open Source HA Reusable Cluster Resource Scripts Version: 4.8.0 -Release: 5%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} +Release: 6%{?rcver:%{rcver}}%{?numcomm:.%{numcomm}}%{?alphatag:.%{alphatag}}%{?dirty:.%{dirty}}%{?dist} License: GPLv2+ and LGPLv2+ URL: https://github.com/ClusterLabs/resource-agents Source0: %{upstream_prefix}-%{upstream_version}.tar.gz @@ -422,7 +422,7 @@ rm -rf %{buildroot}/usr/share/doc/resource-agents %changelog -* Tue Jun 29 2021 Oyvind Albrigtsen - 4.8.0-5 +* Tue Jun 29 2021 Oyvind Albrigtsen - 4.8.0-6 - Exclude SAP agents that are in separate -sap subpackage Resolves: rhbz#1977208 diff --git a/tests/run_tests.sh b/tests/run_tests.sh new file mode 100755 index 0000000..73f9dd2 --- /dev/null +++ b/tests/run_tests.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +err=0 + +agents=$(pcs resource list ocf:heartbeat 2>&1) +if [ $(echo "$agents" | wc -l) -lt 2 ]; then + echo "ERROR: pcs: agents available:\n$agents" + err=$((err+1)) +else + echo "INFO: pcs: agents available..." +fi + +for bin in aliyuncli-ra "gcloud-ra -v"; do + output="$($bin 2>&1)" + if [ $? -ne 0 ]; then + echo -e "ERROR: $bin failed:\n$output" + err=$((err+1)) + else + echo "INFO: $bin 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..084d431 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,16 @@ +- hosts: localhost + roles: + - role: standard-test-basic + tags: + - classic + - container + required_packages: + - resource-agents + - resource-agents-aliyun + - resource-agents-gcp + - pcs + + tests: + - subpackage_tests: + dir: . + run: ./run_tests.sh