Open
Description
I encountered an issue when trying to start an embedded PostgreSQL instance locally. The following error occurs:
failed to get embeddedPostgres: unable to extract postgres archive /Users/yanmeng/.embedded-postgres-go/embedded-postgres-binaries-darwin-arm64v8-16.4.0.txz to /Users/yanmeng/.embedded-postgres-go-17362/extracted, if running parallel tests, configure RuntimePath to isolate testing directories, stat /Users/yanmeng/.embedded-postgres-go-17362: no such file or directory
It seems that, starting from version v1.30.0
, the RuntimePath
is not being created if it doesn't already exist. This behavior differs from v1.17.0
, where the RuntimePath
was automatically created.
The script is:
postgresDataPath = filepath.Join(postgresDataPath,
fmt.Sprintf(".embedded-postgres-go-%d", postgresPort),
"extracted")
postgresConfig := embeddedpostgres.DefaultConfig().
Port(postgresPort).
RuntimePath(postgresDataPath).
BinariesPath(postgresDataPath).
DataPath(filepath.Join(postgresDataPath, "data")).
Database("hoh")
pg.embedded = embeddedpostgres.NewDatabase(postgresConfig)
if err = pg.embedded.Start(); err != nil {
fmt.Printf("failed to get embeddedPostgres: %s", err.Error())
return pg, err
}
Metadata
Metadata
Assignees
Labels
No labels