-
Notifications
You must be signed in to change notification settings - Fork 288
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 opik.config unit tests #270
Conversation
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.
@japdubengsub good coverage! I tried to break the logic in a few places and the tests caught it 👍
One thing that you should change - make sure that your tests are isolated from the real environment.
In my local dev setup for example I have OPIK_URL_OVERRIDE=http://localhost:5173/api
environment variable specified for tests. Some of your tests fail because this environment variable affected OpikConfig.
I recommend replacing real OpikConfig instance with a fake one via mock/fixture.
* add unit test * add unit test part II * add unit test part III * add unit test part IV * add unit test part V * add unit test part VII * add unit test chapter VIII * add unit test chapter IX * add unit test chapter XI * add unit test chapter XII * add mock for env vars and config file
Details
Added a set of unit tests for the configure() method and the objects it uses. Performed a medium refactoring to make writing unit tests easier.