Skip to content

Commit

Permalink
undo some over-radical test changes
Browse files Browse the repository at this point in the history
  • Loading branch information
wxtim committed Nov 9, 2023
1 parent ae73284 commit cf121e3
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
4 changes: 2 additions & 2 deletions tests/functional/events/09-task-event-mail.t
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ see: http://localhost/stuff/${USER}/${WORKFLOW_NAME}/
__LOG__

run_ok "${TEST_NAME_BASE}-grep-log" \
grep -q "Subject: \\[1/t1/01 retry\\]" "${TEST_SMTPD_LOG}"
grep -qPizo "Subject: \[1/t1/01 retry\]\n ${WORKFLOW_NAME}" "${TEST_SMTPD_LOG}"
run_ok "${TEST_NAME_BASE}-grep-log" \
grep -q "Subject: \\[1/t1/02 succeeded\\]" "${TEST_SMTPD_LOG}"
grep -qPizo "Subject: \[1/t1/02 succeeded\]\n ${WORKFLOW_NAME}" "${TEST_SMTPD_LOG}"

purge
mock_smtpd_kill
Expand Down
12 changes: 8 additions & 4 deletions tests/functional/events/18-workflow-event-mail.t
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
if ! command -v mail 2>'/dev/null'; then
skip_all '"mail" command not available'
fi
set_test_number 7
set_test_number 3
mock_smtpd_init
OPT_SET=
if [[ "${TEST_NAME_BASE}" == *-globalcfg ]]; then
Expand Down Expand Up @@ -48,9 +48,13 @@ run_ok "${TEST_NAME_BASE}-validate" \
workflow_run_ok "${TEST_NAME_BASE}-run" \
cylc play --reference-test --debug --no-detach ${OPT_SET} "${WORKFLOW_NAME}"

for searchterm in 'event: startup' 'message: workflow starting' 'event: shutdown' 'message: AUTOMATIC' "see: http://localhost/stuff/${USER}/${WORKFLOW_NAME}/"; do
grep_ok "$searchterm" "$TEST_SMTPD_LOG"
done
contains_ok "${TEST_SMTPD_LOG}" <<__LOG__
event: startup
message: workflow starting
event: shutdown
message: AUTOMATIC
see: http://localhost/stuff/${USER}/${WORKFLOW_NAME}/
__LOG__

purge
mock_smtpd_kill
Expand Down
4 changes: 3 additions & 1 deletion tests/functional/events/29-task-event-mail-1.t
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ retry: 1/t1/01
see: http://localhost/stuff/${USER}/${WORKFLOW_NAME}/
__LOG__

cat ${TEST_SMTPD_LOG} > ${HOME}/foo

run_ok "${TEST_NAME_BASE}-grep-log" \
grep -q "Subject: \\[1/t1/01 retry\\]" "${TEST_SMTPD_LOG}"
grep -qPizo "Subject: \[1/t1/01 retry\]\n ${WORKFLOW_NAME}" "${TEST_SMTPD_LOG}"

purge
mock_smtpd_kill
Expand Down
4 changes: 2 additions & 2 deletions tests/functional/events/30-task-event-mail-2.t
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ see: http://localhost/stuff/${USER}/${WORKFLOW_NAME}/
__LOG__

run_ok "${TEST_NAME_BASE}-grep-log" \
grep -q "Subject: \\[. tasks retry\\]" "${TEST_SMTPD_LOG}"
grep -qPizo "Subject: \[. tasks retry\]\n ${WORKFLOW_NAME}" "${TEST_SMTPD_LOG}"
run_ok "${TEST_NAME_BASE}-grep-log" \
grep -q "Subject: \\[. tasks failed\\]" "${TEST_SMTPD_LOG}"
grep -qPizo "Subject: \[. tasks failed\]\n ${WORKFLOW_NAME}" "${TEST_SMTPD_LOG}"

purge
mock_smtpd_kill
Expand Down

0 comments on commit cf121e3

Please sign in to comment.