Skip to content

dockersetup.py: tests and "docker compose" support

Tim Orling yocto-patches 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3dockersetup.py: move the script body into main()dockersetup.py+266 -2570 replies
2/3tests: add tests for the files dockersetup.py writes.github/workflows/ci.yml tests/test_dockersetup.py+171 -00 replies
3/3dockersetup.py: use "docker compose" when it is availabledockersetup.py tests/test_dockersetup.py+62 -180 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [layerindex-web][PATCH 0/3] dockersetup.py: tests and "docker compose" support

This series applies on top of "Docker: environment files for dev, staging and production".

Patch 1 moves the code dockersetup.py ran at module level into main(), so its functions can be imported and tested. There is no change in behaviour.

Patch 2 adds tests for the files dockersetup.py writes: the .env.local.* files, docker-compose.yml, the proxy settings and the nginx SSL configuration. The Docker image doesn't contain dockersetup.py, so these tests are skipped by docker/run-tests.sh and run by a separate CI job on the host, which needs only pytest and PyYAML.

Patch 3 makes dockersetup.py use the "docker compose" plugin that current Docker installs provide, falling back to the standalone docker-compose command.

Tested with tests/test_dockersetup.py and docker/run-tests.sh. I have not run a complete dockersetup.py installation with these changes.

Tim Orling (3):
dockersetup.py: move the script body into main()
tests: add tests for the files dockersetup.py writes dockersetup.py: use "docker compose" when it is available

 .github/workflows/ci.yml  |  13 +
 dockersetup.py            | 554 ++++++++++++++++++++------------------
 tests/test_dockersetup.py | 183 +++++++++++++
 3 files changed, 487 insertions(+), 263 deletions(-)
 create mode 100644 tests/test_dockersetup.py

base-commit: e6040597ae0f614581de241fe78f20e34dae13ac
prerequisite-patch-id: 0cfb656e605b0ec4a84298986850c958648f94bf
prerequisite-patch-id: cf25fa25d9d94e47af321358b41c451717173512
prerequisite-patch-id: a3d6bb81b18633b51f922cc20a99b84ac423393b
prerequisite-patch-id: e1c00c40927a7db84488f2ce1b4ed40f3aa14aa0

Signature · 1 line
2.56.0