Artifact cdcd881d76364c425a3d753f96a289cb64a2cdc2721ad71e94635fe4ba416ca4:
- File
conformance/sync_gaps_test.go
— part of check-in
[056f36e0bc]
at
2026-10-13 12:56:03
on branch main
— fix(sync): verify a dangling delta when its basis arrives in the same pass (#417)
Tracked in #412. (user: [email protected], size: 1531) [annotate] [blame] [check-ins using]
package conformance import "testing" // syncGaps marks the sync cases go-libfossil is known to fail, by case ID, // grouped by the code at fault. var syncGaps = map[string]string{} // syncDeviations marks the cases where go-libfossil differs from the draft // on purpose, by case ID, with the reason. var syncDeviations = map[string]string{ "sync.5.2.client-clone-seqno": "the server tolerates a client-sent clone_seqno, " + "which no conforming client sends, rather than answering bad command (#255)", "sync.8.2.clone-zero-phantom": "Clone fetches the phantoms a clone leaves with a " + "follow-up pull, so that a clone it reports done is complete (#255)", "sync.7.7.late-basis-aborts-pass": lateBasisDeviation, "sync.7.7.server-late-basis-aborts-request": lateBasisDeviation, } // lateBasisDeviation is why a late hash mismatch does not abort the pass. const lateBasisDeviation = "a delta found wrong when its basis arrives later in the " + "pass is returned to what it was, but the basis and the rest of the pass stay " + "stored, where the draft's commit hook aborts the whole pass (#412)" // TestSyncGapKeys checks that every marked case exists. func TestSyncGapKeys(t *testing.T) { ids := map[string]bool{} for _, c := range syncSuiteCases() { ids[c.ID] = true } for id := range syncGaps { if !ids[id] { t.Errorf("syncGaps names %s, which is not a case", id) } } for id := range syncDeviations { if !ids[id] { t.Errorf("syncDeviations names %s, which is not a case", id) } } }