Commit b58fd61f44

b58fd61f44ebfcc79c612736775840cb64ba7002

parent: adeefc6b75

Verified · cmc

cmc <hello@cleberg.net> · 2026-09-20 10:40 UTC

e2e: check the exit code in the device-reap poll

waitFor's other callers all poll for presence, where a failing ssh
call can only cause a timeout. This one polls for absence: a
transient failure returns empty stdout, which read as a false
"reaped" without checking the exit code too.

Ref #89
e2e/push_test.go +6 −2
@@ -134,8 +134,12 @@ environment = "production"
134134 t.Fatalf("issue comment: %s%s", out, errOut)
135135 }
136136 waitFor(t, "the device to be reaped after a 410", func() bool {
137 out, _, _ := inst.ssh(t, bobKey, "", "notifications", "device", "list", "--json")
138 return !strings.Contains(out, "iphone")
137 // This is an absence check, unlike every other waitFor in the
138 // suite: a transient ssh failure returns empty stdout, which
139 // would otherwise read as a false "reaped". The exit code rules
140 // that out.
141 out, _, code := inst.ssh(t, bobKey, "", "notifications", "device", "list", "--json")
142 return code == 0 && !strings.Contains(out, "iphone")
139143 })
140144
141145 // The inbox is untouched by any of it: push is a side channel.