opensearch-project / job-scheduler

Run periodic jobs on the cluster from your plugin
Apache License 2.0
21 stars 73 forks source link

Improve plugin Code Coverage #616

Closed prudhvigodithi closed 4 months ago

prudhvigodithi commented 4 months ago

Description

This is the 1st PR as part of this issue to improve the repo code coverage gradually.

Issues Resolved

Part of https://github.com/opensearch-project/job-scheduler/issues/612

Check List

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.

prudhvigodithi commented 4 months ago

FYI, I allowed the tests to run few times since yesterday and I get the following error.

{'detail': ErrorDetail(string='Rate limit reached. Please upload with the Codecov repository upload token to resolve issue. Expected available in 2831 seconds.', code='throttled')}

Let me add a Codecov token and update the test workflow to use the token for uploading the test report. @bbarani @cwperks

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 37.37%. Comparing base (1d49ab4) to head (6fb1b11).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #616 +/- ## ============================================ + Coverage 29.17% 37.37% +8.20% - Complexity 98 133 +35 ============================================ Files 22 22 Lines 1186 1188 +2 Branches 109 109 ============================================ + Hits 346 444 +98 + Misses 819 707 -112 - Partials 21 37 +16 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

prudhvigodithi commented 4 months ago

Works now https://app.codecov.io/gh/opensearch-project/job-scheduler/pull/616 and I see the percentage is now 37.27% (from 29.17%).

Screenshot 2024-04-29 at 11 02 41 AM

@cwperks @joshpalis can you please check? @bbarani

prudhvigodithi commented 4 months ago

Thanks @cwperks for reviewing the PR, initially I have to update the access modifiers to make sure those variables/methods are accessible for testing, I have reverted back and replaced to get the getters, can you review again?