Nothing Special   »   [go: up one dir, main page]

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

integration: restore objects backup after all tests are run #408

Open
Garfonso opened this issue May 31, 2021 · 1 comment
Open

integration: restore objects backup after all tests are run #408

Garfonso opened this issue May 31, 2021 · 1 comment

Comments

@Garfonso
Copy link

If you run integration tests on a local system multiple times in a row (for example in order to test them), always the same setup is used ( temp\test-iobroker.adatername ). If you do not clean up the temp directory manually, iobroker and also the db-files will be reused on the next test run.
This leads to the situation that database changes from the last integration test persist between multiple test runs (and may interfere with them). So I vote for an after() clause that restores the backup that is already done during start. Or move the restore of the backup into "afterEach".
Maybe the restore in "afterEach" is even better, because currently the first restore is not necessary, if I understand it correctly.

@AlCalzone
Copy link
Collaborator

I agree. One thing to keep in mind: We need to be able to restore the original database in case the tests crashed - so maybe store that state in a separate file.

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