Skip to content

Commit

Permalink
Add tests with Docker Compose v2
Browse files Browse the repository at this point in the history
Add a pair of new Cirrus test suites using Compose v2 instead of
Compose v1 (as is currently packaged in Fedora). They work
identically, and run the same tests, as the Compose v1 tests, but
with the new v2 binary instead.

[NO NEW TESTS NEEDED] This adds an entire Cirrus suite...

Signed-off-by: Matthew Heon <[email protected]>
  • Loading branch information
mheon committed Mar 17, 2022
1 parent 0793a58 commit bde3ca8
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ apiv2_test_task:


compose_test_task:
name: "compose test on $DISTRO_NV ($PRIV_NAME)"
name: "$TEST_FLAVOR test on $DISTRO_NV ($PRIV_NAME)"
alias: compose_test
only_if: *not_build
skip: *tags
Expand All @@ -438,11 +438,18 @@ compose_test_task:
gce_instance: *standardvm
env:
<<: *stdenvars
TEST_FLAVOR: compose
matrix:
- env:
TEST_FLAVOR: compose
PRIV_NAME: root
- env:
TEST_FLAVOR: compose
PRIV_NAME: rootless
- env:
TEST_FLAVOR: compose_v2
PRIV_NAME: root
- env:
TEST_FLAVOR: compose_v2
PRIV_NAME: rootless
clone_script: *noop # Comes from cache
gopath_cache: *ro_gopath_cache
Expand Down
4 changes: 4 additions & 0 deletions contrib/cirrus/runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,10 @@ function _run_compose() {
./test/compose/test-compose |& logformatter
}

function _run_compose_v2() {
./test/compose/test-compose |& logformatter
}

function _run_int() {
dotest integration
}
Expand Down
5 changes: 5 additions & 0 deletions contrib/cirrus/setup_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,11 @@ case "$TEST_FLAVOR" in
;;
build) make clean ;;
unit) ;;
compose_v2)
dnf -y remove docker-compose
curl -SL https://github.com/docker/compose/releases/download/v2.2.3/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
;& # Continue with next item
apiv2)
msg "Installing previously downloaded/cached packages"
dnf install -y $PACKAGE_DOWNLOAD_DIR/python3*.rpm
Expand Down

0 comments on commit bde3ca8

Please sign in to comment.