Skip to content

Commit

Permalink
Cirrus: Remove docker-compose v1 testing
Browse files Browse the repository at this point in the history
Fixes #18688

Docker compose v1 has long since gone EOL and is no longer supported by
upstream.  Therefore the only things we're accomplishing by testing it
with modern Podman are: Wasting time and inviting flakes.  Remove it.

Also assert the v2-only support in the test `README.md` and remove all
v1-related conditionals.

Signed-off-by: Chris Evich <[email protected]>
  • Loading branch information
cevich committed Jun 27, 2023
1 parent 3794d06 commit 2f2c8aa
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 31 deletions.
6 changes: 0 additions & 6 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -534,12 +534,6 @@ compose_test_task:
- validate
gce_instance: *standardvm
matrix:
- env:
TEST_FLAVOR: compose
PRIV_NAME: root
- env:
TEST_FLAVOR: compose
PRIV_NAME: rootless
- env:
TEST_FLAVOR: compose_v2
PRIV_NAME: root
Expand Down
6 changes: 0 additions & 6 deletions contrib/cirrus/runner.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,6 @@ function _run_apiv2() {
) |& logformatter
}

function _run_compose() {
_bail_if_test_can_be_skipped test/compose

./test/compose/test-compose |& logformatter
}

function _run_compose_v2() {
_bail_if_test_can_be_skipped test/compose

Expand Down
8 changes: 4 additions & 4 deletions contrib/cirrus/setup_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,10 @@ case "$TEST_FLAVOR" in
;;
compose_v2)
dnf -y remove docker-compose
# TODO: Either move this "install" into CI VM image build scripts
# since runtime-installs can be fragile. Or, configure renovate
# to manage the version number since nobody will ever realize to
# update it here, on their own.
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
Expand All @@ -357,10 +361,6 @@ case "$TEST_FLAVOR" in
pip install --upgrade pip
pip install --requirement $GOSRC/test/apiv2/python/requirements.txt
;& # continue with next item
compose)
make install.tools
dnf install -y podman-docker*
;& # continue with next item
int)
make .install.ginkgo
;&
Expand Down
8 changes: 5 additions & 3 deletions test/compose/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
Tests for docker-compose
========================
Tests for docker-compose v2
===========================

This directory contains tests for docker-compose under podman.
This directory contains tests for docker-compose v2 under podman.
Note, as of late June/early July 2023, compose v1 is no-longer
tested (or supported).

Each subdirectory must contain one docker-compose.yml file along with
all necessary infrastructure for it (e.g. Containerfile, any files
Expand Down
5 changes: 1 addition & 4 deletions test/compose/ipam_set_ip/tests.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# -*- bash -*-

ctr_name="ipam_set_ip_test_1"
if [ "$TEST_FLAVOR" = "compose_v2" ]; then
ctr_name="ipam_set_ip-test-1"
fi
ctr_name="ipam_set_ip-test-1"
podman container inspect "$ctr_name" --format '{{ .NetworkSettings.Networks.ipam_set_ip_net1.IPAddress }}'
is "$output" "10.123.0.253" "$testname : ip address is set"
podman container inspect "$ctr_name" --format '{{ .NetworkSettings.Networks.ipam_set_ip_net1.MacAddress }}'
Expand Down
5 changes: 1 addition & 4 deletions test/compose/two_networks/tests.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
# -*- bash -*-

ctr_name="two_networks_con1_1"
if [ "$TEST_FLAVOR" = "compose_v2" ]; then
ctr_name="two_networks-con1-1"
fi
ctr_name="two_networks-con1-1"
podman container inspect "$ctr_name" --format '{{len .NetworkSettings.Networks}}'
is "$output" "2" "$testname : Container is connected to both networks"
podman container inspect "$ctr_name" --format '{{.NetworkSettings.Networks}}'
Expand Down
5 changes: 1 addition & 4 deletions test/compose/uptwice/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,5 @@ output=$(docker-compose up -d 2>&1)
# Horrible output check here but we really want to make sure that there are
# no unexpected warning/errors and the normal messages are send on stderr as
# well so we cannot check for an empty stderr.
expected="Recreating uptwice_app_1 ... ${CR}${NL}Recreating uptwice_app_1 ... done$CR"
if [ "$TEST_FLAVOR" = "compose_v2" ]; then
expected="Container uptwice-app-1 Recreate${NL}Container uptwice-app-1 Recreated${NL}Container uptwice-app-1 Starting${NL}Container uptwice-app-1 Started"
fi
expected="Container uptwice-app-1 Recreate${NL}Container uptwice-app-1 Recreated${NL}Container uptwice-app-1 Starting${NL}Container uptwice-app-1 Started"
is "$output" "$expected" "no error output in compose up (#15580)"

0 comments on commit 2f2c8aa

Please sign in to comment.