diff --git a/scripts/integration.sh b/scripts/integration.sh index 3e2743ccb..bc6fdc1cd 100755 --- a/scripts/integration.sh +++ b/scripts/integration.sh @@ -18,19 +18,17 @@ function usage() { integration.sh --github-token [OPTIONS] Runs the integration tests. OPTIONS - --help -h prints the command usage - --github-token GitHub token to use when making API requests - --platform Switchblade platform to execute the tests against - --keep-failed-containers Preserve failed test containers for debugging (default: false) + --help -h prints the command usage + --github-token GitHub token to use when making API requests + --platform Switchblade platform to execute the tests against USAGE } function main() { - local src stack platform token cached parallel keep_failed + local src stack platform token cached parallel src="$(find "${ROOTDIR}/src" -mindepth 1 -maxdepth 1 -type d )" stack="${CF_STACK:-$(jq -r -S .stack "${ROOTDIR}/config.json")}" platform="cf" - keep_failed="false" while [[ "${#}" != 0 ]]; do case "${1}" in @@ -54,11 +52,6 @@ function main() { shift 2 ;; - --keep-failed-containers) - keep_failed="true" - shift 1 - ;; - --help|-h) shift 1 usage @@ -101,26 +94,24 @@ function main() { echo "Running integration suite (cached: ${cached}, parallel: ${parallel})" - specs::run "${cached}" "${parallel}" "${stack}" "${platform}" "${token:-}" "${keep_failed}" + specs::run "${cached}" "${parallel}" "${stack}" "${platform}" "${token:-}" done } function specs::run() { - local cached parallel stack platform token keep_failed + local cached parallel stack platform token cached="${1}" parallel="${2}" stack="${3}" platform="${4}" token="${5}" - keep_failed="${6}" - local nodes cached_flag serial_flag platform_flag stack_flag token_flag keep_failed_flag + local nodes cached_flag serial_flag platform_flag stack_flag token_flag cached_flag="--cached=${cached}" serial_flag="--serial=true" platform_flag="--platform=${platform}" stack_flag="--stack=${stack}" token_flag="--github-token=${token}" - keep_failed_flag="" nodes=1 if [[ "${parallel}" == "true" ]]; then @@ -128,10 +119,6 @@ function specs::run() { serial_flag="" fi - if [[ "${keep_failed}" == "true" ]]; then - keep_failed_flag="--keep-failed-containers" - fi - local buildpack_file buildpack_file="$(buildpack::package "1.2.3" "${cached}" "${stack}")" @@ -144,12 +131,11 @@ function specs::run() { -mod vendor \ -v \ "${src}/integration" \ - ${cached_flag} \ - ${platform_flag} \ - ${token_flag} \ - ${stack_flag} \ - ${serial_flag} \ - ${keep_failed_flag} + "${cached_flag}" \ + "${platform_flag}" \ + "${token_flag}" \ + "${stack_flag}" \ + "${serial_flag}" } function buildpack::package() {