Skip to content

Commit a2ae736

Browse files
hjoliverwxtim
andauthored
Update tests/functional/cylc-set/00-set-succeeded.t
Co-authored-by: Tim Pillinger <[email protected]>
1 parent e362ea9 commit a2ae736

File tree

1 file changed

+5
-20
lines changed

1 file changed

+5
-20
lines changed

tests/functional/cylc-set/00-set-succeeded.t

+5-20
Original file line numberDiff line numberDiff line change
@@ -30,30 +30,15 @@ do
3030
sqlite3 ~/cylc-run/"${WORKFLOW_NAME}"/log/db \
3131
"SELECT status FROM task_states WHERE name is \"$TASK\"" > "${TASK}.1"
3232

33-
cmp_ok ${TASK}.1 - << __OUT__
34-
succeeded
35-
__OUT__
33+
cmp_ok ${TASK}.1 - <<<succeeded
3634

3735
sqlite3 ~/cylc-run/"${WORKFLOW_NAME}"/log/db \
3836
"SELECT outputs FROM task_outputs WHERE name is \"$TASK\"" > "${TASK}.2"
3937

40-
# Json string list of outputs from the db may not be ordered correctly.
41-
# E.g., '["submitted", "started", "succeeded", "failed"]'.
42-
python3 - << __END__ > "${TASK}.3"
43-
import json
44-
with open("${TASK}.2", 'r') as f:
45-
print(
46-
','.join(
47-
sorted(
48-
json.load(f)
49-
)
50-
)
51-
)
52-
__END__
53-
54-
cmp_ok "${TASK}.3" - << __OUT__
55-
failed,started,submitted,succeeded
56-
__OUT__
38+
cmp_json \
39+
"check-${TASK}-outputs" \
40+
"${TASK}.2" \
41+
"${TASK}.2"<<<'["submitted", "started", "succeeded", "hello"]'
5742

5843
done
5944
purge

0 commit comments

Comments
 (0)