-
Notifications
You must be signed in to change notification settings - Fork 36
Conversation
Codecov Report
@@ Coverage Diff @@
## main #385 +/- ##
=========================================
Coverage 79.07% 79.07%
Complexity 2658 2658
=========================================
Files 247 247
Lines 11717 11717
Branches 1008 1008
=========================================
Hits 9265 9265
Misses 1971 1971
Partials 481 481
Flags with carried forward coverage won't be shown. Click here to find out more. |
src/test/java/com/amazon/opendistroforelasticsearch/ad/ODFERestTestCase.java
Show resolved
Hide resolved
src/test/java/com/amazon/opendistroforelasticsearch/ad/e2e/DetectionResultEvalutationIT.java
Outdated
Show resolved
Hide resolved
createRoleMapping("anomaly_read_access", new ArrayList<>(Arrays.asList(bobUser))); | ||
createRoleMapping("anomaly_full_access", new ArrayList<>(Arrays.asList(aliceUser, catUser, dogUser))); | ||
createRoleMapping("index_all_access", new ArrayList<>(Arrays.asList(aliceUser, bobUser, catUser, dogUser))); | ||
if (isHttps()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Had an offline chat with @ylwu-amzn .
We intentionally wanted to run these tests if the https flag is set from the arguments. (Refer to comments on original PR: #331 (comment))
We set this in build.gradle: https://github.com/opendistro-for-elasticsearch/anomaly-detection/blob/main/build.gradle#L168-L172
Probably as we discussed the cleaner way is to add another case of false to the build.gradle script instead of adding isHttps() check for all of tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exclude SecureADRestIT
if https is false in case someone test with "-Dhttps=false"
Issue #, if available:
Description of changes:
Fix flaky integration test cases
Test
./gradlew integTest -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="docker-cluster" -Dhttps=true -Dsecurity=true -Duser=admin -Dpassword=admin
./gradlew integTest -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="docker-cluster" -Dhttps=false
and./gradlew integTest -Dtests.rest.cluster=localhost:9200 -Dtests.cluster=localhost:9200 -Dtests.clustername="docker-cluster"
./gradlew build
./gradlew integTest -PnumNodes=3
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.