aboutsummaryrefslogtreecommitdiff
path: root/test/app-install.bats
diff options
context:
space:
mode:
Diffstat (limited to 'test/app-install.bats')
-rwxr-xr-xtest/app-install.bats27
1 files changed, 24 insertions, 3 deletions
diff --git a/test/app-install.bats b/test/app-install.bats
index 8f164bc..08c4a06 100755
--- a/test/app-install.bats
+++ b/test/app-install.bats
@@ -3,15 +3,15 @@
load utils
-@test "./app app install" {
- zip_app_a
+@test "./app app install app-a" {
+ mkzip "app-a"
app app install \
-r file \
-u $BATS_TEST_DIRNAME/data/app-a.zip \
-n app-a -i prod
echo_lines
- [ $status -eq $exit_usage ]
+ [ $status -eq 0 ]
[ "$output" = "Creating instance 'prod' for 'app-a'
Unpacking...
Running postinstall...
@@ -20,3 +20,24 @@ Postinstall completed successfully
Changing current symlink" ]
[ ${#lines[*]} == 6 ]
}
+
+@test "./app app install install-test-env" {
+ mkzip "install-test-env"
+ app app install \
+ -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...
+PATH=/bin:/usr/bin
+PWD=$WORK/install-test-env/prod/versions/1.0
+SHLVL=1
+_=/usr/bin/env
+Postinstall completed successfully
+Changing current symlink" ]
+ [ ${#lines[*]} == 9 ]
+}