Skip to content

Commit

Permalink
fix(users): fix failing tests (#837)
Browse files Browse the repository at this point in the history
  • Loading branch information
cakeinsauce authored May 3, 2024
1 parent 18f0519 commit cc13285
Show file tree
Hide file tree
Showing 14 changed files with 252 additions and 244 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/users.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: users service checks and tests

on:
push:
paths:
- users/**
- .github/worlflows/users.yml
pull_request:
paths:
- users/**
- .github/worlflows/users.yml

jobs:
users-linters-and-tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.8.15" ]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
working-directory: ./users
run: |
python -m pip install --upgrade pip
pip install poetry>=1.1.13
poetry install --no-root
poetry add ../lib/tenants
- name: Run linters and checkers [flake8 -> isort -> black]
working-directory: ./users
run: |
poetry run flake8 --extend-ignore=E203 users/
poetry run isort --profile=black --line-length=79 --check-only users/
poetry run black --check --line-length=79 users/
- name: Run tests
working-directory: ./users
run: |
poetry run pytest tests/
2 changes: 1 addition & 1 deletion lib/tenants/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
fastapi>=0.68.0
httpx
PyJWT[crypto]==2.3.0
PyJWT[crypto]>=2.3.0
4 changes: 2 additions & 2 deletions users/.env
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### TODO: remove, migrate to common docker-compose
### TODO: remove .env file and adjust tests
# PostgreSQL settings
POSTGRES_USER = postgres
POSTGRES_PASSWORD = 1234
Expand All @@ -15,7 +15,7 @@ POSTGRES_HOST = postgres
KEYCLOAK_USER = "user"
KEYCLOAK_PASSWORD = "secretpassword"

KEYCLOAK_HOST = "http://dev2.badgerdoc.com/"
KEYCLOAK_HOST = "http://examplewe.com"

KEYCLOAK_REALM = "master"
KEYCLOAK_ROLE_ADMIN = "admin"
Expand Down
Loading

0 comments on commit cc13285

Please sign in to comment.