Skip to content

Commit

Permalink
Enforce the Dynaconf validaton
Browse files Browse the repository at this point in the history
  • Loading branch information
ogajduse committed Jun 14, 2024
1 parent 32607ba commit 09d9960
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ env:
PYCURL_SSL_LIBRARY: openssl
ROBOTTELO_BUGZILLA__API_KEY: ${{ secrets.BUGZILLA_KEY }}
ROBOTTELO_JIRA__API_KEY: ${{ secrets.JIRA_KEY }}
ROBOTTELO_ROBOTTELO__unit_test: true

jobs:
codechecks:
Expand Down
10 changes: 6 additions & 4 deletions robottelo/config/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,12 @@ def get_settings():
try:
settings.validators.validate()
except ValidationError as err:
logger.warning(
f'Dynaconf validation failed, continuing for the sake of unit tests\n{err}'
)

if settings.robottelo.get('unit_test'):
logger.warning(
f'Dynaconf validation failed, continuing for the sake of unit tests\n{err}'
)
else:
raise err
return settings


Expand Down

0 comments on commit 09d9960

Please sign in to comment.