diff --git a/.github/workflows/astarte-ctl-test.yaml b/.github/workflows/astarte-ctl-test.yaml index 34c82ed..3631c74 100644 --- a/.github/workflows/astarte-ctl-test.yaml +++ b/.github/workflows/astarte-ctl-test.yaml @@ -131,6 +131,9 @@ jobs: TOKEN=$(astartectl utils gen-jwt all-realm-apis) echo "E2E_JWT=$TOKEN" >> $GITHUB_ENV echo "E2E_DEVICE_TEST_1=ogmcilZpRDeDWwuNfJr0yA" >> $GITHUB_ENV + E2E_DEVICE_TEST_2=$(astartectl utils device-id generate-random) + echo "E2E_DEVICE_TEST_2=$E2E_DEVICE_TEST_2" >> $GITHUB_ENV + $(astartectl pairing agent register --compact-output -- "$E2E_DEVICE_TEST_2") - name: Setup python uses: actions/setup-python@v2 diff --git a/tests/conftest.py b/tests/conftest.py index 870ed8a..5f9c30a 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -15,9 +15,10 @@ def astarte_env_vars(): realm = os.environ.get("E2E_REALM") jwt = os.environ.get("E2E_JWT") device_test_1 = os.environ.get("E2E_DEVICE_TEST_1") + device_test_2 = os.environ.get("E2E_DEVICE_TEST_2") assert ( - astarte_url and realm and jwt + astarte_url and realm and jwt and device_test_1 and device_test_2 ), "Environment variables for Astarte setup are not properly configured." return { @@ -25,4 +26,5 @@ def astarte_env_vars(): "realm": realm, "jwt": jwt, "device_test_1": device_test_1, + "device_test_2": device_test_2, }