diff --git a/.github/workflows/pull_request.yml b/.github/workflows/pull_request.yml index 276ff267e1a..44307be22cf 100644 --- a/.github/workflows/pull_request.yml +++ b/.github/workflows/pull_request.yml @@ -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__SETTINGS__SKIP_VALIDATION: true jobs: codechecks: diff --git a/conf/certs.yaml.template b/conf/certs.yaml.template deleted file mode 100644 index e2b86d6d7bd..00000000000 --- a/conf/certs.yaml.template +++ /dev/null @@ -1,6 +0,0 @@ -CERTS: - CERT_FILE: "~/certs/server.crt" - KEY_FILE: "~/certs/server.key" - REQ_FILE: "~/certs/server.csr" - # CA cert (a.k.a cacert.crt or rootCA.pem) can be used as bundle file. - CA_BUNDLE_FILE: "~/certs/rootCA.pem" diff --git a/conf/robottelo.yaml.template b/conf/robottelo.yaml.template index 7bf111cdc65..689c1f34fff 100644 --- a/conf/robottelo.yaml.template +++ b/conf/robottelo.yaml.template @@ -21,3 +21,4 @@ ROBOTTELO: # Dynaconf and Dynaconf hooks related options SETTINGS: GET_FRESH: true + SKIP_VALIDATION: false diff --git a/robottelo/config/__init__.py b/robottelo/config/__init__.py index d761dd06e91..8c18a4550b6 100644 --- a/robottelo/config/__init__.py +++ b/robottelo/config/__init__.py @@ -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.settings.get('skip_validation'): + logger.warning( + f'Dynaconf validation failed, continuing for the sake of unit tests\n{err}' + ) + else: + raise err return settings diff --git a/robottelo/config/validators.py b/robottelo/config/validators.py index 2ae4c42ac04..9f88f98f135 100644 --- a/robottelo/config/validators.py +++ b/robottelo/config/validators.py @@ -85,15 +85,6 @@ Validator('capsule.deploy_workflows.os', must_exist=True), Validator('capsule.deploy_arguments', must_exist=True, is_type_of=dict, default={}), ], - certs=[ - Validator( - 'certs.cert_file', - 'certs.key_file', - 'certs.req_file', - 'certs.ca_bundle_file', - must_exist=True, - ) - ], clients=[Validator('clients.provisioning_server')], libvirt=[ Validator('libvirt.libvirt_hostname', must_exist=True), @@ -335,6 +326,9 @@ Validator('remotedb.ssl', default=True), Validator('remotedb.port', default=5432), ], + robottelo=[ + Validator('robottelo.settings.skip_validation', is_type_of=bool, default=False), + ], shared_function=[ Validator('shared_function.storage', is_in=('file', 'redis'), default='file'), Validator('shared_function.share_timeout', lte=86400, default=86400),