Skip to content

Commit

Permalink
feat(integration-tests): set boto3 and botocore to INFO to prevent lo…
Browse files Browse the repository at this point in the history
…g spamming
  • Loading branch information
a-dubs authored and TheRealFalcon committed Jan 27, 2025
1 parent 415c8e4 commit 4dce22a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ pytest!=7.3.2

pytest-cov
pytest-mock
pytest-xdist
setuptools
jsonschema
responses
Expand Down
5 changes: 5 additions & 0 deletions tests/integration_tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@
log.addHandler(logging.StreamHandler(sys.stdout))
log.setLevel(logging.INFO)

# set log level INFO instead of DEBUG for boto3 and botocore
# to prevent 1000s of lines of DEBUG log spam that occur during some tests
logging.getLogger("botocore").setLevel(logging.INFO)
logging.getLogger("boto3").setLevel(logging.INFO)

platforms: Dict[str, Type[IntegrationCloud]] = {
"ec2": Ec2Cloud,
"gce": GceCloud,
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ passenv =
deps =
-r{toxinidir}/integration-requirements.txt
-r{toxinidir}/test-requirements.txt
commands = {envpython} -m pytest --log-cli-level=INFO -m "not hypothesis_slow" -m "not serial" {posargs:tests/integration_tests}
commands = {envpython} -m pytest --log-cli-level=INFO -n auto -m "not hypothesis_slow" -m "not serial" {posargs:tests/integration_tests}
passenv =
CLOUD_INIT_*
PYCLOUDLIB_*
Expand Down

0 comments on commit 4dce22a

Please sign in to comment.