aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2012-10-15 18:43:59 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2012-10-15 18:43:59 +0200
commit7a2bbcede061b26cd478a78096512a4bd759ec3e (patch)
treea853e330b1ff770fba241c1e9707a5bb124a6807 /test
parent2c7a659b8a8d0d7a082aed01ab44e5710841412b (diff)
downloadapp.sh-7a2bbcede061b26cd478a78096512a4bd759ec3e.tar.gz
app.sh-7a2bbcede061b26cd478a78096512a4bd759ec3e.tar.bz2
app.sh-7a2bbcede061b26cd478a78096512a4bd759ec3e.tar.xz
app.sh-7a2bbcede061b26cd478a78096512a4bd759ec3e.zip
o Renaming './app app' to './app instance'.
Diffstat (limited to 'test')
-rwxr-xr-xtest/app-help.bats22
-rwxr-xr-xtest/app-install.bats8
-rwxr-xr-xtest/app-list-versions.bats16
-rwxr-xr-xtest/app-list.bats70
4 files changed, 58 insertions, 58 deletions
diff --git a/test/app-help.bats b/test/app-help.bats
index 68f88e3..4b94f23 100755
--- a/test/app-help.bats
+++ b/test/app-help.bats
@@ -3,35 +3,35 @@
load utils
-@test "./app app" {
- app app; echo_lines
+@test "./app instance" {
+ app instance; echo_lines
[ $status -eq $exit_usage_wrong ]
- [ $(expr "${lines[0]}" : "usage: ./app app .*") -ne 0 ]
+ [ $(expr "${lines[0]}" : "usage: ./app instance .*") -ne 0 ]
[ ${#lines[*]} == 6 ]
}
-@test "./app app install" {
- app app install; echo_lines
+@test "./app instance install" {
+ app instance install; echo_lines
[ $status -eq $exit_usage ]
[ $(expr "${lines[0]}" : "usage: install .*") -ne 0 ]
[ ${#lines[*]} == 6 ]
}
-@test "./app app list" {
- app app list; echo_lines
+@test "./app instance list" {
+ app instance list; echo_lines
[ $status -eq 0 ]
[ ${#lines[*]} == 0 ]
}
-@test "./app app list-versions" {
- app app list-versions; echo_lines
+@test "./app instance list-versions" {
+ app instance list-versions; echo_lines
[ $status -eq $exit_usage ]
[ $(expr "${lines[0]}" : "usage: list-versions .*") -ne 0 ]
[ ${#lines[*]} == 1 ]
}
-@test "./app app set-current" {
- app app "set-current"; echo_lines
+@test "./app instance set-current" {
+ app instance "set-current"; echo_lines
[ $status -eq $exit_usage ]
[ $(expr "${lines[0]}" : "usage: set-current .*") -ne 0 ]
[ ${#lines[*]} == 1 ]
diff --git a/test/app-install.bats b/test/app-install.bats
index 9961c84..59880bd 100755
--- a/test/app-install.bats
+++ b/test/app-install.bats
@@ -5,9 +5,9 @@ load utils
# TODO: Add test for installing duplicate version
-@test "./app app install app-a" {
+@test "./app instance install app-a" {
mkzip "app-a"
- app app install \
+ app instance install \
-r file \
-u $BATS_TEST_DIRNAME/data/app-a.zip \
-n app-a -i prod
@@ -23,9 +23,9 @@ Changing current symlink" ]
[ ${#lines[*]} == 6 ]
}
-@test "./app app install install-test-env" {
+@test "./app instance install install-test-env" {
mkzip "install-test-env"
- app app install \
+ app instance install \
-r file \
-u $BATS_TEST_DIRNAME/data/install-test-env.zip \
-n install-test-env -i prod -v 1.0
diff --git a/test/app-list-versions.bats b/test/app-list-versions.bats
index 207a282..17fb2d2 100755
--- a/test/app-list-versions.bats
+++ b/test/app-list-versions.bats
@@ -3,22 +3,22 @@
load utils
-@test "./app app list-versions" {
+@test "./app instance list-versions" {
mkzip "app-a"
- app app install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-a -i env-a -v 1.0 &&
- app app install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-a -i env-a -v 1.1 &&
- app app install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-a -i env-b -v 1.0 &&
- app app install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-b -i env-a -v 1.0 &&
- app app install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-b -i env-b -v 1.0
+ app instance install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-a -i env-a -v 1.0 &&
+ app instance install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-a -i env-a -v 1.1 &&
+ app instance install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-a -i env-b -v 1.0 &&
+ app instance install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-b -i env-a -v 1.0 &&
+ app instance install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-b -i env-b -v 1.0
[ $status -eq 0 ]
- app app list-versions -n app-a -i env-a; echo_lines
+ app instance list-versions -n app-a -i env-a; echo_lines
[ $status -eq 0 ]
[ "$output" = "Available versions for app-a/env-a:
1.0
1.1" ]
- app app list-versions -n app-a -i env-a -P; echo_lines
+ app instance list-versions -n app-a -i env-a -P; echo_lines
[ $status -eq 0 ]
[ "$output" = "1.0
1.1" ]
diff --git a/test/app-list.bats b/test/app-list.bats
index e7e06e9..3092837 100755
--- a/test/app-list.bats
+++ b/test/app-list.bats
@@ -3,16 +3,16 @@
load utils
-@test "./app app list - all apps" {
+@test "./app instance list - all apps" {
mkzip "app-a"
- app app install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-a -i env-a -v 1.0 &&
- app app install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-a -i env-a -v 1.1 &&
- app app install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-a -i env-b -v 1.0 &&
- app app install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-b -i env-a -v 1.0 &&
- app app install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-b -i env-b -v 1.0
+ app instance install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-a -i env-a -v 1.0 &&
+ app instance install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-a -i env-a -v 1.1 &&
+ app instance install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-a -i env-b -v 1.0 &&
+ app instance install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-b -i env-a -v 1.0 &&
+ app instance install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-b -i env-b -v 1.0
[ $status -eq 0 ]
- app app list; echo_lines
+ app instance list; echo_lines
[ $status -eq 0 ]
[ "$output" = "Name Instance Version
app-a env-a 1.1
@@ -20,7 +20,7 @@ app-a env-b 1.0
app-b env-a 1.0
app-b env-b 1.0 " ]
- app app list -P name -P instance -P version; echo_lines
+ app instance list -P name -P instance -P version; echo_lines
[ $status -eq 0 ]
[ "$output" = "app-a:env-a:1.1
app-a:env-b:1.0
@@ -28,75 +28,75 @@ app-b:env-a:1.0
app-b:env-b:1.0" ]
}
-@test "./app app list - -n filter" {
+@test "./app instance list - -n filter" {
mkzip "app-a"
- app app install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-a -i env-a -v 1.0 &&
- app app install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-a -i env-a -v 1.1 &&
- app app install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-a -i env-b -v 1.0 &&
- app app install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-b -i env-a -v 1.0 &&
- app app install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-b -i env-b -v 1.0
+ app instance install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-a -i env-a -v 1.0 &&
+ app instance install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-a -i env-a -v 1.1 &&
+ app instance install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-a -i env-b -v 1.0 &&
+ app instance install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-b -i env-a -v 1.0 &&
+ app instance install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-b -i env-b -v 1.0
[ $status -eq 0 ]
- app app list -n foo; echo_lines
+ app instance list -n foo; echo_lines
[ $status -eq 0 ]
[ "$output" = "Name Instance Version " ]
- app app list -n app-a; echo_lines
+ app instance list -n app-a; echo_lines
[ $status -eq 0 ]
[ "$output" = "Name Instance Version
app-a env-a 1.1
app-a env-b 1.0 " ]
- app app list -n app-a -P name -P instance -P version; echo_lines
+ app instance list -n app-a -P name -P instance -P version; echo_lines
[ $status -eq 0 ]
[ "$output" = "app-a:env-a:1.1
app-a:env-b:1.0" ]
}
-@test "./app app list - -i filter" {
+@test "./app instance list - -i filter" {
mkzip "app-a"
- app app install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-a -i env-a -v 1.0 &&
- app app install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-a -i env-a -v 1.1 &&
- app app install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-a -i env-b -v 1.0 &&
- app app install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-b -i env-a -v 1.0 &&
- app app install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-b -i env-b -v 1.0
+ app instance install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-a -i env-a -v 1.0 &&
+ app instance install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-a -i env-a -v 1.1 &&
+ app instance install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-a -i env-b -v 1.0 &&
+ app instance install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-b -i env-a -v 1.0 &&
+ app instance install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-b -i env-b -v 1.0
[ $status -eq 0 ]
- app app list -i foo; echo_lines
+ app instance list -i foo; echo_lines
[ $status -eq 0 ]
[ "$output" = "Name Instance Version " ]
- app app list -i env-a; echo_lines
+ app instance list -i env-a; echo_lines
[ $status -eq 0 ]
[ "$output" = "Name Instance Version
app-a env-a 1.1
app-b env-a 1.0 " ]
- app app list -i env-a -P name -P instance -P version; echo_lines
+ app instance list -i env-a -P name -P instance -P version; echo_lines
[ $status -eq 0 ]
[ "$output" = "app-a:env-a:1.1
app-b:env-a:1.0" ]
}
-@test "./app app list - -n + -i filter" {
+@test "./app instance list - -n + -i filter" {
mkzip "app-a"
- app app install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-a -i env-a -v 1.0 &&
- app app install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-a -i env-a -v 1.1 &&
- app app install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-a -i env-b -v 1.0 &&
- app app install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-b -i env-a -v 1.0 &&
- app app install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-b -i env-b -v 1.0
+ app instance install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-a -i env-a -v 1.0 &&
+ app instance install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-a -i env-a -v 1.1 &&
+ app instance install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-a -i env-b -v 1.0 &&
+ app instance install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-b -i env-a -v 1.0 &&
+ app instance install -r file -u $BATS_TEST_DIRNAME/data/app-a.zip -n app-b -i env-b -v 1.0
[ $status -eq 0 ]
- app app list -n foo -i bar; echo_lines
+ app instance list -n foo -i bar; echo_lines
[ $status -eq 0 ]
[ "$output" = "Name Instance Version " ]
- app app list -n app-a -i env-a; echo_lines
+ app instance list -n app-a -i env-a; echo_lines
[ $status -eq 0 ]
[ "$output" = "Name Instance Version
app-a env-a 1.1 " ]
- app app list -n app-a -i env-a -P name -P instance -P version; echo_lines
+ app instance list -n app-a -i env-a -P name -P instance -P version; echo_lines
[ $status -eq 0 ]
[ "$output" = "app-a:env-a:1.1" ]
}