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

Database for tests #99

Open
rhiaro opened this issue Jul 24, 2020 · 2 comments
Open

Database for tests #99

rhiaro opened this issue Jul 24, 2020 · 2 comments

Comments

@rhiaro
Copy link
Collaborator

rhiaro commented Jul 24, 2020

I keep forgetting to change the db when I run tests which affect the database, so I end up dropping my local database and it's a bit inconvenient to have to re-download loads of raw data again for development.

Can we add a postgres URL to settings for a test database, and use that by default in all the tests to avoid this happening?

@odscjames
Copy link
Collaborator

We can add something to settings, but then we'd have to be able to detect we were in tests somehow and switch to using the test URL instead of the real one. I don't know if mocha has anything that would help with that, I'd have to look.

@rhiaro
Copy link
Collaborator Author

rhiaro commented Jul 24, 2020

I think it would be fine in the tests to pass something when initiating the db connection rather than having it detect it by itself, I'm just not sure what to pass to where at the moment

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

2 participants