Skip to content

Commit

Permalink
try with pytest-env and pytest.ini instead
Browse files Browse the repository at this point in the history
  • Loading branch information
indy-independence committed Feb 15, 2024
1 parent 816e426 commit 009393c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion docker/api/pytest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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="$?"
Expand Down
2 changes: 2 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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="
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 009393c

Please sign in to comment.