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

Function commitmentSQL

internal/store/commitment_dates_migration_test.go:16–27  ·  view source on GitHub ↗
(t *testing.T, pg bool)

Source from the content-addressed store, hash-verified

14const commitmentPGMigration = "131_commitment_dates.sql"
15
16func commitmentSQL(t *testing.T, pg bool) string {
17 t.Helper()
18 fs, path := migrationsFS, "migrations/"+commitmentMigration
19 if pg {
20 fs, path = pgMigrationsFS, "pgmigrations/"+commitmentPGMigration
21 }
22 b, err := fs.ReadFile(path)
23 if err != nil {
24 t.Fatal(err)
25 }
26 return string(b)
27}
28
29func commitmentPreStore(t *testing.T) *Store {
30 t.Helper()

Calls 2

HelperMethod · 0.80
FatalMethod · 0.80

Tested by

no test coverage detected