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

Mock bcrypt during make test-integration #935

Merged
merged 2 commits into from
Aug 2, 2023

Conversation

matthew-white
Copy link
Member

We have a few different makefile rules related to testing: test, test-full, test-integration, and test-unit. test-full is what's run in CircleCI, but test is much faster because it mocks bcrypt. test-integration and test-unit run a subset of tests, and I believe they're only run locally. However, unlike test, they don't mock bcrypt. I've noticed that this makes test-integration take a long time. I often run test-integration, and it'd be nice if it mocked bcrypt so that it was faster. Another way to put it is that I think test-integration should be a subset of test rather than a subset of test-full. I think it's important that tests in CircleCI don't mock bcrypt, but while iterating on development locally, it's nice to be able to run tests more quickly.

I thought about mocking bcrypt in test-unit as well, but unlike test-integration, test-unit runs quite quickly, so I don't think it needs it.

Before submitting this PR, please make sure you have:

  • run make test-full and confirmed all checks still pass OR confirm CircleCI build passes
  • verified that any code from external sources are properly credited in comments or that everything is internally sourced

Makefile Outdated Show resolved Hide resolved
Copy link
Member

@ktuite ktuite left a comment

Choose a reason for hiding this comment

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

I like this change a lot and I think Alex's point about removing env (in both places) checks out.

@matthew-white matthew-white merged commit 228d95d into master Aug 2, 2023
1 check passed
@matthew-white matthew-white deleted the no-bcrypt-integration branch August 2, 2023 03:49
sadiqkhoja pushed a commit to sadiqkhoja/central-backend that referenced this pull request Sep 1, 2023
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