Skip to content

Commit a289afa

Browse files
committed
FWF-5460: [Bugfix] Fix CI fails in backend
1 parent 7c067a4 commit a289afa

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

.github/workflows/forms-flow-documents-ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ jobs:
7676
SKIP_IN_CI: "True"
7777
USE_DOCKER_MOCK: "True"
7878
JWT_OIDC_TEST_PRIVATE_KEY_PEM: ${{ secrets.JWT_OIDC_TEST_PRIVATE_KEY_PEM }}
79+
FORMIO_TEST_JWT_TOKEN: ${{ secrets.FORMIO_TEST_JWT_TOKEN}}
7980

8081
runs-on: ubuntu-24.04
8182
strategy:

forms-flow-documents/sample.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ FORMSFLOW_API_CORS_ORIGINS=*
3636
##Env For Unit Testing
3737
## JWT_OIDC_TEST_PRIVATE_KEY_PEM=
3838
## FLASK_ENV=testing
39+
## FORMIO_TEST_JWT_TOKEN=
3940

4041
#FORMIO configuration
4142
FORMIO_DEFAULT_PROJECT_URL=http://{your-ip-address}:3001

forms-flow-documents/tests/conftest.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Common setup and fixtures for the pytest suite used by this service."""
2+
import os
23
import time
34

45
import pytest
@@ -106,3 +107,13 @@ def get(self, key):
106107
return_value=mock_redis,
107108
) as _mock: # noqa
108109
yield mock_redis
110+
111+
112+
@pytest.fixture(autouse=True)
113+
def mock_formio_access_token():
114+
"""Mock formio access token."""
115+
with patch(
116+
"formsflow_api_utils.services.external.formio.FormioService.get_formio_access_token",
117+
return_value=os.getenv("FORMIO_TEST_JWT_TOKEN"),
118+
):
119+
yield

0 commit comments

Comments
 (0)