|
| 1 | +name: Cypress Tests Multitenancy Disabled |
| 2 | + |
| 3 | +on: [ push, pull_request ] |
| 4 | + |
| 5 | +env: |
| 6 | + TEST_BROWSER_HEADLESS: 1 |
| 7 | + CI: 1 |
| 8 | + FTR_PATH: 'ftr' |
| 9 | + START_CMD: 'node ../scripts/opensearch_dashboards --dev --no-base-path --no-watch --opensearch_security.multitenancy.enable_aggregation_view=true' |
| 10 | + OPENSEARCH_SNAPSHOT_CMD: 'node ../scripts/opensearch snapshot' |
| 11 | + SPEC: 'cypress/integration/plugins/security-dashboards-plugin/aggregation_view.js,' |
| 12 | + OPENSEARCH_VERSION: 2.8.0 |
| 13 | + PLUGIN_NAME: opensearch-security |
| 14 | + PLUGIN_VERSION: 2.8.0.0 |
| 15 | + |
| 16 | +jobs: |
| 17 | + tests: |
| 18 | + name: Run Cypress Tests Multitenancy Disabled |
| 19 | + strategy: |
| 20 | + fail-fast: false |
| 21 | + matrix: |
| 22 | + os: [ ubuntu-latest , windows-latest ] |
| 23 | + runs-on: ${{ matrix.os }} |
| 24 | + |
| 25 | + steps: |
| 26 | + - name: Set up JDK |
| 27 | + uses: actions/setup-java@v1 |
| 28 | + with: |
| 29 | + java-version: 11 |
| 30 | + |
| 31 | + - name: Checkout Branch |
| 32 | + uses: actions/checkout@v3 |
| 33 | + |
| 34 | + - name: Download security plugin and create setup scripts |
| 35 | + uses: ./.github/actions/download-plugin |
| 36 | + with: |
| 37 | + opensearch-version: ${{ env.OPENSEARCH_VERSION }} |
| 38 | + plugin-name: ${{ env.PLUGIN_NAME }} |
| 39 | + plugin-version: ${{ env.PLUGIN_VERSION }} |
| 40 | + |
| 41 | + - name: Run Opensearch with A Single Plugin |
| 42 | + uses: opensearch-project/security/.github/actions/start-opensearch-with-one-plugin@main |
| 43 | + with: |
| 44 | + opensearch-version: ${{ env.OPENSEARCH_VERSION }} |
| 45 | + plugin-name: ${{ env.PLUGIN_NAME }} |
| 46 | + setup-script-name: setup |
| 47 | + |
| 48 | + - name: Run Dashboard with Security Dashboards Plugin |
| 49 | + uses: ./.github/actions/install-dashboards |
| 50 | + with: |
| 51 | + plugin_name: security-dashboards-plugin |
| 52 | + |
| 53 | + - name: Configure and Run OpenSearch Dashboards with Cypress Test Cases |
| 54 | + run: | |
| 55 | + cd ./OpenSearch-Dashboards |
| 56 | + echo 'server.host: "0.0.0.0"' >> ./config/opensearch_dashboards.yml |
| 57 | + echo 'opensearch.hosts: ["https://localhost:9200"]' >> ./config/opensearch_dashboards.yml |
| 58 | + echo 'opensearch.ssl.verificationMode: none' >> ./config/opensearch_dashboards.yml |
| 59 | + echo 'opensearch.username: "kibanaserver"' >> ./config/opensearch_dashboards.yml |
| 60 | + echo 'opensearch.password: "kibanaserver"' >> ./config/opensearch_dashboards.yml |
| 61 | + echo 'opensearch.requestHeadersWhitelist: [ authorization,securitytenant ]' >> ./config/opensearch_dashboards.yml |
| 62 | + echo 'opensearch_security.multitenancy.enabled: false' >> ./config/opensearch_dashboards.yml |
| 63 | + echo 'opensearch_security.readonly_mode.roles: ["kibana_read_only"]' >> ./config/opensearch_dashboards.yml |
| 64 | + echo 'opensearch_security.cookie.secure: false' >> ./config/opensearch_dashboards.yml |
| 65 | + nohup yarn start --no-base-path --no-watch & |
| 66 | + sleep 500 |
| 67 | + git clone https://github.com/opensearch-project/opensearch-dashboards-functional-test.git |
| 68 | + cd opensearch-dashboards-functional-test |
| 69 | + npm install cypress --save-dev |
| 70 | + yarn cypress:run-with-security --browser chrome --spec "cypress/integration/plugins/security-dashboards-plugin/inaccessible_tenancy_features.js" |
0 commit comments