Skip to content

Fails to Create RuntimePath on startup in v1.30.0(Works in v1.17.0) #149

Open
@yanmxa

Description

@yanmxa

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions