aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/app-install.bats5
-rwxr-xr-xtest/it-install-remove.bats3
-rw-r--r--test/utils.bash4
3 files changed, 6 insertions, 6 deletions
diff --git a/test/app-install.bats b/test/app-install.bats
index 7b80547..df77594 100755
--- a/test/app-install.bats
+++ b/test/app-install.bats
@@ -29,19 +29,18 @@ Changing current symlink" ]
-r file \
-u $BATS_TEST_DIRNAME/data/install-test-env.zip \
-n install-test-env -i prod -v 1.0
-
echo_lines
[ $status -eq 0 ]
[ "$output" = "Creating instance 'prod' for 'install-test-env'
Unpacking...
Running postinstall...
-APPSH_BASEDIR=$APPSH_BASEDIR
+APPSH_APPS=$APPSH_APPS
APPSH_HOME=$APPSH_HOME
APPSH_INSTANCE=prod
APPSH_NAME=install-test-env
APPSH_VERSION=1.0
PATH=/bin:/usr/bin
-PWD=$WORK/install-test-env/prod/versions/1.0
+PWD=$APPSH_APPS_CANONICAL/install-test-env/prod/versions/1.0
SHLVL=1
_=/usr/bin/env
Postinstall completed successfully
diff --git a/test/it-install-remove.bats b/test/it-install-remove.bats
index bba16d2..5eb9f46 100755
--- a/test/it-install-remove.bats
+++ b/test/it-install-remove.bats
@@ -18,13 +18,14 @@ load utils
can_not_read ".app/var/pid/$name-$instance.pid"
+ describe "Setting property"
app -n $name -i $instance conf set env.TEST_PROPERTY awesome
[ $status -eq 0 ]
describe "Starting $name/$instance"
app -n $name -i $instance operate start
- [ $status -eq 0 ]
echo_lines
+ [ $status -eq 0 ]
can_read .app/var/pid/$name-$instance.pid
describe "Stopping $name/$instance"
diff --git a/test/utils.bash b/test/utils.bash
index 6a6967f..cd21966 100644
--- a/test/utils.bash
+++ b/test/utils.bash
@@ -14,13 +14,13 @@ echo_lines() {
APPSH=$(pwd)/app
setup() {
- APPSH_BASEDIR=$BATS_TMPDIR/app.sh
+ APPSH_APPS=$BATS_TMPDIR/app.sh
APPSH_HOME=$(cd $BATS_TEST_DIRNAME/../..; echo `pwd`/app.sh)
+ APPSH_APPS_CANONICAL=$(cd -P $APPSH_APPS; pwd)
rm -rf $BATS_TMPDIR/app.sh
mkdir $BATS_TMPDIR/app.sh
cd $BATS_TMPDIR/app.sh
ln -s $APPSH
- WORK=$(cd -P $BATS_TMPDIR/app.sh; pwd)
}
mkzip() {