Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 601730e

Browse files
committedMar 24, 2025·
adding cluster name and changing index selection
Signed-off-by: Amit Galitzky <amgalitz@amazon.com>
1 parent d59ee5a commit 601730e

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed
 

‎.github/actions/start-opensearch/action.yml

+8
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,16 @@ inputs:
2626
description: 'HTTP port to run OpenSearch. Leave empty to use the default config (9200)'
2727
required: false
2828
default: '9200'
29+
2930
transport_port:
3031
description: 'Transport port to run OpenSearch transport layer. Leave empty to use the default config (9300-9400)'
3132
required: false
3233
default: '9300-9400'
34+
35+
cluster_name:
36+
description: 'The name given to the created cluster'
37+
required: false
38+
default: 'openesarch'
3339

3440
runs:
3541
using: "composite"
@@ -138,6 +144,8 @@ runs:
138144
echo "cluster.routing.allocation.disk.threshold_enabled: false" >> ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT${{ inputs.port }}/config/opensearch.yml
139145
echo "http.port: ${{ inputs.port }}" >> ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT${{ inputs.port }}/config/opensearch.yml
140146
echo "transport.port: ${{ inputs.transport_port }}" >> ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT${{ inputs.port }}/config/opensearch.yml
147+
echo "cluster.name: ${{ inputs.cluster_name }}" >> ./opensearch-${{ inputs.opensearch-version }}-SNAPSHOT${{ inputs.port }}/config/opensearch.yml
148+
141149
shell: bash
142150
working-directory: ${{ inputs.port }}
143151

‎.github/workflows/release-e2e-workflow-template.yml

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ jobs:
7777
security-enabled: false
7878
port: 9201
7979
transport_port: 9301
80+
cluster_name: 'remote-opensearch'
8081
- uses: ./.github/actions/start-opensearch
8182
with:
8283
opensearch-version: ${{ env.VERSION }}

‎cypress/integration/plugins/anomaly-detection-dashboards-plugin/create_remote_detector_spec.js

+8-13
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ context('Create remote detector workflow', () => {
1717
const TEST_TIMESTAMP_NAME = 'timestamp'; // coming from single_index_response.json fixture
1818
const TEST_INDEX_NAME = 'sample-ad-index';
1919
const TEST_SECOND_INDEX_NAME = 'sample-ad-index-two';
20-
//const TEST_REMOTE_INDEX = 'followCluster:sample-ad-index';
2120

2221
// Clean up created resources
2322
afterEach(() => {
@@ -206,7 +205,7 @@ context('Create remote detector workflow', () => {
206205
selectTopItemFromFilter('timestampFilter', false);
207206

208207
cy.getElementByTestId('defineDetectorNextButton').click();
209-
// cy.wait(5000);
208+
cy.wait(1000);
210209
cy.getElementByTestId('defineOrEditDetectorTitle').should('not.exist');
211210
cy.getElementByTestId('configureOrEditModelConfigurationTitle').should(
212211
'exist'
@@ -270,26 +269,22 @@ context('Create remote detector workflow', () => {
270269
`${remoteClusterName} (Remote)`
271270
).click();
272271

273-
cy.wait(3000);
274-
275-
cy.getElementByTestId('indicesFilter').click();
276-
277-
cy.getElementByTestId('indicesFilter').type(TEST_INDEX_NAME);
278-
cy.wait(500);
279-
cy.get('.euiComboBoxOption__content')
280-
.contains(`${remoteClusterName}:${TEST_INDEX_NAME}`)
281-
.click();
272+
cy.wait(1000);
282273

283274
cy.getElementByTestId('indicesFilter').click();
284275
cy.getElementByTestId('indicesFilter').type(TEST_INDEX_NAME);
285276
cy.wait(500);
286277
cy.get('.euiComboBoxOption__content').contains(TEST_INDEX_NAME).click();
287278

288279
cy.getElementByTestId('indicesFilter').click();
289-
cy.getElementByTestId('indicesFilter').type(TEST_SECOND_INDEX_NAME);
290-
cy.wait(500);
280+
cy.wait(1000);
281+
282+
cy.getElementByTestId('indicesFilter').type('sample-ad-index-t');
283+
cy.wait(1000);
284+
291285
cy.get('.euiComboBoxOption__content')
292286
.contains(`${remoteClusterName}:${TEST_SECOND_INDEX_NAME}`)
287+
.should('exist')
293288
.click();
294289

295290
selectTopItemFromFilter('timestampFilter', false);

0 commit comments

Comments
 (0)
Please sign in to comment.