Skip to content

Commit

Permalink
undo unecessary test changes in response to OS comment
Browse files Browse the repository at this point in the history
  • Loading branch information
wxtim committed Nov 9, 2023
1 parent ae53eae commit ae73284
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 29 deletions.
10 changes: 6 additions & 4 deletions tests/functional/events/09-task-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 5
mock_smtpd_init
OPT_SET=
if [[ "${TEST_NAME_BASE}" == *-globalcfg ]]; then
Expand Down Expand Up @@ -49,9 +49,11 @@ run_ok "${TEST_NAME_BASE}-validate" \
workflow_run_ok "${TEST_NAME_BASE}-run" \
cylc play --reference-test --debug --no-detach ${OPT_SET} "${WORKFLOW_NAME}"

grep_ok 'retry: 1/t1/01' "${TEST_SMTPD_LOG}"
grep_ok 'succeeded: 1/t1/02' "${TEST_SMTPD_LOG}"
grep_ok "see: http://localhost/stuff/${USER}/${WORKFLOW_NAME}/" "${TEST_SMTPD_LOG}"
contains_ok "${TEST_SMTPD_LOG}" <<__LOG__
retry: 1/t1/01
succeeded: 1/t1/02
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}"
Expand Down
9 changes: 6 additions & 3 deletions tests/functional/events/29-task-event-mail-1.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 5
set_test_number 4

mock_smtpd_init
create_test_global_config "
Expand All @@ -37,8 +37,11 @@ run_ok "${TEST_NAME_BASE}-validate" \
workflow_run_ok "${TEST_NAME_BASE}-run" \
cylc play --reference-test --debug --no-detach "$WORKFLOW_NAME"

grep_ok "retry: 1/t1/01" "${TEST_SMTPD_LOG}"
grep_ok "see: http://localhost/stuff/${USER}/${WORKFLOW_NAME}/" "${TEST_SMTPD_LOG}"

contains_ok "${TEST_SMTPD_LOG}" <<__LOG__
retry: 1/t1/01
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}"
Expand Down
41 changes: 19 additions & 22 deletions tests/functional/events/30-task-event-mail-2.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 20
set_test_number 5
mock_smtpd_init
OPT_SET=
if [[ "${TEST_NAME_BASE}" == *-globalcfg ]]; then
Expand Down Expand Up @@ -49,27 +49,24 @@ run_ok "${TEST_NAME_BASE}-validate" \
workflow_run_fail "${TEST_NAME_BASE}-run" \
cylc play --reference-test --debug --no-detach ${OPT_SET} "${WORKFLOW_NAME}"

labels=(
'retry: 1/t1/01'
'retry: 1/t2/01'
'retry: 1/t3/01'
'retry: 1/t4/01'
'retry: 1/t5/01'
'retry: 1/t1/02'
'retry: 1/t2/02'
'retry: 1/t3/02'
'retry: 1/t4/02'
'retry: 1/t5/02'
'failed: 1/t1/03'
'failed: 1/t2/03'
'failed: 1/t3/03'
'failed: 1/t4/03'
'failed: 1/t5/03'
"see: http://localhost/stuff/${USER}/${WORKFLOW_NAME}/")

for label in "${labels[@]}"; do
grep_ok "$label" "${TEST_SMTPD_LOG}"
done
contains_ok "${TEST_SMTPD_LOG}" <<__LOG__
retry: 1/t1/01
retry: 1/t2/01
retry: 1/t3/01
retry: 1/t4/01
retry: 1/t5/01
retry: 1/t1/02
retry: 1/t2/02
retry: 1/t3/02
retry: 1/t4/02
retry: 1/t5/02
failed: 1/t1/03
failed: 1/t2/03
failed: 1/t3/03
failed: 1/t4/03
failed: 1/t5/03
see: http://localhost/stuff/${USER}/${WORKFLOW_NAME}/
__LOG__

run_ok "${TEST_NAME_BASE}-grep-log" \
grep -q "Subject: \\[. tasks retry\\]" "${TEST_SMTPD_LOG}"
Expand Down

0 comments on commit ae73284

Please sign in to comment.