Skip to content

Commit d2abcb7

Browse files
committed
test: fix flaky stack_submit_with_assignees
Replace cmpenv stderr golden file comparison with individual stderr assertions. The exact comparison was flaky because a "Failed to cache templates" warning could non-deterministically appear in stderr when the template caching timeout fires. Individual stderr assertions match the pattern used by stack_submit.txt and are tolerant of extra log lines.
1 parent 27b729c commit d2abcb7

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

testdata/script/stack_submit_with_assignees.txt

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ git config spice.submit.assignees spice
3636
# submit the entire stack from the middle.
3737
git checkout feature1
3838
gs stack submit --fill --assign alex --assign beatrice,cameron
39-
cmpenv stderr $WORK/golden/submit-log.txt
39+
stderr 'Created #1'
40+
stderr 'Created #2'
41+
stderr 'Created #3'
4042

4143
shamhub dump changes
4244
cmpenvJSON stdout $WORK/golden/start.json
@@ -61,10 +63,6 @@ This is feature 2
6163
-- repo/feature3.txt --
6264
This is feature 3
6365

64-
-- golden/submit-log.txt --
65-
INF Created #1: $SHAMHUB_URL/alice/example/change/1
66-
INF Created #2: $SHAMHUB_URL/alice/example/change/2
67-
INF Created #3: $SHAMHUB_URL/alice/example/change/3
6866
-- golden/start.json --
6967
[
7068
{

0 commit comments

Comments
 (0)