diff --git a/.github/workflows/astarte-ctl-test.yaml b/.github/workflows/astarte-ctl-test.yaml index e56e4b5..01225b1 100644 --- a/.github/workflows/astarte-ctl-test.yaml +++ b/.github/workflows/astarte-ctl-test.yaml @@ -134,6 +134,8 @@ jobs: DEVICE_TEST_2=$(astartectl utils device-id generate-random) echo "E2E_DEVICE_TEST_2=$DEVICE_TEST_2" >> $GITHUB_ENV astartectl pairing agent register --compact-output -- "$DEVICE_TEST_2" + HOUSEKEEPING_TOKEN=$(astartectl utils gen-jwt housekeeping) + echo "E2E_HOUSEKEEPING_JWT=$HOUSEKEEPING_TOKEN" >> $GITHUB_ENV - name: Setup python uses: actions/setup-python@v2 diff --git a/test.sh b/test.sh index b550882..3a1ad98 100755 --- a/test.sh +++ b/test.sh @@ -8,3 +8,4 @@ pytest -v ./tests/utils pytest -v ./tests/app_engine pytest -v ./tests/realm_management pytest -v ./tests/pairing_agent +pytest -v ./tests/housekeeping diff --git a/tests/conftest.py b/tests/conftest.py index 5f9c30a..f257e9c 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -14,11 +14,12 @@ def astarte_env_vars(): astarte_url = os.environ.get("E2E_API_URL") realm = os.environ.get("E2E_REALM") jwt = os.environ.get("E2E_JWT") + housekeeping_jwt = os.environ.get("E2E_HOUSEKEEPING_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 and device_test_1 and device_test_2 + astarte_url and realm and jwt and device_test_1 and device_test_2 and housekeeping_jwt ), "Environment variables for Astarte setup are not properly configured." return { @@ -27,4 +28,5 @@ def astarte_env_vars(): "jwt": jwt, "device_test_1": device_test_1, "device_test_2": device_test_2, + "housekeeping_jwt": housekeeping_jwt, } diff --git a/tests/pyproject.toml b/tests/pyproject.toml index edbb1ea..4b184ba 100644 --- a/tests/pyproject.toml +++ b/tests/pyproject.toml @@ -33,4 +33,4 @@ profile = "black" line-length = 88 [tool.setuptools] -packages = ["app_engine", "realm_management", "utils", "pairing_agent"] +packages = ["app_engine", "realm_management", "utils", "pairing_agent", "housekeeping"]