1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-07-01 22:35:45 +00:00
Commit Graph

31 Commits

Author SHA1 Message Date
9e77e81e7d Tests: support custom 'docker compose' command
Enable overriding default 'docker compose' command with environment variable
'DOCKER_COMPOSE'. This way docker compose v1 is still supported with:

  $ DOCKER_COMPOSE=docker-compose pytest

This is important because people using the Debian packaged docker compose
are stuck to v1.
2023-12-20 09:30:06 +01:00
b5cac06305 ci: remove python docker-compose 2023-12-12 21:56:24 +01:00
c1a2b31f35 Merge pull request #2222 from rot169/support-hostnet-containers
Support containers running --net=host (#1537)
2023-06-07 07:55:28 +02:00
13eb61a639 fix: Replace mDNS .local domain with .example domain
See RFC 6762 for details on mDNS .local domain: https://datatracker.ietf.org/doc/html/rfc6762
And RFC 6761 for details on .example domain: https://datatracker.ietf.org/doc/html/rfc6761
2023-05-23 09:43:30 +02:00
35b1493e16 feat: support proxy + container in host network mode 2023-05-09 19:31:42 +02:00
b5a54ac219 tests: Reduce scope of docker_compose fixture (and friends)
This makes it possible to bring up different compose files for
different tests in the same test module.

This change does not negatively affect performance because the fixture
is a no-op if the docker compose filename is unchanged between tests.
2023-02-17 02:34:08 -05:00
4d8f878ba7 tests: Fixture that simplifies Docker compose file changes 2023-02-17 02:34:08 -05:00
f5a3492926 tests: Factor out DNS monkey patching to its own fixture 2023-02-17 02:34:08 -05:00
09a2f40633 tests: Turn helper function into docker_compose_file fixture
This makes it easier for tests to override the filename.
2023-02-17 02:34:08 -05:00
01745a836f tests: Fix path to ca-root.crt
`os.getcwd()` is not guaranteed to always return the `test/`
directory.
2023-02-17 02:34:08 -05:00
18027fa71b Add container logs in case testcontainer exited unexpectedly 2022-02-20 15:10:05 +01:00
6b3ee66783 chore: white-space housekeeping
Noticed some trailing white-space. Removed for consistency with the rest of the file.
2022-01-01 01:39:51 +13:00
115461744b fix: Skip IPv6 when forced but not available + avoid none network
A test on raw IP addresses doesn't reach the existing IPv6 skip logic, added that to avoid a test failing when only IPv4 is available (eg: standard docker container networks).

Additionally some other tests set the `none` network and connecting to this fails as it's not allowed? Preventing that from happening resolves the final failing tests within containerized pytest.
2022-01-01 01:38:13 +13:00
04b0181980 fix: Ensure networks are actually connected to pytest container
The `network` object would never be in a list of network names (strings), and without `greedy=True` arg as the `docker-py` API docs note, the containers will not be part of the results, thus always returning an empty list which was not intended..

Now the network will properly match the current networks for pytest container, avoiding duplicate connect attempts, and the network list result will actually have containers to count when filtering by length.
2021-12-31 22:30:49 +13:00
0e5d97a268 fix: Don't connect pytest container to networks when using host network
This is not compatible or required, since host networking is no longer isolated to container networks only.
2021-12-31 22:14:26 +13:00
b2b4c71997 fix: Don't remove pytest container when running with host network mode
When the container runs with host networking instead of the default bridge, the `$HOSTNAME` / `/etc/hostname` reflects that of the host instead of the container ID , which causes the pytest container to get removed accidentally.

Using a container name instead we can more reliably target the container to avoid removing it, should we need to run with host networking instead.
2021-12-31 22:12:25 +13:00
e748d53a1f chore: Extract hostname access to a var
DRY and clearer that we're referring to the pytest container.
2021-12-31 21:51:40 +13:00
93c04dce8d fix: Properly detect pytest running via container
The original `/.dockerenv` approach is no longer valid, and context wise we're only using this for the test suite, so using an ENV in that container is a better solution.
2021-12-31 21:42:38 +13:00
a1ff28cec8 CI: ease version check on python docker module 2021-09-01 09:31:02 +02:00
df638c3fe6 ci: cleanup left over volumes after tests 2021-08-02 19:31:36 +02:00
90a7218622 ci: update contest.py 2021-08-02 14:48:40 +02:00
fb7a11212f Make server_tokens configurable per virtual-host 2021-05-13 21:52:06 +01:00
37e85e6e8d chore(ci): ♻️ convert Python old % string to f-strings 2021-04-27 00:35:20 +02:00
eba9ac4261 chore(ci): ⬆️ update python dependencies to latests release 2021-04-27 00:35:19 +02:00
950a28f5ea chore(ci): ⬆️ porting python 2.7 code to python 3.9 2021-04-27 00:35:19 +02:00
ad7c02570b chore: use nginxproxy's DockerHub registry
Transitioning away from jwilder/nginx-proxy
Please see #1304 for more details
2021-04-01 16:06:09 +02:00
9be2624d09 Increased dependency versions to get around pip internal problem 2018-04-22 16:11:32 -04:00
c417813df9 Fixed out-of-scope variable 2018-04-22 16:03:43 -04:00
e25c78b00a TESTS: add pytest incremental marker to mark tests as expected to fail if previous test failed
see http://stackoverflow.com/a/12579625/107049
2017-03-08 21:21:32 +01:00
85370fa31f TESTS: improve error reporting for failed to run docker-compose commands 2017-02-17 00:54:14 +01:00
6069bc53cd TESTS: replace old test suite with the new one
get rid of Bats definitively
2017-02-17 00:29:30 +01:00