aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2013-01-27 21:10:30 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2013-01-27 21:10:30 +0100
commita4215743db91c4b7050dfda32a670814a101b773 (patch)
tree7466510ff53e0576cfcb2e2433b9300fd0a45901 /test
parent1e4a96730da70fcfa3b8c153874cbdebad0f9829 (diff)
downloadapp.sh-a4215743db91c4b7050dfda32a670814a101b773.tar.gz
app.sh-a4215743db91c4b7050dfda32a670814a101b773.tar.bz2
app.sh-a4215743db91c4b7050dfda32a670814a101b773.tar.xz
app.sh-a4215743db91c4b7050dfda32a670814a101b773.zip
Defining 'APP_HOME' as where the .app dir is. The tools should use
this value to find files. app-operate/app-operator-pid: These are "functional" now.
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