@@ -100,6 +100,8 @@ expect_exact_output() {
100
100
echo ' FAIL'
101
101
echo " Expected output: $expected_output "
102
102
echo " Actual output: $actual_output "
103
+ echo " infrakit -h"
104
+ infrakit -h
103
105
exit 1
104
106
fi
105
107
}
@@ -118,6 +120,8 @@ expect_output_lines() {
118
120
echo ' FAIL'
119
121
echo " Expected line count: $expected_lines "
120
122
echo " Actual line count: $actual_line_count "
123
+ echo " infrakit -h"
124
+ infrakit -h
121
125
exit 1
122
126
fi
123
127
}
@@ -141,8 +145,18 @@ infrakit group/cattle free
141
145
echo " Freed cattles; committing again"
142
146
143
147
infrakit 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
+
144
156
expect_exact_output " Should be watching one group" " infrakit group ls -q" " cattle"
145
157
158
+ echo " Updating specs to scale group to 10"
159
+
146
160
expect_exact_output \
147
161
" Update should roll 5 and scale group to 10" \
148
162
" infrakit group/cattle commit scripts/cattle2.json --pretend" \
@@ -154,16 +168,19 @@ sleep 10
154
168
155
169
expect_output_lines " 10 instances should exist in group" " infrakit group/cattle describe -q" " 10"
156
170
157
- # Terminate 3 instances.
171
+ echo " Terminate 3 instances."
172
+
158
173
pushd $INSTANCE_FILE_DIR
159
174
rm $( ls | head -3)
160
175
popd
161
176
162
177
sleep 10
163
178
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"
165
180
166
181
infrakit group/cattle destroy
182
+
183
+ sleep 10
167
184
expect_output_lines " 0 instances should exist" " infrakit instance-file describe -q " " 0"
168
185
169
186
echo ' ALL TESTS PASSED'
0 commit comments