@@ -18,19 +18,17 @@ function usage() {
1818integration.sh --github-token <token> [OPTIONS]
1919Runs the integration tests.
2020OPTIONS
21- --help -h prints the command usage
22- --github-token <token> GitHub token to use when making API requests
23- --platform <cf|docker> Switchblade platform to execute the tests against
24- --keep-failed-containers Preserve failed test containers for debugging (default: false)
21+ --help -h prints the command usage
22+ --github-token <token> GitHub token to use when making API requests
23+ --platform <cf|docker> Switchblade platform to execute the tests against
2524USAGE
2625}
2726
2827function main() {
29- local src stack platform token cached parallel keep_failed
28+ local src stack platform token cached parallel
3029 src=" $( find " ${ROOTDIR} /src" -mindepth 1 -maxdepth 1 -type d ) "
3130 stack=" ${CF_STACK:- $(jq -r -S .stack " ${ROOTDIR} /config.json" )} "
3231 platform=" cf"
33- keep_failed=" false"
3432
3533 while [[ " ${# } " != 0 ]]; do
3634 case " ${1} " in
@@ -54,11 +52,6 @@ function main() {
5452 shift 2
5553 ;;
5654
57- --keep-failed-containers)
58- keep_failed=" true"
59- shift 1
60- ;;
61-
6255 --help|-h)
6356 shift 1
6457 usage
@@ -101,37 +94,31 @@ function main() {
10194
10295 echo " Running integration suite (cached: ${cached} , parallel: ${parallel} )"
10396
104- specs::run " ${cached} " " ${parallel} " " ${stack} " " ${platform} " " ${token:- } " " ${keep_failed} "
97+ specs::run " ${cached} " " ${parallel} " " ${stack} " " ${platform} " " ${token:- } "
10598 done
10699}
107100
108101function specs::run() {
109- local cached parallel stack platform token keep_failed
102+ local cached parallel stack platform token
110103 cached=" ${1} "
111104 parallel=" ${2} "
112105 stack=" ${3} "
113106 platform=" ${4} "
114107 token=" ${5} "
115- keep_failed=" ${6} "
116108
117- local nodes cached_flag serial_flag platform_flag stack_flag token_flag keep_failed_flag
109+ local nodes cached_flag serial_flag platform_flag stack_flag token_flag
118110 cached_flag=" --cached=${cached} "
119111 serial_flag=" --serial=true"
120112 platform_flag=" --platform=${platform} "
121113 stack_flag=" --stack=${stack} "
122114 token_flag=" --github-token=${token} "
123- keep_failed_flag=" "
124115 nodes=1
125116
126117 if [[ " ${parallel} " == " true" ]]; then
127118 nodes=3
128119 serial_flag=" "
129120 fi
130121
131- if [[ " ${keep_failed} " == " true" ]]; then
132- keep_failed_flag=" --keep-failed-containers"
133- fi
134-
135122 local buildpack_file
136123 buildpack_file=" $( buildpack::package " 1.2.3" " ${cached} " " ${stack} " ) "
137124
@@ -144,12 +131,11 @@ function specs::run() {
144131 -mod vendor \
145132 -v \
146133 " ${src} /integration" \
147- ${cached_flag} \
148- ${platform_flag} \
149- ${token_flag} \
150- ${stack_flag} \
151- ${serial_flag} \
152- ${keep_failed_flag}
134+ " ${cached_flag} " \
135+ " ${platform_flag} " \
136+ " ${token_flag} " \
137+ " ${stack_flag} " \
138+ " ${serial_flag} "
153139}
154140
155141function buildpack::package() {
0 commit comments