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

[Backport 2.x] Refactor RestApiComplianceAuditlogTest to use TestAuditLogImpl.doThenWaitForMessages (#3733) #3774

Merged
merged 1 commit into from
Nov 29, 2023

Conversation

cwperks
Copy link
Member

@cwperks cwperks commented Nov 28, 2023

Backport #3733 to 2.x

…WaitForMessages (opensearch-project#3733)

Refactors RestApiComplianceAuditlogTest to make this test suite more
stable and re-enable an ignored test.

The primary problem in this test suite is that messages that are auto
populated on startup get polluted with other audit log messages
generated when a user calls REST APIs. To make this more stable, a sleep
was added after `setup` to ignore the auto init messages and only
isolate messages generated on the API calls in each test.

`testAutoInit` is also updated to make it stable. There are 4 automatic
messages generated on cluster startup that have to do with the seeding
of the security index and audit log index.

* Category (Enhancement, New feature, Bug fix, Test fix, Refactoring,
Maintenance, Documentation)

Test Fix

opensearch-project#3730

- [ ] 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](https://github.com/opensearch-project/OpenSearch/blob/main/CONTRIBUTING.md#developer-certificate-of-origin).

---------

Signed-off-by: Craig Perkins <[email protected]>
(cherry picked from commit 6b8a3e4)
Copy link

codecov bot commented Nov 28, 2023

Codecov Report

Merging #3774 (8680758) into 2.x (762306a) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##                2.x    #3774   +/-   ##
=========================================
  Coverage     64.85%   64.85%           
  Complexity     3632     3632           
=========================================
  Files           285      285           
  Lines         20534    20534           
  Branches       3386     3386           
=========================================
  Hits          13318    13318           
  Misses         5536     5536           
  Partials       1680     1680           

see 2 files with indirect coverage changes

@cwperks cwperks merged commit 2942490 into opensearch-project:2.x Nov 29, 2023
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