From 72d1189c96b1c63553ca38ab0c554101fb7c96d4 Mon Sep 17 00:00:00 2001 From: Jeffrey Aven Date: Tue, 29 Oct 2024 11:00:23 +1100 Subject: [PATCH] updated tests --- .github/workflows/npm-test.yml | 9 ++++----- .github/workflows/stackql-assert-test.yml | 6 +++--- .../google-example-inline-jsonnet-results.json | 2 +- .../workflow_scripts/google-example-inline-jsonnet.iql | 2 +- .github/workflows/workflow_scripts/google-example.iql | 2 +- action.yml | 4 ++-- 6 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/npm-test.yml b/.github/workflows/npm-test.yml index 5d2106f..c5337b4 100644 --- a/.github/workflows/npm-test.yml +++ b/.github/workflows/npm-test.yml @@ -8,10 +8,9 @@ jobs: steps: - uses: actions/checkout@v4.1.3 - - name: Use Node.js 16 - uses: actions/setup-node@v4.0.2 + - name: Setup Node.js environment + uses: actions/setup-node@v4.1.0 with: - node-version: 16.x + node-version: 18 - run: npm ci - - run: npm test - \ No newline at end of file + - run: npm test \ No newline at end of file diff --git a/.github/workflows/stackql-assert-test.yml b/.github/workflows/stackql-assert-test.yml index a7615e3..eaf6851 100644 --- a/.github/workflows/stackql-assert-test.yml +++ b/.github/workflows/stackql-assert-test.yml @@ -21,7 +21,7 @@ jobs: # Pull required providers # - name: pull required providers - uses: stackql/stackql-exec@v2.2.1 + uses: stackql/stackql-exec@v2.2.3 with: is_command: true query: "REGISTRY PULL google; REGISTRY PULL github" @@ -35,7 +35,7 @@ jobs: test_query: | SELECT name FROM google.compute.instances - WHERE project = 'stackql-demo' AND zone = 'australia-southeast1-a' AND name = 'stackql-demo-001'; + WHERE project = 'stackql-integration-tests' AND zone = 'australia-southeast1-a' and name = 'stackql-test-001'; expected_rows: 1 env: GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }} @@ -47,7 +47,7 @@ jobs: uses: ./ with: test_query_file_path: './.github/workflows/workflow_scripts/google-example.iql' - expected_results_str: '[{"name":"stackql-demo-001"}]' + expected_results_str: '[{"name":"stackql-test-001"}]' env: GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }} diff --git a/.github/workflows/workflow_scripts/google-example-inline-jsonnet-results.json b/.github/workflows/workflow_scripts/google-example-inline-jsonnet-results.json index 8f652aa..ed8d431 100644 --- a/.github/workflows/workflow_scripts/google-example-inline-jsonnet-results.json +++ b/.github/workflows/workflow_scripts/google-example-inline-jsonnet-results.json @@ -1 +1 @@ -[{"name":"stackql-demo-001"}] \ No newline at end of file +[{"name":"stackql-test-001"}] \ No newline at end of file diff --git a/.github/workflows/workflow_scripts/google-example-inline-jsonnet.iql b/.github/workflows/workflow_scripts/google-example-inline-jsonnet.iql index bceabe0..e42aade 100644 --- a/.github/workflows/workflow_scripts/google-example-inline-jsonnet.iql +++ b/.github/workflows/workflow_scripts/google-example-inline-jsonnet.iql @@ -8,4 +8,4 @@ local zone = std.extVar("GOOGLE_ZONE"); >>> SELECT name FROM google.compute.instances -WHERE project = '{{ .project }}' and zone = '{{ .zone }}' and name = 'stackql-demo-001'; \ No newline at end of file +WHERE project = '{{ .project }}' and zone = '{{ .zone }}' and name = 'stackql-test-001'; \ No newline at end of file diff --git a/.github/workflows/workflow_scripts/google-example.iql b/.github/workflows/workflow_scripts/google-example.iql index a10d1cf..acbed77 100644 --- a/.github/workflows/workflow_scripts/google-example.iql +++ b/.github/workflows/workflow_scripts/google-example.iql @@ -1,3 +1,3 @@ SELECT name FROM google.compute.instances -WHERE project = 'stackql-demo' AND zone = 'australia-southeast1-a' AND name = 'stackql-demo-001'; \ No newline at end of file +WHERE project = 'stackql-integration-tests' AND zone = 'australia-southeast1-a' AND name = 'stackql-test-001'; \ No newline at end of file diff --git a/action.yml b/action.yml index 5f12609..1b2fc78 100644 --- a/action.yml +++ b/action.yml @@ -34,13 +34,13 @@ runs: using: "composite" steps: - name: Setup StackQL - uses: stackql/setup-stackql@v2.2.1 + uses: stackql/setup-stackql@v2.2.3 with: use_wrapper: true - name: Execute StackQL Command id: exec-query - uses: stackql/stackql-exec@v2.2.1 + uses: stackql/stackql-exec@v2.2.3 with: query: ${{ inputs.test_query }} query_file_path: ${{ inputs.test_query_file_path }}