The assigner's integration test puts the provider's module before the consumer's, so the consumer's requirement always has a provider to be judged against (the group check's flaky failure, 5 of 40 runs)
This commit is contained in:
@@ -448,9 +448,12 @@ func TestWantsAreWrittenAndNoDifferenceIs(t *testing.T) {
|
||||
toolDigest := b.manifest(t, "tool", `{"module":"tool","version":"1"}`)
|
||||
fpOf := func(c byte) string { return delivery.SourcePrefix2 + strings.Repeat(string(c), 64) }
|
||||
toolOld := fpOf('1')
|
||||
for module, row := range map[string]struct {
|
||||
fp, digest string
|
||||
}{"db": {fpOf('2'), dbDigest}, "app": {fpOf('3'), appDigest}, "tool": {fpOf('4'), toolDigest}} {
|
||||
// In this order: the provider's module is in the indexer's state before the consumer's, so the consumer's requirement
|
||||
// has a provider to be judged against whenever the assigner looks at it (a map's order made it flaky, 5 of 40 runs).
|
||||
for _, row := range []struct {
|
||||
module, fp, digest string
|
||||
}{{"db", fpOf('2'), dbDigest}, {"app", fpOf('3'), appDigest}, {"tool", fpOf('4'), toolDigest}} {
|
||||
module := row.module
|
||||
mod, _ := delivery.EncodeModule(delivery.Module{FP2: row.fp, Manifest: row.digest, Repository: "novox/" + module, Commit: strings.Repeat("2", 40), Path: delivery.RootPath})
|
||||
b.putJSON(t, delivery.ModulesBucket, module, mod)
|
||||
fps := []string{row.fp}
|
||||
|
||||
Reference in New Issue
Block a user