test: fix log headers (#5222)

* test: fix log headers

* ensure just public types are tested

* fix(postgres): proper statements for setup step 7

---------

Co-authored-by: adlerhurst <silvan.reusser@gmail.com>
This commit is contained in:
Elio Bischof
2023-02-15 04:21:58 +01:00
committed by GitHub
parent 681541f41b
commit 058192c22b
9 changed files with 158 additions and 37 deletions

View File

@@ -18,7 +18,7 @@ type EventstoreIndexes struct {
}
func (mig *EventstoreIndexes) Execute(ctx context.Context) error {
stmt, err := readStmt(mig.dbType)
stmt, err := readStmt(stmts, "04", mig.dbType, "index.sql")
if err != nil {
return err
}
@@ -30,7 +30,7 @@ func (mig *EventstoreIndexes) String() string {
return "04_eventstore_indexes"
}
func readStmt(typ string) (string, error) {
stmt, err := stmts.ReadFile("04/" + typ + "/index.sql")
func readStmt(fs embed.FS, folder, typ, filename string) (string, error) {
stmt, err := fs.ReadFile(folder + "/" + typ + "/" + filename)
return string(stmt), err
}