Skip to content

Commit

Permalink
Don't allow notdatadog in tests
Browse files Browse the repository at this point in the history
pytest-socket resolves the hostnames in the --allow-hosts setting for
each test, so removing notdatadog saves ~4k DNS resolution attempts.

Note that the tests run with a stripe container present. Resolving the
stripe hostname doesn't result in a DNS resolution because getaddrinfo
resolves the name by reading the /etc/hosts file populated by Docker
(same story for localhost).
  • Loading branch information
twm committed Aug 8, 2024
1 parent 9c8a4cc commit aadac72
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,8 +138,6 @@ services:
condition: service_healthy
stripe:
condition: service_started
notdatadog:
condition: service_started

files:
image: warehouse:docker-compose
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ ignore_missing_imports = true
[tool.pytest.ini_options]
addopts = [
"--disable-socket",
"--allow-hosts=localhost,::1,notdatadog,stripe",
"--allow-hosts=localhost,::1,stripe",
"--durations=20",
"--numprocesses=auto",
]
Expand Down

0 comments on commit aadac72

Please sign in to comment.