Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
yanmxa opened this issue Dec 16, 2024 · 0 comments
Open

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

yanmxa opened this issue Dec 16, 2024 · 0 comments

Comments

@yanmxa
Copy link

yanmxa commented Dec 16, 2024

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
		}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant