Skip to content

Commit

Permalink
Update housekeeping test configuration
Browse files Browse the repository at this point in the history
- Add `generate_housekeeping_jwt` token to `astarte-ctl-test.yaml`.
- Include housekeeping test in `test.sh`.
- Add housekeeping dependencies to `pyproject.toml`.

Signed-off-by: Osman Hadzic <[email protected]>
  • Loading branch information
osmanhadzic committed Nov 26, 2024
1 parent 0b458dd commit 0b05ee6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/astarte-ctl-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 3 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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,
}
2 changes: 1 addition & 1 deletion tests/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]

0 comments on commit 0b05ee6

Please sign in to comment.