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

Sqlite: add a test of cascading delete #276

Merged
merged 1 commit into from
May 17, 2019

Conversation

rvl
Copy link
Contributor

@rvl rvl commented May 17, 2019

Relates to #154, base branch PR is #247.

Overview

This adds "cascading" deletes before every Sqlite test. It also demonstrates a good way of speeding up tests -- by performing DB migrations only once per test suite.

Once the other DBLayer methods are implemented, we will be able to see whether cascading deletes actually work under Sqlite.

This will show whether cascading deletes work under sqlite -- once the
functions to write other tables are implemented.
@rvl rvl self-assigned this May 17, 2019

spec :: Spec
spec = do
spec = beforeAll (newDBLayer Nothing) $ beforeWith cleanDB $ do
Copy link
Contributor

Choose a reason for hiding this comment

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

good approach, instantiate db just ONCE before first spec item, and then clean db before EVERY spec item

@paweljakubas paweljakubas merged commit fec073b into rvl/147/sql-conn May 17, 2019
@iohk-bors iohk-bors bot deleted the rvl/147/sql-conn-test branch May 17, 2019 08:39
@KtorZ KtorZ removed this from the SQLite implementation for the DB Layer milestone Jun 5, 2019
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.

None yet

3 participants