diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2013-01-26 23:58:22 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2013-01-26 23:58:22 +0100 |
commit | 110ffae47db27a49bbc43f86ba3737bccc1b3085 (patch) | |
tree | d74934b12e2904b8aff5fe87421a6501b8ea5c8e /test/app-init.bats | |
parent | ca27d6f6d9ccc35bf55db3d360d1d464d5e206e7 (diff) | |
download | app.sh-110ffae47db27a49bbc43f86ba3737bccc1b3085.tar.gz app.sh-110ffae47db27a49bbc43f86ba3737bccc1b3085.tar.bz2 app.sh-110ffae47db27a49bbc43f86ba3737bccc1b3085.tar.xz app.sh-110ffae47db27a49bbc43f86ba3737bccc1b3085.zip |
o Rewriting most of this stuff to make it feel more like git.
Diffstat (limited to 'test/app-init.bats')
-rwxr-xr-x | test/app-init.bats | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/test/app-init.bats b/test/app-init.bats new file mode 100755 index 0000000..b62c42e --- /dev/null +++ b/test/app-init.bats @@ -0,0 +1,42 @@ +#!/usr/bin/env bats +# vim: set filetype=sh: + +load utils + +#@test "Invalid resolver" { +# app init -d my-app wat; echo_lines +# eq '$status' 1 +# eq '${#lines[*]}' 1 +# eq '${lines[0]}' "No such resolver: wat" +#} + +#@test "Already installed" { +# mkdir -p my-app/.apps +# app init -d my-app maven; echo_lines +# eq '$status' 1 +# eq '${#lines[*]}' 1 +# match '${lines[0]}' "my-app" +#} + +@test "Happy day" { + mkzip app-a + + REPO=$BATS_TMPDIR/repo + + if [ ! -f $REPO/org/example/app-a/1.0-SNAPSHOT/maven-metadata.xml ] + then + mvn deploy:deploy-file -Durl=file://$REPO \ + -Dfile=`echo $APPSH_HOME/test/data/app-a.zip` -DgeneratePom \ + -DgroupId=org.example -DartifactId=app-a -Dversion=1.0-SNAPSHOT -Dpackaging=zip + fi + + app init -d my-app maven -r "file://$BATS_TMPDIR/repo" org.example:app-a:1.0-SNAPSHOT; echo_lines + eq '$status' 0 + eq '${lines[0]}' "Resolving version 1.0-SNAPSHOT..." + match '${lines[1]}' "Resolved version to 1.0-.*" + match '${lines[2]}' "Downloading org.example:app-a:1.0-.*" + + eq '${#lines[*]}' 3 + + is_directory "my-app/.app" +} |