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 test coverage for ComplianceConfig #3952

Merged

Conversation

peternied
Copy link
Member

Description

There are some cases that use datetime that were causing code coverage fluctuations depending on when the tests are run, fixed this by adding a date provider and new unit tests.

Issues Resolved

Check List

  • New functionality includes testing
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

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.

There are some cases that use datetime that were causing code coverage
flutuations depending on when the tests are run, fixed this by adding a
date provider and new unit tests.

- Related opensearch-project#3137

Signed-off-by: Peter Nied <petern@amazon.com>
Signed-off-by: Peter Nied <petern@amazon.com>
@peternied peternied changed the title Ensure compliance configuration test results consistent Ensure compliance configuration test coverage is consistent Jan 16, 2024
@peternied peternied changed the title Ensure compliance configuration test coverage is consistent Add test coverage for ComplianceConfig Jan 16, 2024
Copy link

codecov bot commented Jan 16, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (d734b2e) 65.42% compared to head (abb4c55) 65.47%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3952      +/-   ##
==========================================
+ Coverage   65.42%   65.47%   +0.04%     
==========================================
  Files         298      298              
  Lines       21219    21223       +4     
  Branches     3457     3457              
==========================================
+ Hits        13883    13896      +13     
+ Misses       5616     5609       -7     
+ Partials     1720     1718       -2     
Files Coverage Δ
...ensearch/security/compliance/ComplianceConfig.java 89.10% <75.00%> (+4.89%) ⬆️

... and 3 files with indirect coverage changes

Copy link
Member

@DarshitChanpura DarshitChanpura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you @peternied !

@peternied peternied merged commit 09051f4 into opensearch-project:main Jan 17, 2024
82 checks passed
@peternied peternied added the backport 2.x backport to 2.x branch label Jan 17, 2024
@peternied peternied deleted the stable-compliance-config-tests branch January 17, 2024 17:44
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jan 17, 2024
Signed-off-by: Peter Nied <petern@amazon.com>
(cherry picked from commit 09051f4)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
peternied pushed a commit that referenced this pull request Jan 17, 2024
Backport 09051f4 from #3952.

Signed-off-by: Peter Nied <petern@amazon.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
dlin2028 pushed a commit to dlin2028/security that referenced this pull request May 1, 2024
Signed-off-by: Peter Nied <petern@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x backport to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants