aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/app-init.bats4
-rwxr-xr-xtest/data/app-a/hooks/post-install4
-rwxr-xr-x[-rw-r--r--]test/data/app-a/root/bin/app-a3
3 files changed, 9 insertions, 2 deletions
diff --git a/test/app-init.bats b/test/app-init.bats
index 10edc63..df3919e 100755
--- a/test/app-init.bats
+++ b/test/app-init.bats
@@ -38,7 +38,9 @@ load utils
eq '${lines[3]}' "Unpacking..."
match '${lines[4]}' "Creating current symlink for version 1.0-.*"
eq '${lines[5]}' "Post install"
- eq '${#lines[*]}' 6
+ eq '${#lines[*]}' 6
is_directory "my-app/.app"
+ # Created by post-install
+ is_directory "my-app/logs"
}
diff --git a/test/data/app-a/hooks/post-install b/test/data/app-a/hooks/post-install
index 99ad974..c548ad7 100755
--- a/test/data/app-a/hooks/post-install
+++ b/test/data/app-a/hooks/post-install
@@ -3,3 +3,7 @@
set -u
echo "Post install"
+
+[ -d ../../logs ] || mkdir ../../logs
+
+ln -s ../../../logs root/logs
diff --git a/test/data/app-a/root/bin/app-a b/test/data/app-a/root/bin/app-a
index 98d98cd..d332993 100644..100755
--- a/test/data/app-a/root/bin/app-a
+++ b/test/data/app-a/root/bin/app-a
@@ -1,8 +1,9 @@
#!/bin/bash
-#cd $APPSH_INSTANCE_HOME
me=`basename $0`
+trap 'echo Signalled >> logs/$me.log; exit 0' TERM INT QUIT
+
env | grep TEST_PROPERTY >> logs/$me.env
echo "Starting" >> logs/$me.log