Mock bcrypt during make test-integration
#935
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We have a few different makefile rules related to testing:
test
,test-full
,test-integration
, andtest-unit
.test-full
is what's run in CircleCI, buttest
is much faster because it mocks bcrypt.test-integration
andtest-unit
run a subset of tests, and I believe they're only run locally. However, unliketest
, they don't mock bcrypt. I've noticed that this makestest-integration
take a long time. I often runtest-integration
, and it'd be nice if it mocked bcrypt so that it was faster. Another way to put it is that I thinktest-integration
should be a subset oftest
rather than a subset oftest-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 unliketest-integration
,test-unit
runs quite quickly, so I don't think it needs it.Before submitting this PR, please make sure you have:
make test-full
and confirmed all checks still pass OR confirm CircleCI build passes