adopt: tighten two adverse tests per review
Name the inconclusive live check explicitly instead of assuming it is last, and assert the empty-refusal fallback code, not just the parked state.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 files changed,
+9
−5
adopt/gate_adverse_test.go+7 −3provision/adopt_adverse_test.go+2 −2
diff --git a/adopt/gate_adverse_test.go b/adopt/gate_adverse_test.go| index 5977ab0..a13c9d0 100644 |
| --- a/adopt/gate_adverse_test.go |
| +++ b/adopt/gate_adverse_test.go |
| @@ -361,10 +361,14 @@ func TestAdversePlanCRefusedWithoutLiveSuccess(t *testing.T) { |
| } |
| }}, |
| {name: "one inconclusive", checks: func(t *testing.T, s *Store) { |
| - for _, c := range RequiredLiveChecks[:len(RequiredLiveChecks)-1] { |
| - setupOK(t, s.SaveCheck(context.Background(), c, "passed")) |
| + const unsure = "owner-local-access-kept" |
| + for _, c := range RequiredLiveChecks { |
| + outcome := "passed" |
| + if c == unsure { |
| + outcome = "inconclusive" |
| + } |
| + setupOK(t, s.SaveCheck(context.Background(), c, outcome)) |
| } |
| - setupOK(t, s.SaveCheck(context.Background(), "owner-local-access-kept", "inconclusive")) |
| }}, |
| {name: "all inconclusive", checks: func(t *testing.T, s *Store) { |
| for _, c := range RequiredLiveChecks { |
diff --git a/provision/adopt_adverse_test.go b/provision/adopt_adverse_test.go| index 04f8442..b0fcec3 100644 |
| --- a/provision/adopt_adverse_test.go |
| +++ b/provision/adopt_adverse_test.go |
| @@ -100,8 +100,8 @@ func TestAdverseActivationRefusalWithoutCodesStillParks(t *testing.T) { |
| e := a.adopter(nil, obs) |
| a.planA(e) |
| run := a.activate(e, "calendar") |
| - if r := a.drive(e, run, 3); r.State != "parked" { |
| - t.Fatalf("run %s %q", r.State, r.Code) |
| + if r := a.drive(e, run, 3); r.State != "parked" || r.Code != "observe-" { |
| + t.Fatalf("run %s %q, want parked: observe-", r.State, r.Code) |
| } |
| a.neverActivated() |
| } |