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

add opik.config unit tests #270

Merged
merged 12 commits into from
Sep 24, 2024
Merged

add opik.config unit tests #270

merged 12 commits into from
Sep 24, 2024

Conversation

japdubengsub
Copy link
Contributor

@japdubengsub japdubengsub commented Sep 17, 2024

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.

@japdubengsub japdubengsub marked this pull request as ready for review September 20, 2024 19:01
@japdubengsub japdubengsub requested a review from a team as a code owner September 20, 2024 19:01
@japdubengsub japdubengsub changed the title add unit test add opik.config unit tests Sep 20, 2024
Copy link
Collaborator

@alexkuzmik alexkuzmik left a 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.

@alexkuzmik alexkuzmik merged commit 28399a4 into main Sep 24, 2024
21 checks passed
@alexkuzmik alexkuzmik deleted the OPIK-119 branch September 24, 2024 12:11
dsblank pushed a commit that referenced this pull request Oct 4, 2024
* 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
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.

2 participants