Skip to content

Commit 8f3f074

Browse files
Provide host parameter in integtest.sh (#73)
* Provide host parameter in integtest.sh Signed-off-by: bowenlan-amzn <[email protected]> * Fix cypress security enabled case issue
1 parent 197b426 commit 8f3f074

File tree

5 files changed

+13
-5
lines changed

5 files changed

+13
-5
lines changed

.github/workflows/cypress-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ jobs:
7474
with:
7575
repository: opensearch-project/OpenSearch-Dashboards
7676
path: OpenSearch-Dashboards
77-
ref: '1.0'
77+
ref: '1.x'
7878
- name: Get node and yarn versions
7979
id: versions
8080
run: |

cypress.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"viewportWidth": 1440,
44
"defaultCommandTimeout": 10000,
55
"env": {
6-
"opensearch": "http://localhost:9200",
6+
"opensearch_url": "localhost:9200",
77
"opensearch_dashboards": "http://localhost:5601",
88
"security_enabled": false,
99
"username": "admin",

cypress/support/index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,11 @@ Cypress.on("uncaught:exception", (err) => {
5252
return false;
5353
}
5454
});
55+
56+
// Switch the base URL of Opensearch when security enabled in the cluster
57+
// Not doing this for Dashboards because it can still use http when security enabled
58+
if (Cypress.env("security_enabled")) {
59+
Cypress.env("opensearch", `https://${Cypress.env("opensearch_url")}`);
60+
} else {
61+
Cypress.env("opensearch", `http://${Cypress.env("opensearch_url")}`);
62+
}

integtest.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,4 +74,4 @@ then
7474
fi
7575

7676
yarn osd bootstrap
77-
cypress run --env security_enabled=$SECURITY_ENABLED
77+
cypress run --env security_enabled=$SECURITY_ENABLED opensearch_dashboards=${BIND_ADDRESS}:${BIND_PORT}

opensearch_dashboards.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"id": "indexManagementDashboards",
3-
"version": "1.0.0.0-rc1",
4-
"opensearchDashboardsVersion": "1.0.0-rc1",
3+
"version": "1.0.0.0",
4+
"opensearchDashboardsVersion": "1.1.0",
55
"configPath": ["opensearch_index_management"],
66
"requiredPlugins": ["navigation"],
77
"server": true,

0 commit comments

Comments
 (0)