Skip to content

Commit

Permalink
Add additional test
Browse files Browse the repository at this point in the history
  • Loading branch information
datamel committed Apr 27, 2022
1 parent 06e57c2 commit 797686c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tests/functional/logging/05-start-restart.t
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@


. "$(dirname "$0")/test_header"
set_test_number 6
set_test_number 7
init_workflow "${TEST_NAME_BASE}" <<'__FLOW_CONFIG__'
[scheduler]
[[events]]
Expand All @@ -39,15 +39,18 @@ __FLOW_CONFIG__

run_ok "${TEST_NAME_BASE}-validate" cylc validate "${WORKFLOW_NAME}"

workflow_run_ok "${TEST_NAME_BASE}-run" cylc play "${WORKFLOW_NAME}"
workflow_run_ok "${TEST_NAME_BASE}-run" cylc play --debug "${WORKFLOW_NAME}"

# wait for shut down
poll_grep_workflow_log "INFO - DONE"
find "${WORKFLOW_RUN_DIR}/log/scheduler" -type f -name "*start.log" | wc -l >'find-start-log'
cmp_ok 'find-start-log' <<< '1'
workflow_run_ok "${TEST_NAME_BASE}-restart" cylc play "${WORKFLOW_NAME}"
workflow_run_ok "${TEST_NAME_BASE}-restart" cylc play --debug "${WORKFLOW_NAME}"
find "${WORKFLOW_RUN_DIR}/log/scheduler" -type f -name "*restart.log" | wc -l >'find-restart-log'
cmp_ok 'find-restart-log' <<< '1'
grep_ok "Run: (re)start=1 log=1" "$HOME/cylc-run/${WORKFLOW_NAME}/log/scheduler/log"

# This tests that there is only one start and retart log created.
find "${WORKFLOW_RUN_DIR}/log/scheduler" -type f -name "*start.log" | wc -l >'find-logs'
cmp_ok 'find-logs' <<< '2'
purge

0 comments on commit 797686c

Please sign in to comment.