homecompat: fixed failure messages; assert the no-pending error
Failure output no longer dumps a PlanView. The refused-plan check now requires Home's ErrRefused rather than accepting any error.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+5
−4
homecompat/adopt_test.go+5 −4
diff --git a/homecompat/adopt_test.go b/homecompat/adopt_test.go| index bb811c0..7a5c33b 100644 |
| --- a/homecompat/adopt_test.go |
| +++ b/homecompat/adopt_test.go |
| @@ -6,6 +6,7 @@ package altacompat |
| import ( |
| "context" |
| + "errors" |
| "testing" |
| "time" |
| @@ -59,8 +60,8 @@ func TestHomeAcceptsAltaSignedExistingTeamPlan(t *testing.T) { |
| if o := r.client.SubmitPlan(ctx, homeop.Directory, r.adoptionPlan(t, homeop.Directory, "")); o != homeop.Refused { |
| t.Fatalf("ordinary create-team under oficina: %v", o) |
| } |
| - if _, err := r.home.dirPlans.Pending(ctx, r.home.now); err == nil { |
| - t.Fatal("a refused plan is pending") |
| + if _, err := r.home.dirPlans.Pending(ctx, r.home.now); !errors.Is(err, operator.ErrRefused) { |
| + t.Fatal("a refused plan is pending, or Home failed reading plans") |
| } |
| // The adoption plan verifies on both roles. |
| @@ -74,11 +75,11 @@ func TestHomeAcceptsAltaSignedExistingTeamPlan(t *testing.T) { |
| for _, role := range []string{homeop.Directory, homeop.Credential} { |
| v := r.home.confirm(t, role, owner) |
| if v.ExistingTeam != sqid || v.Kind != homeop.KindCreateTeam { |
| - t.Fatalf("%s plan view: %+v", role, v) |
| + t.Fatalf("%s plan view lost existing_team or kind", role) |
| } |
| views[role] = v |
| } |
| if v := views[homeop.Directory]; v.Label != "oficina" || v.DisplayName != "Oficina" || len(v.Apps) != len(apps) { |
| - t.Fatalf("directory plan view: %+v", v) |
| + t.Fatal("directory plan view lost label, name or apps") |
| } |
| } |