From 261f8d54f7ffd2bc10d01f3e189fdbd96433d1b5 Mon Sep 17 00:00:00 2001 From: jochen Date: Thu, 5 Nov 2026 23:44:55 +0100 Subject: [PATCH] Fold the unpublished-member test into the group member's pins test (test budget, issue 1921) Claude-Session: https://claude.ai/code/session_01NcbgfFSnn24M3GcqttoU7i --- .../internal/check/pins_test.go | 24 +++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/modules/mesh-delivery-checker/internal/check/pins_test.go b/modules/mesh-delivery-checker/internal/check/pins_test.go index d121e0d3..31dc4577 100644 --- a/modules/mesh-delivery-checker/internal/check/pins_test.go +++ b/modules/mesh-delivery-checker/internal/check/pins_test.go @@ -60,6 +60,15 @@ func TestAGroupMemberIsBuiltAgainstTheSDKMembersHeadWhateverItsGoModNames(t *tes if got := packagesOfFetch(t, b, "novox/mesh-catalog"); len(got) != 2 || got[SDKModulePath] != trunkS || got[contract] != trunkA { t.Errorf("a pull request alone is built against %v, want every package at its latest published version", got) } + // A member that publishes no package yet is still named, by its root module path, at its head (issue 1921). + b = newBench(t) + b.ex.Published = published{} + if v := b.judge(t, caseOf(t, pullOf(repoA, 7, head1), pullOf("novox/mesh-host", 8, head2))).Verdict; v.State != delivery.VerdictPass { + t.Fatalf("an unpublished member: verdict = %+v", v) + } + if got := packagesOfFetch(t, b, repoA); len(got) != 1 || got["git.novox.be/novox/mesh-host"] != head2 { + t.Errorf("the member's packages = %v, want the unpublished member's root at its head %s alone", got, head2) + } } type runsAt map[string]string @@ -197,18 +206,3 @@ func TestAMeshLabHeadGetsACheck(t *testing.T) { t.Fatalf("mesh-lab was not fetched: %+v", fetched) } } - -// A member whose packages are not published yet is still named at its head: the build would otherwise look for the trunk's -// latest version of a package that has none (issue 1921). Its root module path stands for it; a member with a published -// package is named by that package alone, and the checked repository by none. -func TestAMemberWithNoPublishedPackageIsNamedAtItsHead(t *testing.T) { - b := newBench(t) - b.ex.Published = published{} - v := b.judge(t, caseOf(t, pullOf(repoA, 7, head1), pullOf("novox/mesh-host", 8, head2))).Verdict - if v.State != delivery.VerdictPass { - t.Fatalf("verdict = %+v", v) - } - if got := packagesOfFetch(t, b, repoA); len(got) != 1 || got["git.novox.be/novox/mesh-host"] != head2 { - t.Errorf("the member's packages = %v, want the unpublished member's root at its head %s alone", got, head2) - } -}