MCPcopy Create free account
hub / github.com/bytebase/bytebase / assertAtLeastOneUIDCollides

Function assertAtLeastOneUIDCollides

backend/tests/collision_helper_test.go:380–393  ·  view source on GitHub ↗
(t *testing.T, aUIDs, bUIDs []int64, label string)

Source from the content-addressed store, hash-verified

378}
379
380func assertAtLeastOneUIDCollides(t *testing.T, aUIDs, bUIDs []int64, label string) {
381 t.Helper()
382 aSet := make(map[int64]bool, len(aUIDs))
383 for _, u := range aUIDs {
384 aSet[u] = true
385 }
386 for _, u := range bUIDs {
387 if aSet[u] {
388 return
389 }
390 }
391 require.Failf(t, "fixture invariant broken",
392 "projects A and B should have at least one %s UID in common. Got A=%v, B=%v", label, aUIDs, bUIDs)
393}
394
395// listPlanUIDs returns every plan UID in the project, via the public gRPC
396// ListPlans API. UIDs are parsed from the resource names.

Callers 3

assertFixtureIDsCollideFunction · 0.85
assertTaskRunsCollideFunction · 0.85
assertTasksCollideFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected