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

[BCF-2689] Use an in-memory keystore for tests #10897

Closed
wants to merge 1 commit into from

Conversation

cedric-cordenier
Copy link
Contributor

@cedric-cordenier cedric-cordenier commented Oct 10, 2023

  • Remove unused migration methods from the keystore
  • Split the keystore ORM in two, between methods which access the
    encrypted_key_rings table, and methods which access evm.key_states
  • Create an in-memory version of the base ORM, which doesn't actually
    write to the DB. Methods which access evm.key_states are unaffected
    by this. This will prevent tests from competing to get a row-level
    lock on the singleton keystore record.
  • Start using this in-memory keystore in cltest and in tests
    generally. Note: tests in the keystore package themselves are
    unaffected by this, since we still want to have test coverage over the
    behaviour that accesses the DB.

@cedric-cordenier cedric-cordenier force-pushed the tests-stop-using-keystore branch from 7ce5d15 to a1f4178 Compare October 10, 2023 13:13
@github-actions
Copy link
Contributor

I see that you haven't updated any CHANGELOG files. Would it make sense to do so?

@github-actions
Copy link
Contributor

I see that you haven't updated any README files. Would it make sense to do so?

@cedric-cordenier cedric-cordenier force-pushed the tests-stop-using-keystore branch 9 times, most recently from 65e330d to 3ab5268 Compare October 11, 2023 12:57
@cedric-cordenier cedric-cordenier changed the title [WIP] Stop using db-based keystore in tests (except in keystore package) [BCF-2689] Use an in-memory keystore for tests Oct 11, 2023
@cedric-cordenier cedric-cordenier force-pushed the tests-stop-using-keystore branch 2 times, most recently from 5fccbc0 to 5fed62f Compare October 11, 2023 13:41
@cedric-cordenier cedric-cordenier marked this pull request as ready for review October 11, 2023 13:42
jmank88
jmank88 previously approved these changes Oct 11, 2023
george-dorin
george-dorin previously approved these changes Oct 11, 2023
@cedric-cordenier cedric-cordenier dismissed stale reviews from george-dorin and jmank88 via e8c6801 October 11, 2023 15:12
@cedric-cordenier cedric-cordenier force-pushed the tests-stop-using-keystore branch 5 times, most recently from f8a1e2c to c50fe85 Compare October 12, 2023 12:39
auto-merge was automatically disabled October 12, 2023 12:54

Pull request was closed

@cedric-cordenier cedric-cordenier force-pushed the tests-stop-using-keystore branch 3 times, most recently from 6b94f6a to ece97c3 Compare October 12, 2023 14:07
@cedric-cordenier cedric-cordenier force-pushed the tests-stop-using-keystore branch 3 times, most recently from f2161fd to 83b9d4a Compare October 13, 2023 10:17
- Remove unused migration methods from the keystore
- Split the keystore ORM in two, between methods which access the
  `encrypted_key_rings` table, and methods which access `evm.key_states`
- Create an in-memory version of the base ORM, which doesn't actually
  write to the DB. Methods which access `evm.key_states` are unaffected
  by this. This will prevent tests from competing to get a row-level
  lock on the singleton keystore record.
- Start using this in-memory keystore in `cltest` and in tests
  generally. Note: tests in the keystore package themselves are
  unaffected by this, since we still want to have test coverage over the
  behaviour that accesses the DB.
@cl-sonarqube-production
Copy link

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.

3 participants