diff --git a/docker/api/pytest.sh b/docker/api/pytest.sh index 7a4442aa..19c034fa 100755 --- a/docker/api/pytest.sh +++ b/docker/api/pytest.sh @@ -14,7 +14,6 @@ cd /opt/cnaas/venv/cnaas-nms/src/ source ../../bin/activate -export JWT_SECRET_KEY="kMbSp+O4ZuF/AYOJtmGiMPOOWqvez5mVpml9A8f9Oso=" echo "starting unittests: pytest ${PYTESTARGS[@]}" pytest "${PYTESTARGS[@]}" EXITSTATUS="$?" diff --git a/pytest.ini b/pytest.ini index 0ec78120..3387760b 100644 --- a/pytest.ini +++ b/pytest.ini @@ -6,3 +6,5 @@ markers = equipment: mark a test that requires live equipment to be available for testing addopts = --docker-compose=../docker/docker-compose_pytest.yaml +env = + JWT_SECRET_KEY="kMbSp+O4ZuF/AYOJtmGiMPOOWqvez5mVpml9A8f9Oso=" diff --git a/requirements.txt b/requirements.txt index 2a4a69e3..1cbcabb4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -23,6 +23,7 @@ psycopg2-binary==2.9.9 pytest==7.4.4 pytest-cov==4.1.0 pytest-docker-compose==3.2.1 +pytest-env==1.1.3 redis==5.0.1 redis-lru==0.1.0 Sphinx==7.2.6