Skip to content

Commit

Permalink
Use version from package.json for integration tests (#1463)
Browse files Browse the repository at this point in the history
* Use version from package.json for integration tests

Signed-off-by: Craig Perkins <[email protected]>
  • Loading branch information
cwperks authored Jun 1, 2023
1 parent c0f9f76 commit e6fa27b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/cypress-test-tenancy-disabled.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ env:
START_CMD: 'node ../scripts/opensearch_dashboards --dev --no-base-path --no-watch --opensearch_security.multitenancy.enable_aggregation_view=true'
OPENSEARCH_SNAPSHOT_CMD: 'node ../scripts/opensearch snapshot'
SPEC: 'cypress/integration/plugins/security-dashboards-plugin/aggregation_view.js,'
OPENSEARCH_VERSION: 3.0.0
PLUGIN_NAME: opensearch-security
PLUGIN_VERSION: 3.0.0.0

jobs:
tests:
Expand All @@ -31,6 +29,14 @@ jobs:
- name: Checkout Branch
uses: actions/checkout@v3

- name: Set env
run: |
opensearch_version=$(node -p "require('./package.json').opensearchDashboards.version")
plugin_version=$(node -p "require('./package.json').version")
echo "OPENSEARCH_VERSION=$opensearch_version" >> $GITHUB_ENV
echo "PLUGIN_VERSION=$plugin_version" >> $GITHUB_ENV
shell: bash

- name: Download security plugin and create setup scripts
uses: ./.github/actions/download-plugin
with:
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/cypress-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ env:
START_CMD: 'node ../scripts/opensearch_dashboards --dev --no-base-path --no-watch --opensearch_security.multitenancy.enable_aggregation_view=true'
OPENSEARCH_SNAPSHOT_CMD: 'node ../scripts/opensearch snapshot'
SPEC: 'cypress/integration/plugins/security-dashboards-plugin/aggregation_view.js,'
OPENSEARCH_VERSION: 3.0.0
PLUGIN_NAME: opensearch-security
PLUGIN_VERSION: 3.0.0.0

jobs:
tests:
Expand All @@ -31,6 +29,14 @@ jobs:
- name: Checkout Branch
uses: actions/checkout@v3

- name: Set env
run: |
opensearch_version=$(node -p "require('./package.json').opensearchDashboards.version")
plugin_version=$(node -p "require('./package.json').version")
echo "OPENSEARCH_VERSION=$opensearch_version" >> $GITHUB_ENV
echo "PLUGIN_VERSION=$plugin_version" >> $GITHUB_ENV
shell: bash

- name: Download security plugin and create setup scripts
uses: ./.github/actions/download-plugin
with:
Expand Down
10 changes: 8 additions & 2 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ on: [push, pull_request]
env:
TEST_BROWSER_HEADLESS: 1
CI: 1
OPENSEARCH_VERSION: 3.0.0
PLUGIN_NAME: opensearch-security
PLUGIN_VERSION: 3.0.0.0

jobs:
tests:
Expand All @@ -27,6 +25,14 @@ jobs:
with:
java-version: 11

- name: Set env
run: |
opensearch_version=$(node -p "require('./package.json').opensearchDashboards.version")
plugin_version=$(node -p "require('./package.json').version")
echo "OPENSEARCH_VERSION=$opensearch_version" >> $GITHUB_ENV
echo "PLUGIN_VERSION=$plugin_version" >> $GITHUB_ENV
shell: bash

- uses: browser-actions/[email protected]
- run: geckodriver --version

Expand Down

0 comments on commit e6fa27b

Please sign in to comment.