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

Allow Postgres tests to be run on a different database #329

Merged
merged 3 commits into from
May 21, 2024

Conversation

mpalmer
Copy link
Contributor

@mpalmer mpalmer commented May 3, 2024

Not everyone has a "scratch" PostgreSQL running on localhost:5432 for refinery to scribble all over. Now you can specify an arbitrary PostgreSQL server to work on with the DB_URI environment variable (which appears to be what refinery-cli already uses) to test in.

Not everyone has a "scratch" PostgreSQL running on localhost:5432 for refinery to scribble all over.
Now you can specify an arbitrary PostgreSQL server to work on with the `DB_URI` environment variable (which appears to be what `refinery-cli` already uses) to test in.
Copy link
Member

@jxs jxs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, and Thanks for your interest! I am curious, can you disclose why are you running refinery's tests?

refinery/tests/postgres.rs Show resolved Hide resolved
@mpalmer
Copy link
Contributor Author

mpalmer commented May 9, 2024

I (was) running refinery's test suite so that I could develop the int8-versions feature, in #330.

* Use a more appropriate name for the function that does the work
* Clean just the `public` schema, rather than drop/create the whole DB.  This means that running the tests no longer requires superuser privs, and that we don't have to temporarily hide out in `template1`.
* Drop the `catch_unwind`, because it's needed any more.
Copy link
Member

@jxs jxs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM thanks! (and sorry for the delay)

refinery/tests/postgres.rs Show resolved Hide resolved
@jxs jxs merged commit 74d066f into rust-db:main May 21, 2024
29 checks passed
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

Successfully merging this pull request may close these issues.

2 participants