aboutsummaryrefslogtreecommitdiff
path: root/test/app-upgrade.bats
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2013-04-20 21:26:52 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2013-04-20 21:26:52 +0200
commit875716dc48cd5c485d2342c9e5bb1d461bc64b6d (patch)
treee8429406bfb43f593008375b673c6669c72f32f2 /test/app-upgrade.bats
parent32826f3c989e63f53510a9bdccd1855a9ae00636 (diff)
downloadapp.sh-875716dc48cd5c485d2342c9e5bb1d461bc64b6d.tar.gz
app.sh-875716dc48cd5c485d2342c9e5bb1d461bc64b6d.tar.bz2
app.sh-875716dc48cd5c485d2342c9e5bb1d461bc64b6d.tar.xz
app.sh-875716dc48cd5c485d2342c9e5bb1d461bc64b6d.zip
o Making the resolvers use app.resolved_version instead of app.version.
o Making set-version update app.version.
Diffstat (limited to 'test/app-upgrade.bats')
-rwxr-xr-xtest/app-upgrade.bats40
1 files changed, 40 insertions, 0 deletions
diff --git a/test/app-upgrade.bats b/test/app-upgrade.bats
new file mode 100755
index 0000000..2dde851
--- /dev/null
+++ b/test/app-upgrade.bats
@@ -0,0 +1,40 @@
+#!/usr/bin/env bats
+# vim: set filetype=sh:
+
+load utils
+
+@test "app-upgrade" {
+ mkzip app-a
+ install_artifact
+
+ app init -d my-app maven -r "$FIXED_REPO_URL" org.example:app-a:1.0-SNAPSHOT; echo_lines
+ eq '$status' 0
+
+ cd my-app
+ app conf get maven.version
+ match '${lines[0]}' "1.0-SNAPSHOT"
+ maven_version="${lines[0]}"
+ describe maven_version=$maven_version
+
+ app conf get app.version
+ match '${lines[0]}' "1.0-.*"
+ app_version="${lines[0]}"
+ describe app_version=$app_version
+
+ app conf get app.resolved_version
+ match '${lines[0]}' "1.0-.*"
+ eq '${lines[0]}' "$app_version"
+ resolved_version="${lines[0]}"
+ describe resolved_version=$resolved_version
+
+ install_artifact
+
+ app upgrade; echo_lines
+ eq '$status' 0
+
+ app conf get app.resolved_version
+ match '${lines[0]}' "1.0-.*"
+ new_resolved_version="${lines[0]}"
+ describe new_resolved_version=$new_resolved_version
+ neq $new_resolved_version $resolved_version
+}