Judge the controller's module check against the catalogue it is released with, captured at the group's catalogue head f3a57dcc, so a group that brings a word the trunk's catalogue lacks does not fail on the trunk (issue 774)
The release's fourth check failed TestModuleCheckPassesTheCatalogue with 27 problems. The checker clones the catalogue beside a controller's tests at its trunk, even in a group holding a catalogue pull request (mesh-delivery checker internal/check/beside.go besideFor, ADR 0484 clause 4). The release's sdk refuses an offer stating no credential form, and the trunk's catalogue states none until the release's catalogue merges. - Quick fix (not chosen): recapture alone, which the test never reads while MESH_CHECK_BESIDE is set. - Chosen: the test reads the captured copy, now at the group's catalogue f3a57dcc, through beside.CapturedDir. Every other beside test still reads the clone. The check itself is unchanged: every rule, every manifest. Moving CAPTURED to the catalogue a change is released with is part of that change. Run as the checker runs it (catalogue at main, mesh-host at main, mesh-sdk at the pin, mesh-controller's trunk beside): the whole unit and integration suite passes, 1706 tests, 8 skipped. The test also passes with the catalogue at f3a57dcc beside, and with nothing beside.
This commit is contained in:
@@ -53,6 +53,16 @@ func Dir(t testing.TB, repository string) string {
|
||||
t.Logf("judged against %s as cloned beside this check", dir)
|
||||
return dir
|
||||
}
|
||||
t.Logf("no %s beside this check: a merge check judges %s against its own clone", Env, repository)
|
||||
return CapturedDir(t, repository)
|
||||
}
|
||||
|
||||
// CapturedDir is the copy of the named repository captured in testdata/beside, laid out as Dir lays it out, whatever
|
||||
// MESH_CHECK_BESIDE says: for a test that judges this repository against the commit it was released with, which a
|
||||
// merge check does not clone (it clones the catalogue at its trunk even in a delivery group holding a catalogue pull
|
||||
// request, ADR 0484 clause 4).
|
||||
func CapturedDir(t testing.TB, repository string) string {
|
||||
t.Helper()
|
||||
from := filepath.Join(Captured(), repository)
|
||||
if _, err := os.Stat(from); err != nil {
|
||||
t.Fatalf("no captured copy of %s at %s: %v", repository, from, err)
|
||||
@@ -81,8 +91,7 @@ func Dir(t testing.TB, repository string) string {
|
||||
if err != nil {
|
||||
t.Fatalf("the captured copy of %s could not be laid out: %v", repository, err)
|
||||
}
|
||||
t.Logf("judged against the copy of %s captured in testdata/beside (see CAPTURED); a merge check "+
|
||||
"judges it against the repository's own clone", repository)
|
||||
t.Logf("judged against the copy of %s captured in testdata/beside (see CAPTURED)", repository)
|
||||
return dir
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user