Skip to content

Commit

Permalink
test: ensure actions are run only once
Browse files Browse the repository at this point in the history
  • Loading branch information
AldanTanneo committed Nov 15, 2024
1 parent 275cd66 commit 1919471
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions testsuite/tests/test/action-test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"""

from drivers.alr import run_alr
from drivers.helpers import check_line_in
from drivers.helpers import content_of

from glob import glob

Expand All @@ -16,7 +16,12 @@
chdir('alire')

# Check the magic string in the test output log
check_line_in(glob('*.log')[0], 'ABRACADABRA')
log_contents = content_of(glob('*.log')[0])
magic_string_count = log_contents.count("ABRACADABRA")
if magic_string_count == 0:
assert False, 'action not run'
elif magic_string_count > 1:
assert False, 'action ran more than once'


print('SUCCESS')

0 comments on commit 1919471

Please sign in to comment.