Skip to content

Commit

Permalink
Use new version of docker compose (as a plugin)
Browse files Browse the repository at this point in the history
  • Loading branch information
deluan committed Dec 12, 2022
1 parent 94648d7 commit fbf68ab
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions test.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source ./assert.sh
set -e

trap 'docker-compose stop -t 1' EXIT INT
trap 'docker compose stop -t 1' EXIT INT

test_suite() {
image_name=$1
Expand All @@ -10,11 +10,11 @@ test_suite() {
echo

set -x
docker-compose rm --force --stop test-$image_name || true
docker compose rm --force --stop test-$image_name || true

docker-compose up -d test-$image_name
docker cp zsh-in-docker.sh zsh-in-docker_test-${image_name}_1:/tmp
docker exec zsh-in-docker_test-${image_name}_1 sh /tmp/zsh-in-docker.sh \
docker compose up -d test-$image_name
docker cp zsh-in-docker.sh zsh-in-docker-test-${image_name}-1:/tmp
docker exec zsh-in-docker-test-${image_name}-1 sh /tmp/zsh-in-docker.sh \
-t https://github.com/denysdovhan/spaceship-prompt \
-p git -p git-auto-fetch \
-p https://github.com/zsh-users/zsh-autosuggestions \
Expand All @@ -24,8 +24,8 @@ test_suite() {
set +x

echo
VERSION=$(docker exec zsh-in-docker_test-${image_name}_1 zsh --version)
ZSHRC=$(docker exec zsh-in-docker_test-${image_name}_1 cat /root/.zshrc)
VERSION=$(docker exec zsh-in-docker-test-${image_name}-1 zsh --version)
ZSHRC=$(docker exec zsh-in-docker-test-${image_name}-1 cat /root/.zshrc)
echo "########################################################################################"
echo "$ZSHRC"
echo "########################################################################################"
Expand All @@ -40,7 +40,7 @@ test_suite() {
echo
echo "######### Success! All tests are passing for ${image_name}"

docker-compose stop -t 1 test-$image_name
docker compose stop -t 1 test-$image_name
}

images=${*:-"alpine ubuntu ubuntu-14.04 debian amazonlinux"}
Expand Down

0 comments on commit fbf68ab

Please sign in to comment.