Skip to content

Increase coverage target#4

Merged
stephen-crawford merged 2 commits intostephen-crawford:boostedCoveragefrom
peternied:boostedCoverage
Aug 22, 2023
Merged

Increase coverage target#4
stephen-crawford merged 2 commits intostephen-crawford:boostedCoveragefrom
peternied:boostedCoverage

Conversation

@peternied
Copy link
Collaborator

Description

In RestLayerPrivilegesEvaluator there was a number of unused parameters removed those to trim down the test requirements.

For the test cases switched to assertThat for easy of reading, enabled debug logging to exercise debug logging code, adjusted usages of mocks for cleaner test flow in a couple of spaces.

Verified locally with the following command and then checked the jacoco report under build/reports/jacoco/test/html/...

./gradlew jacocoTestReport test --tests \
  org.opensearch.security.privileges.RestLayerPrivilegesEvaluatorTest

Signed-off-by: Peter Nied petern@amazon.com

In RestLayerPrivilegesEvaluator there was a number of unused parameters
removed those to trim down the test requirements.

For the test cases switched to assertThat for easy of reading, enabled
debug logging to exercise debug logging code, adjusted usages of mocks
for cleaner test flow in a couple of spaces.

Verified locally with the following command and then checked the jacoco
report under build/reports/jacoco/test/html/...

./gradlew jacocoTestReport test --tests \
  org.opensearch.security.privileges.RestLayerPrivilegesEvaluatorTest

Signed-off-by: Peter Nied <petern@amazon.com>
…erage

Signed-off-by: Peter Nied <petern@amazon.com>
@peternied
Copy link
Collaborator Author

image

From my local report

}

@Test
public void testIsInitialized_False() {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Rearranged to testEvaluate_NotInitialized_NullModel_ExceptionThrown method

@stephen-crawford stephen-crawford merged commit 3fb77a7 into stephen-crawford:boostedCoverage Aug 22, 2023
@peternied peternied deleted the boostedCoverage branch August 22, 2023 17:10
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