- Strip prefix directories from tarball
This commit is contained in:
@@ -12,19 +12,27 @@ teardown() {
|
||||
|
||||
deploy_app_tar() {
|
||||
APP_TYPE="$1"; APP_TYPE=${APP_TYPE:="nodejs-express"}
|
||||
GIT_REMOTE="$2"; GIT_REMOTE=${GIT_REMOTE:="dokku@dokku.me:$TEST_APP"}
|
||||
TMP=$(mktemp -d -t "dokku.me.XXXXX")
|
||||
rmdir $TMP && cp -r ./tests/apps/$APP_TYPE $TMP
|
||||
cd $TMP
|
||||
tar c . | ssh dokku@dokku.me tar:in $TEST_APP || destroy_app $?
|
||||
shift 1
|
||||
tar c . $* | ssh dokku@dokku.me tar:in $TEST_APP || destroy_app $?
|
||||
}
|
||||
|
||||
@test "(tar) basic deploy using tar:in" {
|
||||
deploy_app_tar
|
||||
@test "(tar) non-tarbomb deploy using tar:in" {
|
||||
deploy_app_tar nodejs-express --transform 's,^,prefix/,'
|
||||
|
||||
run bash -c "response=\"$(curl -s -S my-cool-guy-test-app.dokku.me)\"; echo \$response; test \"\$response\" == \"nodejs/express\""
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
assert_success
|
||||
}
|
||||
|
||||
@test "(tar) tarbomb deploy using tar:in" {
|
||||
deploy_app_tar nodejs-express
|
||||
|
||||
run bash -c "response=\"$(curl -s -S my-cool-guy-test-app.dokku.me)\"; echo \$response; test \"\$response\" == \"nodejs/express\""
|
||||
echo "output: "$output
|
||||
echo "status: "$status
|
||||
assert_success
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user