From 9b4eb04dbe286d834fdbeb7baa270dccec0d66b2 Mon Sep 17 00:00:00 2001 From: Lukas Nykryn Date: Thu, 30 May 2024 10:22:40 +0200 Subject: [PATCH] tests: fix integration with github actions * we don't need to check if package is installed * we need to return the exit code of the test suite --- tests/alternatives/test-alternatives.sh | 35 ++++++++++++------------- 1 file changed, 17 insertions(+), 18 deletions(-) diff --git a/tests/alternatives/test-alternatives.sh b/tests/alternatives/test-alternatives.sh index e182db69..6e115374 100755 --- a/tests/alternatives/test-alternatives.sh +++ b/tests/alternatives/test-alternatives.sh @@ -118,7 +118,6 @@ function check_alternative { rlJournalStart # Setup phase: Prepare test directory rlPhaseStartSetup - rlAssertRpm $PACKAGE rlRun 'altdir=$(mktemp -d)' 0 'Creating tmp directory' # no-reboot rlRun 'admindir=$(mktemp -d)' 0 'Creating tmp directory' # no-reboot rlRun 'testdir=$(mktemp -d)' 0 'Creating tmp directory' # no-reboot @@ -139,28 +138,28 @@ rlJournalStart check_alternative link_a auto clean_dir rlPhaseEnd - + rlPhaseStart FAIL "Set Manual" add_alternative link_a 10 "" set_alternative link_a check_alternative link_a manual link_a clean_dir rlPhaseEnd - + rlPhaseStart FAIL "Auto Priority Ascendant" add_alternative link_a 10 "" add_alternative link_b 20 check_alternative link_b auto clean_dir rlPhaseEnd - + rlPhaseStart FAIL "Auto Priority Descendant" add_alternative link_a 20 "" add_alternative link_b 10 "" check_alternative link_a auto clean_dir rlPhaseEnd - + rlPhaseStart FAIL "Manual Overrides Best" add_alternative link_a 10 "" set_alternative link_a @@ -168,7 +167,7 @@ rlJournalStart check_alternative link_a manual link_b clean_dir rlPhaseEnd - + rlPhaseStart FAIL "Remove Manually Set" add_alternative link_a 10 "" set_alternative link_a @@ -177,14 +176,14 @@ rlJournalStart check_alternative link_b auto clean_dir rlPhaseEnd - + rlPhaseStart FAIL "Follower" add_alternative link_a 10 "" follower_a add_alternative link_a 10 "" follower_b check_alternative link_a auto follower_b clean_dir rlPhaseEnd - + rlPhaseStart FAIL "Follower Manual" add_alternative link_a 10 "" follower_a set_alternative link_a @@ -192,37 +191,37 @@ rlJournalStart check_alternative link_a manual link_a follower_b clean_dir rlPhaseEnd - + ########## - + rlPhaseStart FAIL "Family Priority Ascendant" add_alternative link_a 10 family_a add_alternative link_b 20 family_a check_alternative link_b auto clean_dir rlPhaseEnd - + rlPhaseStart FAIL "Family Priority Descendant" add_alternative link_a 20 family_a add_alternative link_b 10 family_a check_alternative link_a auto clean_dir rlPhaseEnd - + rlPhaseStart FAIL "Families Priority Ascendant" add_alternative link_a 10 family_a add_alternative link_b 20 family_b check_alternative link_b auto clean_dir rlPhaseEnd - + rlPhaseStart FAIL "Families Priority Descendant" add_alternative link_a 20 family_a add_alternative link_b 10 family_b check_alternative link_a auto clean_dir rlPhaseEnd - + rlPhaseStart FAIL "Families Priority Ascendant Multiple" add_alternative link_a 10 family_a add_alternative link_b 20 family_a @@ -230,7 +229,7 @@ rlJournalStart check_alternative link_c auto clean_dir rlPhaseEnd - + rlPhaseStart FAIL "Families Remove Manually Set" add_alternative link_a 10 family_a set_alternative link_a @@ -239,7 +238,7 @@ rlJournalStart check_alternative link_c auto clean_dir rlPhaseEnd - + rlPhaseStart FAIL "Families Remove Link After Manually Set Multiple" add_alternative link_a 10 family_a set_alternative link_a @@ -249,7 +248,7 @@ rlJournalStart check_alternative link_b manual link_c clean_dir rlPhaseEnd - + rlPhaseStart FAIL "Family After Remove Manually Set" add_alternative link_a 10 "" set_alternative link_a @@ -318,4 +317,4 @@ rlJournalEnd # Print the test report rlJournalPrintText - +rlGetTestState