Skip to content

Commit

Permalink
tests: fix integration with github actions
Browse files Browse the repository at this point in the history
* we don't need to check if package is installed
* we need to return the exit code of the test suite
  • Loading branch information
lnykryn committed May 30, 2024
1 parent 7b109ba commit 9b4eb04
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions tests/alternatives/test-alternatives.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -139,36 +138,36 @@ 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
add_alternative link_b 20 ""
check_alternative link_a manual link_b
clean_dir
rlPhaseEnd

rlPhaseStart FAIL "Remove Manually Set"
add_alternative link_a 10 ""
set_alternative link_a
Expand All @@ -177,60 +176,60 @@ 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
add_alternative link_a 10 "" follower_b
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
add_alternative link_c 30 family_b
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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -318,4 +317,4 @@ rlJournalEnd

# Print the test report
rlJournalPrintText

rlGetTestState

0 comments on commit 9b4eb04

Please sign in to comment.