From 62985ef2740055ffdf0f3bbc7bf74e31ff2f10bf Mon Sep 17 00:00:00 2001 From: Bradley Lunsford Date: Tue, 6 May 2025 12:27:50 -0700 Subject: [PATCH 1/4] adjusting clientid variable to match sds client's original client_id --- .github/workflows/integration_tests.yml | 142 ++++++++++++------------ unity-test/conftest.py | 2 +- 2 files changed, 72 insertions(+), 72 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index a50e5609..3b4cc9d4 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -39,7 +39,7 @@ jobs: env: UNITY_USERNAME: ${{ secrets.MCP_VENUE_DEV_UNITY_USERNAME }} UNITY_PASSWORD: ${{ secrets.MCP_VENUE_DEV_UNITY_PASSWORD }} - UNITY_CLIENTID: ${{ secrets.MCP_VENUE_DEV_UNITY_CLIENTID }} + UNITY_CLIENT_ID: ${{ secrets.MCP_VENUE_DEV_UNITY_CLIENTID }} run: | pytest -vv -s --gherkin-terminal-reporter \ unity-test/system/integration/step_defs/test_cwl_workflows_with_airflow_api.py \ @@ -57,40 +57,40 @@ jobs: exit 1 fi -# Dev-Venue-OGC-API: -# runs-on: ubuntu-latest -# -# steps: -# - name: Checkout -# uses: actions/checkout@v4 -# -# - name: Setup -# uses: ./.github/actions/setup-action -# continue-on-error: false -# -# - name: MCP Venue Dev - Integration tests with OGC API -# id: mcp_venue_dev_integration_tests_with_ogc_api -# continue-on-error: true -# env: -# UNITY_USERNAME: ${{ secrets.MCP_VENUE_DEV_UNITY_USERNAME }} -# UNITY_PASSWORD: ${{ secrets.MCP_VENUE_DEV_UNITY_PASSWORD }} -# UNITY_CLIENTID: ${{ secrets.MCP_VENUE_DEV_UNITY_CLIENTID }} -# run: | -# pytest -vv -s --gherkin-terminal-reporter \ -# unity-test/system/integration/step_defs/test_cwl_workflows_with_ogc_api.py \ -# --venue="dev" \ -# --airflow-endpoint=${{ github.event.inputs.MCP_VENUE_DEV_AIRFLOW_API_ENDPOINT || vars.MCP_VENUE_DEV_AIRFLOW_API_ENDPOINT }} \ -# --ogc-processes-endpoint=${{ github.event.inputs.MCP_VENUE_DEV_OGC_PROCESSES_API_ENDPOINT || vars.MCP_VENUE_DEV_OGC_PROCESSES_API_ENDPOINT }} -# -# - name: Check Tests Results -# if: always() -# run: | -# tests_status=${{ steps.mcp_venue_dev_integration_tests_with_ogc_api.outcome }} -# echo "Tests Status: $tests_status" -# if [ "$tests_status" != "success" ]; then -# echo "Integration Tests with OGC API on MCP Venue Dev failed." -# exit 1 -# fi + Dev-Venue-OGC-API: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup + uses: ./.github/actions/setup-action + continue-on-error: false + + - name: MCP Venue Dev - Integration tests with OGC API + id: mcp_venue_dev_integration_tests_with_ogc_api + continue-on-error: true + env: + UNITY_USERNAME: ${{ secrets.MCP_VENUE_DEV_UNITY_USERNAME }} + UNITY_PASSWORD: ${{ secrets.MCP_VENUE_DEV_UNITY_PASSWORD }} + UNITY_CLIENT_ID: ${{ secrets.MCP_VENUE_DEV_UNITY_CLIENTID }} + run: | + pytest -vv -s --gherkin-terminal-reporter \ + unity-test/system/integration/step_defs/test_cwl_workflows_with_ogc_api.py \ + --venue="dev" \ + --airflow-endpoint=${{ github.event.inputs.MCP_VENUE_DEV_AIRFLOW_API_ENDPOINT || vars.MCP_VENUE_DEV_AIRFLOW_API_ENDPOINT }} \ + --ogc-processes-endpoint=${{ github.event.inputs.MCP_VENUE_DEV_OGC_PROCESSES_API_ENDPOINT || vars.MCP_VENUE_DEV_OGC_PROCESSES_API_ENDPOINT }} + + - name: Check Tests Results + if: always() + run: | + tests_status=${{ steps.mcp_venue_dev_integration_tests_with_ogc_api.outcome }} + echo "Tests Status: $tests_status" + if [ "$tests_status" != "success" ]; then + echo "Integration Tests with OGC API on MCP Venue Dev failed." + exit 1 + fi Test-Venue-Airflow-API: runs-on: ubuntu-latest @@ -109,7 +109,7 @@ jobs: env: UNITY_USERNAME: ${{ secrets.MCP_VENUE_TEST_UNITY_USERNAME }} UNITY_PASSWORD: ${{ secrets.MCP_VENUE_TEST_UNITY_PASSWORD }} - UNITY_CLIENTID: ${{ secrets.MCP_VENUE_TEST_UNITY_CLIENTID }} + UNITY_CLIENT_ID: ${{ secrets.MCP_VENUE_TEST_UNITY_CLIENTID }} run: | pytest -vv -s --gherkin-terminal-reporter \ unity-test/system/integration/step_defs/test_cwl_workflows_with_airflow_api.py \ @@ -126,38 +126,38 @@ jobs: echo "Integration Tests with Airflow API on MCP Venue Test failed." exit 1 fi -# -# Test-Venue-OGC-API: -# runs-on: ubuntu-latest -# -# steps: -# - name: Checkout -# uses: actions/checkout@v4 -# -# - name: Setup -# uses: ./.github/actions/setup-action -# continue-on-error: false -# -# - name: MCP Venue Test - Integration tests with OGC API -# id: mcp_venue_test_integration_tests_with_ogc_api -# continue-on-error: true -# env: -# UNITY_USERNAME: ${{ secrets.MCP_VENUE_TEST_UNITY_USERNAME }} -# UNITY_PASSWORD: ${{ secrets.MCP_VENUE_TEST_UNITY_PASSWORD }} -# UNITY_CLIENTID: ${{ secrets.MCP_VENUE_TEST_UNITY_CLIENTID }} -# run: | -# pytest -vv -s --gherkin-terminal-reporter \ -# unity-test/system/integration/step_defs/test_cwl_workflows_with_ogc_api.py \ -# --venue="test" \ -# --airflow-endpoint=${{ github.event.inputs.MCP_VENUE_TEST_AIRFLOW_API_ENDPOINT || vars.MCP_VENUE_TEST_AIRFLOW_API_ENDPOINT }} \ -# --ogc-processes-endpoint=${{ github.event.inputs.MCP_VENUE_TEST_OGC_PROCESSES_API_ENDPOINT || vars.MCP_VENUE_TEST_OGC_PROCESSES_API_ENDPOINT }} -# -# - name: Check Tests Results -# if: always() -# run: | -# tests_status=${{ steps.mcp_venue_test_integration_tests_with_ogc_api.outcome }} -# echo "Tests Status: $tests_status" -# if [ "$tests_status" != "success" ]; then -# echo "Integration Tests with OGC API on MCP Venue Test failed." -# exit 1 -# fi + + Test-Venue-OGC-API: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup + uses: ./.github/actions/setup-action + continue-on-error: false + + - name: MCP Venue Test - Integration tests with OGC API + id: mcp_venue_test_integration_tests_with_ogc_api + continue-on-error: true + env: + UNITY_USERNAME: ${{ secrets.MCP_VENUE_TEST_UNITY_USERNAME }} + UNITY_PASSWORD: ${{ secrets.MCP_VENUE_TEST_UNITY_PASSWORD }} + UNITY_CLIENT_ID: ${{ secrets.MCP_VENUE_TEST_UNITY_CLIENTID }} + run: | + pytest -vv -s --gherkin-terminal-reporter \ + unity-test/system/integration/step_defs/test_cwl_workflows_with_ogc_api.py \ + --venue="test" \ + --airflow-endpoint=${{ github.event.inputs.MCP_VENUE_TEST_AIRFLOW_API_ENDPOINT || vars.MCP_VENUE_TEST_AIRFLOW_API_ENDPOINT }} \ + --ogc-processes-endpoint=${{ github.event.inputs.MCP_VENUE_TEST_OGC_PROCESSES_API_ENDPOINT || vars.MCP_VENUE_TEST_OGC_PROCESSES_API_ENDPOINT }} + + - name: Check Tests Results + if: always() + run: | + tests_status=${{ steps.mcp_venue_test_integration_tests_with_ogc_api.outcome }} + echo "Tests Status: $tests_status" + if [ "$tests_status" != "success" ]; then + echo "Integration Tests with OGC API on MCP Venue Test failed." + exit 1 + fi diff --git a/unity-test/conftest.py b/unity-test/conftest.py index ac4efde3..cfd5f7dd 100644 --- a/unity-test/conftest.py +++ b/unity-test/conftest.py @@ -96,7 +96,7 @@ def venue(request): def fetch_token(): username = os.getenv("UNITY_USERNAME") password = os.getenv("UNITY_PASSWORD") - client_id = os.getenv("UNITY_CLIENTID") + client_id = os.getenv("UNITY_CLIENT_ID") region = "us-west-2" url = f"https://cognito-idp.{region}.amazonaws.com" payload = { From 2f2f3f1aef7a3ece181fad8c8625a047d5ad2b03 Mon Sep 17 00:00:00 2001 From: Bradley Lunsford Date: Tue, 6 May 2025 12:37:05 -0700 Subject: [PATCH 2/4] missed that sds client also uses unity_user (not name) --- .github/workflows/integration_tests.yml | 8 ++++---- unity-test/conftest.py | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/integration_tests.yml b/.github/workflows/integration_tests.yml index 3b4cc9d4..f1680f0d 100644 --- a/.github/workflows/integration_tests.yml +++ b/.github/workflows/integration_tests.yml @@ -37,7 +37,7 @@ jobs: id: mcp_venue_dev_integration_tests_with_airflow_api continue-on-error: true env: - UNITY_USERNAME: ${{ secrets.MCP_VENUE_DEV_UNITY_USERNAME }} + UNITY_USER: ${{ secrets.MCP_VENUE_DEV_UNITY_USERNAME }} UNITY_PASSWORD: ${{ secrets.MCP_VENUE_DEV_UNITY_PASSWORD }} UNITY_CLIENT_ID: ${{ secrets.MCP_VENUE_DEV_UNITY_CLIENTID }} run: | @@ -72,7 +72,7 @@ jobs: id: mcp_venue_dev_integration_tests_with_ogc_api continue-on-error: true env: - UNITY_USERNAME: ${{ secrets.MCP_VENUE_DEV_UNITY_USERNAME }} + UNITY_USER: ${{ secrets.MCP_VENUE_DEV_UNITY_USERNAME }} UNITY_PASSWORD: ${{ secrets.MCP_VENUE_DEV_UNITY_PASSWORD }} UNITY_CLIENT_ID: ${{ secrets.MCP_VENUE_DEV_UNITY_CLIENTID }} run: | @@ -107,7 +107,7 @@ jobs: id: mcp_venue_test_integration_tests_with_airflow_api continue-on-error: true env: - UNITY_USERNAME: ${{ secrets.MCP_VENUE_TEST_UNITY_USERNAME }} + UNITY_USER: ${{ secrets.MCP_VENUE_TEST_UNITY_USERNAME }} UNITY_PASSWORD: ${{ secrets.MCP_VENUE_TEST_UNITY_PASSWORD }} UNITY_CLIENT_ID: ${{ secrets.MCP_VENUE_TEST_UNITY_CLIENTID }} run: | @@ -142,7 +142,7 @@ jobs: id: mcp_venue_test_integration_tests_with_ogc_api continue-on-error: true env: - UNITY_USERNAME: ${{ secrets.MCP_VENUE_TEST_UNITY_USERNAME }} + UNITY_USER: ${{ secrets.MCP_VENUE_TEST_UNITY_USERNAME }} UNITY_PASSWORD: ${{ secrets.MCP_VENUE_TEST_UNITY_PASSWORD }} UNITY_CLIENT_ID: ${{ secrets.MCP_VENUE_TEST_UNITY_CLIENTID }} run: | diff --git a/unity-test/conftest.py b/unity-test/conftest.py index cfd5f7dd..c4a7338f 100644 --- a/unity-test/conftest.py +++ b/unity-test/conftest.py @@ -94,7 +94,7 @@ def venue(request): @pytest.fixture(scope="session") def fetch_token(): - username = os.getenv("UNITY_USERNAME") + username = os.getenv("UNITY_USER") password = os.getenv("UNITY_PASSWORD") client_id = os.getenv("UNITY_CLIENT_ID") region = "us-west-2" From aea247cb88e65e05e307a86908274dafb10f0c87 Mon Sep 17 00:00:00 2001 From: Bradley Lunsford Date: Tue, 27 May 2025 13:28:03 -0700 Subject: [PATCH 3/4] changing config a little? --- unity-test/conftest.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/unity-test/conftest.py b/unity-test/conftest.py index c4a7338f..f4109646 100644 --- a/unity-test/conftest.py +++ b/unity-test/conftest.py @@ -137,7 +137,8 @@ def ogc_processes(ogc_processes_api_url): # setup Unity venue unity = Unity(UnityEnvironments.DEV) - unity.set_venue_id("") + unity.set_project("unity") + unity.set_venue("dev") process_service = unity.client(UnityServices.PROCESS_SERVICE) # retrieve all OGC processes From af195b35848967aee0a4fa6ecfddaf0d3db8b3e6 Mon Sep 17 00:00:00 2001 From: Bradley Lunsford Date: Tue, 27 May 2025 14:52:08 -0700 Subject: [PATCH 4/4] adjusting ogc_processes fixture to respect venue... hopefully --- unity-test/conftest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/unity-test/conftest.py b/unity-test/conftest.py index f4109646..378a1dfa 100644 --- a/unity-test/conftest.py +++ b/unity-test/conftest.py @@ -130,7 +130,7 @@ def eks_cluster_name(resource_name_template): @pytest.fixture(scope="session") -def ogc_processes(ogc_processes_api_url): +def ogc_processes(ogc_processes_api_url, venue): """ Retrieves the OGC processes available from the given endpoint. """ @@ -138,7 +138,7 @@ def ogc_processes(ogc_processes_api_url): # setup Unity venue unity = Unity(UnityEnvironments.DEV) unity.set_project("unity") - unity.set_venue("dev") + unity.set_venue(venue) process_service = unity.client(UnityServices.PROCESS_SERVICE) # retrieve all OGC processes