Merge pull request 'indexer test: seed a want and a running build before an entry may be removed' (#240) from fix/47-G-integration-tests into main
This commit was merged in pull request #240.
This commit is contained in:
@@ -1027,6 +1027,17 @@ func TestIndexerWritesModulesAtAMerge(t *testing.T) { // 1239/AC9; I1, I3: the m
|
||||
if asks, err = js.CreateKeyValue(ctx, jetstream.KeyValueConfig{Bucket: index.Bucket(testIndexer, index.TakeInsState), History: 1}); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
// A want and a running build said before the start: the indexer removes no entry until both streams were read whole and
|
||||
// not empty (design 47 G §675, 5188d36a), so the drop below removes entry.dx only with them.
|
||||
fp := "src2:" + strings.Repeat("b", 64)
|
||||
at := time.Now().UTC()
|
||||
want, _ := json.Marshal(meshwants.WantedEvent{V: 1, Node: "n1", Module: "avahi", Fp: fp, Revision: 1, At: &at})
|
||||
run, _ := json.Marshal(nodeengine.Running{V: 1, Node: "n2", Module: "avahi", Fingerprint: fp, At: at})
|
||||
for subject, data := range map[string][]byte{meshwants.SubjectWanted("n1", "avahi"): want, nodeengine.SubjectRunning("n2", "avahi"): run} {
|
||||
if _, err := js.Publish(ctx, subject, data); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
})
|
||||
const merge = "89abcdef0123456789abcdef0123456789abcdef"
|
||||
data, err := forgemsg.EncodeForge(forgemsg.Forge{Kind: forgemsg.ForgeMerged, Repository: "novox/mesh-delivery", Branch: "feat/x", Number: 12,
|
||||
|
||||
Reference in New Issue
Block a user