MCPcopy Create free account
hub / github.com/adlio/schema / TestMigrationFromFilePath

Function TestMigrationFromFilePath

file_test.go:9–16  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

7)
8
9func TestMigrationFromFilePath(t *testing.T) {
10 migration, err := MigrationFromFilePath("./test-migrations/saas/2019-01-01 0900 Create Users.sql")
11 if err != nil {
12 t.Error(err)
13 }
14 expectID(t, migration, "2019-01-01 0900 Create Users")
15 expectScriptMatch(t, migration, `^CREATE TABLE users`)
16}
17
18func TestMigrationFromFilePathWithInvalidPath(t *testing.T) {
19 _, err := MigrationFromFilePath("./test-migrations/saas/nonexistent-file.sql")

Callers

nothing calls this directly

Calls 3

MigrationFromFilePathFunction · 0.85
expectIDFunction · 0.85
expectScriptMatchFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…