- Add CI tests

This commit is contained in:
Oyvind Albrigtsen 2023-06-28 13:38:06 +02:00
parent 8ebbea0d5f
commit 2895de0331
4 changed files with 42 additions and 2 deletions

8
.gitignore vendored
View File

@ -1,2 +1,6 @@
/ClusterLabs-resource-agents-e711383f.tar.gz
/sap_cluster_connector-0015fe2.tar.gz
/*.tar.gz
/*.rpm
/.build-*.log
/*/
!/tests/
/tests/*.retry

6
gating.yaml Normal file
View File

@ -0,0 +1,6 @@
--- !Policy
product_versions:
- rhel-8
decision_context: osci_compose_gate
rules:
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}

16
tests/run_tests.sh Executable file
View File

@ -0,0 +1,16 @@
#!/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
if [ $err -ge 1 ]; then
echo -e "\nERROR: $err tests FAILED..."
exit 1
fi

14
tests/tests.yml Normal file
View File

@ -0,0 +1,14 @@
- hosts: localhost
roles:
- role: standard-test-basic
tags:
- classic
- container
required_packages:
- resource-agents-sap
- pcs
tests:
- subpackage_tests:
dir: .
run: ./run_tests.sh