diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2012-10-17 20:17:55 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2012-10-17 21:05:52 +0200 |
commit | 265b1d8b25945898e11801242dbff7639e1a4a60 (patch) | |
tree | e562b205ca004f75e3979e9cb0e921cd8d299b4a /test | |
parent | 2670ff51db825005901099e490fa2332de6fb6fe (diff) | |
download | app.sh-265b1d8b25945898e11801242dbff7639e1a4a60.tar.gz app.sh-265b1d8b25945898e11801242dbff7639e1a4a60.tar.bz2 app.sh-265b1d8b25945898e11801242dbff7639e1a4a60.tar.xz app.sh-265b1d8b25945898e11801242dbff7639e1a4a60.zip |
o Testing passing of environment variables.
Diffstat (limited to 'test')
-rw-r--r-- | test/data/app-a/root/bin/app-a | 4 | ||||
-rwxr-xr-x | test/it-install-remove.bats | 12 |
2 files changed, 14 insertions, 2 deletions
diff --git a/test/data/app-a/root/bin/app-a b/test/data/app-a/root/bin/app-a index 1386f31..c8c4fc5 100644 --- a/test/data/app-a/root/bin/app-a +++ b/test/data/app-a/root/bin/app-a @@ -1,9 +1,11 @@ #!/bin/bash -me=`basename $0` +me=$APPSH_INSTANCE_HOME/`basename $0` echo "Starting" >> $me.log +env | grep TEST_PROPERTY > $me.env + for i in {1..10} do echo "#$i: `date`" >> $me.log diff --git a/test/it-install-remove.bats b/test/it-install-remove.bats index 3358118..736bf56 100755 --- a/test/it-install-remove.bats +++ b/test/it-install-remove.bats @@ -14,20 +14,30 @@ load utils -r file \ -u $BATS_TEST_DIRNAME/data/app-a.zip \ -n $name -i $instance + [ $status -eq 0 ] -# set -x can_not_read ".app/var/pid/$name-$instance.pid" + 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 can_read .app/var/pid/$name-$instance.pid describe "Stopping $name/$instance" app -n $name -i $instance operate stop + [ $status -eq 0 ] echo_lines can_not_read .app/var/pid/$name-$instance.pid + can_read "$name/$instance/$name.log" + can_read "$name/$instance/$name.env" + + [ "`cat $name/$instance/$name.env`" = "TEST_PROPERTY=awesome" ] + # app instance install \ # -r file \ # -u $HOME/.m2/repository/io/trygvis/appsh/examples/jenkins/1.0-SNAPSHOT/jenkins-1.0-SNAPSHOT.zip \ |