MCPcopy
hub / github.com/sqlc-dev/sqlc / TestRemoveGolangMigrateRollback

Function TestRemoveGolangMigrateRollback

internal/migrations/migrations_test.go:91–107  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

89}
90
91func TestRemoveGolangMigrateRollback(t *testing.T) {
92 filenames := map[string]bool{
93 // make sure we let through golang-migrate files that aren't rollbacks
94 "migrations/1.up.sql": false,
95 // make sure we let through other sql files
96 "migrations/2.sql": false,
97 "migrations/foo.sql": false,
98 "migrations/1.down.sql": true,
99 }
100
101 for filename, want := range filenames {
102 got := IsDown(filename)
103 if diff := cmp.Diff(want, got); diff != "" {
104 t.Errorf("IsDown mismatch: %s\n %s", filename, diff)
105 }
106 }
107}

Callers

nothing calls this directly

Calls 1

IsDownFunction · 0.85

Tested by

no test coverage detected