From 64e4505a2f30b1ddf027ffd43898efa7bdfdd8d7 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Thu, 18 Oct 2012 15:12:33 +0200 Subject: o Changing the current symlink before running postinstall. --- test/app-install.bats | 8 ++++---- test/app-list-versions.bats | 11 +++++++---- test/data/app-a/scripts/postinstall | 2 +- 3 files changed, 12 insertions(+), 9 deletions(-) (limited to 'test') diff --git a/test/app-install.bats b/test/app-install.bats index 7c7d642..38304be 100755 --- a/test/app-install.bats +++ b/test/app-install.bats @@ -16,11 +16,11 @@ load utils [ $status -eq 0 ] [ "$output" = "Creating instance 'prod' for 'app-a' Unpacking... +Changing current symlink Running postinstall... Hello World! Creating logs directory -Postinstall completed successfully -Changing current symlink" ] +Postinstall completed successfully" ] [ ${#lines[*]} == 7 ] } @@ -34,6 +34,7 @@ Changing current symlink" ] [ $status -eq 0 ] [ "$output" = "Creating instance 'prod' for 'install-test-env' Unpacking... +Changing current symlink Running postinstall... APPSH_APPS=$APPSH_APPS APPSH_HOME=$APPSH_HOME @@ -44,8 +45,7 @@ PATH=/bin:/usr/bin PWD=$APPSH_APPS_CANONICAL/install-test-env/prod/versions/1.0/root SHLVL=1 _=/usr/bin/env -Postinstall completed successfully -Changing current symlink" ] +Postinstall completed successfully" ] [ ${#lines[*]} == 14 ] # PWD=$APPSH_APPS_CANONICAL/install-test-env/prod/versions/1.0 } diff --git a/test/app-list-versions.bats b/test/app-list-versions.bats index 17fb2d2..de543eb 100755 --- a/test/app-list-versions.bats +++ b/test/app-list-versions.bats @@ -18,8 +18,11 @@ load utils 1.0 1.1" ] - app instance list-versions -n app-a -i env-a -P; echo_lines - [ $status -eq 0 ] - [ "$output" = "1.0 -1.1" ] + expected="1.0 +1.1" + +set -x + app -n app-a instance -i env-a list-versions -P; [ "$output" = "$expected" ]; echo_lines; + app -n app-a instance list-versions -i env-a -P; [ "$output" = "$expected" ]; echo_lines; + app instance list-versions -n app-a -i env-a -P; [ "$output" = "$expected" ]; echo_lines; } diff --git a/test/data/app-a/scripts/postinstall b/test/data/app-a/scripts/postinstall index c1a0cf1..dc176ff 100644 --- a/test/data/app-a/scripts/postinstall +++ b/test/data/app-a/scripts/postinstall @@ -4,7 +4,7 @@ echo "Hello World!" if [ -d etc/$APPSH_INSTANCE ] then - find etc/$APPSH_INSTANCE -type f -maxdepth 1 | while read file + find etc/$APPSH_INSTANCE -maxdepth 1 -type f | while read file do cp $file . done -- cgit v1.2.3