@@ -100,6 +100,8 @@ expect_exact_output() {
100100 echo ' FAIL'
101101 echo " Expected output: $expected_output "
102102 echo " Actual output: $actual_output "
103+ echo " infrakit -h"
104+ infrakit -h
103105 exit 1
104106 fi
105107}
@@ -118,6 +120,8 @@ expect_output_lines() {
118120 echo ' FAIL'
119121 echo " Expected line count: $expected_lines "
120122 echo " Actual line count: $actual_line_count "
123+ echo " infrakit -h"
124+ infrakit -h
121125 exit 1
122126 fi
123127}
@@ -141,8 +145,18 @@ infrakit group/cattle free
141145echo " Freed cattles; committing again"
142146
143147infrakit group commit scripts/cattle.json
148+
149+ sleep 10
150+
151+ if [[ $( infrakit -h | grep group/cattle) == " " ]]; then
152+ echo " checking the CLI"
153+ infrakit -h
154+ fi
155+
144156expect_exact_output " Should be watching one group" " infrakit group ls -q" " cattle"
145157
158+ echo " Updating specs to scale group to 10"
159+
146160expect_exact_output \
147161 " Update should roll 5 and scale group to 10" \
148162 " infrakit group/cattle commit scripts/cattle2.json --pretend" \
@@ -154,16 +168,19 @@ sleep 10
154168
155169expect_output_lines " 10 instances should exist in group" " infrakit group/cattle describe -q" " 10"
156170
157- # Terminate 3 instances.
171+ echo " Terminate 3 instances."
172+
158173pushd $INSTANCE_FILE_DIR
159174 rm $( ls | head -3)
160175popd
161176
162177sleep 10
163178
164- expect_output_lines " 10 instances should exist in group" " infrakit group describe cattle -q" " 10"
179+ expect_output_lines " 10 instances should exist in group" " infrakit group/cattle describe -q" " 10"
165180
166181infrakit group/cattle destroy
182+
183+ sleep 10
167184expect_output_lines " 0 instances should exist" " infrakit instance-file describe -q " " 0"
168185
169186echo ' ALL TESTS PASSED'
0 commit comments