diff --git a/.github/workflows/release-signoff-chrome.yml b/.github/workflows/release-signoff-chrome.yml index e6bdb4775..22d95298b 100644 --- a/.github/workflows/release-signoff-chrome.yml +++ b/.github/workflows/release-signoff-chrome.yml @@ -34,6 +34,11 @@ jobs: cd opensearch-${{ env.VERSION }}/ ./opensearch-tar-install.sh & timeout 900 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} -k https://localhost:9200)" != "200" ]]; do sleep 5; done' + - uses: derek-ho/start-opensearch@v3 + with: + opensearch-version: ${{ env.VERSION }} + security-enabled: false + port: 9201 - name: Get OpenSearch-Dashboards run: | wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/${{ env.VERSION }}/latest/linux/x64/tar/dist/opensearch-dashboards/opensearch-dashboards-${{ env.VERSION }}-linux-x64.tar.gz diff --git a/.github/workflows/release-signoff-chromium-ad-only.yml b/.github/workflows/release-signoff-chromium-ad-only.yml index d4db844d9..ccb14dbd1 100644 --- a/.github/workflows/release-signoff-chromium-ad-only.yml +++ b/.github/workflows/release-signoff-chromium-ad-only.yml @@ -34,6 +34,11 @@ jobs: cd opensearch-${{ env.VERSION }}/ ./opensearch-tar-install.sh & timeout 900 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} -k https://localhost:9200)" != "200" ]]; do sleep 5; done' + - uses: derek-ho/start-opensearch@v3 + with: + opensearch-version: ${{ env.VERSION }} + security-enabled: false + port: 9201 - name: Get OpenSearch-Dashboards run: | wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/${{ env.VERSION }}/latest/linux/x64/tar/dist/opensearch-dashboards/opensearch-dashboards-${{ env.VERSION }}-linux-x64.tar.gz diff --git a/.github/workflows/release-signoff-chromium-ism-only.yml b/.github/workflows/release-signoff-chromium-ism-only.yml index 6f0d5d3d1..0db14841f 100644 --- a/.github/workflows/release-signoff-chromium-ism-only.yml +++ b/.github/workflows/release-signoff-chromium-ism-only.yml @@ -34,6 +34,11 @@ jobs: cd opensearch-${{ env.VERSION }}/ ./opensearch-tar-install.sh & timeout 900 bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' -u admin:${{ env.OPENSEARCH_INITIAL_ADMIN_PASSWORD }} -k https://localhost:9200)" != "200" ]]; do sleep 5; done' + - uses: derek-ho/start-opensearch@v3 + with: + opensearch-version: ${{ env.VERSION }} + security-enabled: false + port: 9201 - name: Get OpenSearch-Dashboards run: | wget https://ci.opensearch.org/ci/dbc/distribution-build-opensearch-dashboards/${{ env.VERSION }}/latest/linux/x64/tar/dist/opensearch-dashboards/opensearch-dashboards-${{ env.VERSION }}-linux-x64.tar.gz diff --git a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/datasource-management-plugin/1_create_datasource.spec.js b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/datasource-management-plugin/1_create_datasource.spec.js index 16340acb8..717a51d9c 100644 --- a/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/datasource-management-plugin/1_create_datasource.spec.js +++ b/cypress/integration/core-opensearch-dashboards/opensearch-dashboards/datasource-management-plugin/1_create_datasource.spec.js @@ -17,6 +17,23 @@ const REGION = 'us-east-1'; const ACCESS_KEY = 'accessKey'; const SECRET_KEY = 'secretKey'; +export const CreateDataSourceNoAuth = () => { + cy.visit( + 'http://localhost:5601/app/management/opensearch-dashboards/dataSources/create' + ); + cy.get('[data-test-subj="createDataSourceFormTitleField"]').type('9201'); + cy.get('[data-test-subj="createDataSourceFormEndpointField"]').type( + 'http://localhost:9201' + ); + cy.get('[data-test-subj="createDataSourceFormAuthTypeSelect"]').click(); + cy.get('#no_auth').click(); + cy.get('[data-test-subj="createDataSourceTestConnectionButton"]').click(); + cy.get('.euiToastHeader__title').should('contain', 'successful'); + cy.get('[data-test-subj="createDataSourceButton"]').click(); +}; + +// TODO: create datasource with basic auth and sigv4 + if (Cypress.env('DATASOURCE_MANAGEMENT_ENABLED')) { describe('Create datasources', () => { before(() => { diff --git a/cypress/utils/commands.js b/cypress/utils/commands.js index 19f84fb66..a4e9e3ed4 100644 --- a/cypress/utils/commands.js +++ b/cypress/utils/commands.js @@ -368,6 +368,21 @@ Cypress.Commands.add('createIndexPattern', (id, attributes, header = {}) => { Cypress.config().baseUrl }/api/saved_objects/index-pattern/${id}`; + console.log(JSON.stringify(url)); + console.log( + JSON.stringify({ + 'content-type': 'application/json;charset=UTF-8', + 'osd-xsrf': true, + ...header, + }) + ); + console.log( + JSON.stringify({ + attributes, + references: [], + }) + ); + cy.request({ method: 'POST', url,