This repository has been archived by the owner on Aug 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 62
Adds support to run Cypress test in an ODFE cluster with security enabled #235
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…th basic auth when security enabled
The latest successful workflow run: https://github.com/opendistro-for-elasticsearch/alerting-kibana-plugin/actions/runs/484258034 |
ftianli-amzn
requested review from
dbbaughe,
annie3431,
lezzago,
qreshi,
skkosuri-amzn,
bowenlan-amzn and
ohltyler
January 14, 2021 01:34
qreshi
approved these changes
Jan 15, 2021
skkosuri-amzn
approved these changes
Jan 15, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
Description of changes:
security_enabled
to mark if security feature is enabled in the ODFE cluster.When
security_enabled
istrue
:https://localhost:9200
cy.visit()
andcy.request()
to add a basic authentication header (admin:admin
) into the http requests.admin
user doesn't have permission to delete system indicesdeleteMonitorByName
,deleteAllMonitors
,deleteAllDestinations
,createIndexByName
,deleteIndexByName
andinsertDocumentToIndex
admin
user.A noticeable change is adding a unique number in the monitor names to filter the desired alert out.
input
textfield, because when text in textfields is too long, the removing operation can't wait for the text loading and results in uncompleted removing.Usage:
The environment variable
security_enabled
is set to false by default.Appending
--env security_enabled=true
to thecypress
command to change the value, other ways to set the environment variable please refers to the link.Reference: opendistro-for-elasticsearch/anomaly-detection-kibana-plugin@455e3f8
Result for running
cypress run --env security_enabled=true
in an ODFE cluster with security enabled:Result for running
cypress run
in an Elasticsearch cluster with only Alerting plugin:Result for running
yarn test:jest
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.