Skip to content

Commit

Permalink
feat: add a test to prove that tls breaks app renames
Browse files Browse the repository at this point in the history
  • Loading branch information
josegonzalez committed Jul 28, 2018
1 parent e8265ac commit df834f4
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 13 deletions.
15 changes: 14 additions & 1 deletion tests/unit/10_apps.bats
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,19 @@ teardown () {
assert_success
}

@test "(apps) apps:rename with tls" {
setup_test_tls
deploy_app
run bash -c "dokku apps:rename $TEST_APP great-test-name"
echo "output: "$output
echo "status: "$status
assert_success
run bash -c "dokku --force apps:destroy great-test-name"
echo "output: "$output
echo "status: "$status
assert_success
}

@test "(apps) apps:clone" {
deploy_app
run bash -c "dokku apps:clone $TEST_APP great-test-name"
Expand Down Expand Up @@ -213,4 +226,4 @@ teardown () {
assert_output "false"

destroy_app
}
}
6 changes: 0 additions & 6 deletions tests/unit/30_core_1.bats
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,6 @@ assert_urls() {
assert_output < <(tr ' ' '\n' <<< "${urls}")
}

build_nginx_config() {
# simulate nginx post-deploy
dokku domains:setup $TEST_APP
dokku nginx:build-config $TEST_APP
}

@test "(core) remove exited containers" {
deploy_app

Expand Down
6 changes: 0 additions & 6 deletions tests/unit/40_core_2.bats
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,6 @@ assert_url() {
assert_output "${url}"
}

build_nginx_config() {
# simulate nginx post-deploy
dokku domains:setup $TEST_APP
dokku nginx:build-config $TEST_APP
}

@test "(core) run (with --options)" {
deploy_app
run /bin/bash -c "dokku --force --quiet run $TEST_APP node --version"
Expand Down
6 changes: 6 additions & 0 deletions tests/unit/test_helper.bash
Original file line number Diff line number Diff line change
Expand Up @@ -372,3 +372,9 @@ cat<<EOF > "$APP_REPO_DIR/nginx.conf.sigil"
some lame nginx config
EOF
}

build_nginx_config() {
# simulate nginx post-deploy
dokku domains:setup "$TEST_APP"
dokku nginx:build-config "$TEST_APP"
}

0 comments on commit df834f4

Please sign in to comment.