Skip to content

Align the test image name and bind the test proxy to loopback - #192

Open
Aaron-K-T-Berry wants to merge 1 commit into
Tecnativa:masterfrom
Aaron-K-T-Berry:issue-191
Open

Aaron-K-T-Berry wants to merge 1 commit into
Tecnativa:masterfrom
Aaron-K-T-Berry:issue-191

Conversation

@Aaron-K-T-Berry

Copy link
Copy Markdown

Summary

  • Addresses Test docs select a different image than pytest runs #191
  • Make pytest --image the only way to select the test image, and default it to docker-socket-proxy:local. --prebuild builds that same tag, so poetry run pytest --prebuild matches CI and the README.
  • Publish the test proxy on 127.0.0.1 only, and fail the fixture if the inspected host address is anything else.
  • Document that --privileged is requested so the container can open the Docker socket on hosts where SELinux or AppArmor confines it. Hosts that do not confine the socket do not need the flag.

Test plan

  • poetry run pytest --prebuild builds docker-socket-proxy:local and the suite passes.
  • poetry run pytest --image definitely-missing:tag -k test_default_permissions fails because that tag is the image pytest runs.
  • DOCKER_IMAGE_NAME does not change which image the suite runs.
  • During a run, the published address is 127.0.0.1:<port>, and docker -H tcp://127.0.0.1:<port> version reaches the engine.
  • Confirm the proxy configuration and Dockerfile are unchanged.

- Clarified usage instructions for running the API proxy with the `--privileged` flag.
- Updated testing instructions to specify the default image name as `docker-socket-proxy:local`.
- Enhanced comments in the test setup to explain the necessity of the `--privileged` flag and the socket binding to `127.0.0.1`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant