MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / commitmentApply

Function commitmentApply

internal/store/commitment_dates_migration_test.go:35–53  ·  view source on GitHub ↗
(t *testing.T, s *Store)

Source from the content-addressed store, hash-verified

33}
34
35func commitmentApply(t *testing.T, s *Store) {
36 t.Helper()
37 if s.dialect.Driver() == DriverPostgres {
38 if err := applyPostgresMigration(s.db, commitmentPGMigration+".probe", commitmentSQL(t, true)); err != nil {
39 t.Fatal(err)
40 }
41 return
42 }
43 if err := applySQLiteMigration(s.db, commitmentMigration, commitmentSQL(t, false)); err != nil {
44 t.Fatal(err)
45 }
46 b, err := migrationsFS.ReadFile("migrations/168_nul_invariant_triggers_post167.sql")
47 if err != nil {
48 t.Fatal(err)
49 }
50 if err := applySQLiteMigration(s.db, "168_nul_invariant_triggers_post167.sql", string(b)); err != nil {
51 t.Fatal(err)
52 }
53}
54
55func commitmentSeed(t *testing.T, s *Store) []string {
56 t.Helper()

Calls 6

applyPostgresMigrationFunction · 0.85
commitmentSQLFunction · 0.85
applySQLiteMigrationFunction · 0.85
HelperMethod · 0.80
FatalMethod · 0.80
DriverMethod · 0.65

Tested by

no test coverage detected