diff --git a/shared/validation/install.py b/shared/validation/install.py index 3a12e68a..d4e17503 100644 --- a/shared/validation/install.py +++ b/shared/validation/install.py @@ -403,7 +403,7 @@ def validate_install_configuration(inputted_dict): validator = CodecovYamlValidator(show_secret=True) is_valid = validator.validate(inputted_dict, config_schema) if not is_valid: - log.warning( + log.debug( "Configuration considered invalid, using dict as it is", extra=dict(errors=validator.errors), ) diff --git a/tests/unit/validation/test_install_validation.py b/tests/unit/validation/test_install_validation.py index 9888645c..868c48be 100644 --- a/tests/unit/validation/test_install_validation.py +++ b/tests/unit/validation/test_install_validation.py @@ -18,11 +18,12 @@ def test_validate_install_configuration_simple(mocker): def test_validate_install_configuration_invalid(mocker): - mock_warning = mocker.patch.object(install_log, "warning") + install_log.setLevel("DEBUG") + mock_debug = mocker.patch.object(install_log, "debug") assert validate_install_configuration( {"setup": {"codecov_url": "http://codecov.company.com"}, "gitlab": 1} ) == {"setup": {"codecov_url": "http://codecov.company.com"}, "gitlab": 1} - assert mock_warning.call_count == 1 + assert mock_debug.call_count == 1 def test_validate_install_configuration_with_user_yaml(mocker): @@ -448,7 +449,8 @@ def test_admins(mocker): def test_validate_install_configuration_raise_warning(mocker): - mock_warning = mocker.patch.object(install_log, "warning") + install_log.setLevel("DEBUG") + mock_debug = mocker.patch.object(install_log, "debug") input = { "setup": { "tasks": { @@ -464,7 +466,7 @@ def test_validate_install_configuration_raise_warning(mocker): } } validate_install_configuration(input) - mock_warning.assert_called_with( + mock_debug.assert_called_with( "Configuration considered invalid, using dict as it is", extra={ "errors": {