-
Notifications
You must be signed in to change notification settings - Fork 140
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
Add mongo integration tests #580
Add mongo integration tests #580
Conversation
4af987c
to
ff427fd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use more real data, running in your local, starting some analysis, then use data similar to what you got. If you don't get some cases, I can provide you with other examples.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I'll change the data. If it's not a problem, it would be nice to provide these examples.
Description
Add integration test suit for MongoDB
Closes 579
Proposed Changes
This PR introduces an integration test suite for MongoDB. The focus are the files mongo.go, huskydb.go and huskystats.go. These files contains the main functions related to MongoDB connection and queries. An integration test workflow was added on Github Actions.
Two unit tests that were failing were modified as well:
One unit test in the file
api/util/api/api_test.go
was fixed. The problem was a missing configuration.Another one in the file
api/token/token_test.go
was removed, the one with the description"When GetValidHashFunction returns a false boolean"
. The functionGetValidHashFunction
isn't called by the functionGenerateAccessToken
, the one that the unit test is related to.Testing
To run the integration tests, the Docker need to be running: