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

Function TestVersionUnique

backend/migrator/migrator_test.go:22–35  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

20}
21
22func TestVersionUnique(t *testing.T) {
23 files, err := getSortedVersionedFiles()
24 require.NoError(t, err)
25 versions := make(map[string]struct{})
26 for _, file := range files {
27 if file.version == nil {
28 continue
29 }
30 if _, ok := versions[file.version.String()]; ok {
31 require.Fail(t, "duplicate version %s", file.version.String())
32 }
33 versions[file.version.String()] = struct{}{}
34 }
35}
36
37func TestMigration3_17_15_DedupeReadOnlyDataSources(t *testing.T) {
38 ctx := context.Background()

Callers

nothing calls this directly

Calls 2

getSortedVersionedFilesFunction · 0.85
StringMethod · 0.65

Tested by

no test coverage detected