Skip to content

Commit 40eae48

Browse files
committed
[tests] Check docker rate is a number.
1 parent c754431 commit 40eae48

17 files changed

Lines changed: 78 additions & 0 deletions

tests/gantry_cleanup_images_spec.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ Describe 'cleanup-images'
6363
The stderr should satisfy spec_expect_no_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
6464
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
6565
The stderr should satisfy spec_expect_no_message "${DONE_REMOVING_IMAGES}"
66+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
6667
End
6768
End
6869
Describe "test_CLEANUP_IMAGES_OPTIONS_bad"
@@ -112,6 +113,7 @@ Describe 'cleanup-images'
112113
The stderr should satisfy spec_expect_no_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
113114
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
114115
The stderr should satisfy spec_expect_no_message "${DONE_REMOVING_IMAGES}"
116+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
115117
End
116118
End
117119
Describe "test_CLEANUP_IMAGES_OPTIONS_good"
@@ -160,6 +162,7 @@ Describe 'cleanup-images'
160162
The stderr should satisfy spec_expect_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
161163
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
162164
The stderr should satisfy spec_expect_message "${DONE_REMOVING_IMAGES}"
165+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
163166
End
164167
End
165168
Describe "test_IMAGES_TO_REMOVE_none_empty"
@@ -231,6 +234,7 @@ Describe 'cleanup-images'
231234
The stderr should satisfy spec_expect_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG1}"
232235
The stderr should satisfy spec_expect_message "There is no image.*${IMAGE_WITH_TAG2}"
233236
The stderr should satisfy spec_expect_message "${DONE_REMOVING_IMAGES}"
237+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
234238
End
235239
End
236240
End # Describe 'Single service'

tests/gantry_common_options_spec.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ Describe 'common-options'
6363
The stderr should satisfy spec_expect_no_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
6464
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
6565
The stderr should satisfy spec_expect_no_message "${DONE_REMOVING_IMAGES}"
66+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
6667
The stderr should satisfy spec_expect_no_message "${SCHEDULE_NEXT_UPDATE_AT}"
6768
The stderr should satisfy spec_expect_no_message "${WATCH_CHANGES_IN}"
6869
End
@@ -115,6 +116,7 @@ Describe 'common-options'
115116
The stderr should satisfy spec_expect_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
116117
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
117118
The stderr should satisfy spec_expect_message "${DONE_REMOVING_IMAGES}"
119+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
118120
The stderr should satisfy spec_expect_no_message "${SCHEDULE_NEXT_UPDATE_AT}"
119121
End
120122
End
@@ -270,6 +272,7 @@ Describe 'common-options'
270272
The stderr should satisfy spec_expect_message "TEST_OUTPUT_MULTIPLE_LINES=4$"
271273
The stderr should satisfy spec_expect_message "TEST_OUTPUT_MULTIPLE_LINES=5$"
272274
The stderr should satisfy spec_expect_message "Finish post-run command with a non-zero return value 1.$"
275+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
273276
The stderr should satisfy spec_expect_no_message "${SCHEDULE_NEXT_UPDATE_AT}"
274277
The stderr should satisfy spec_expect_no_message "${WATCH_CHANGES_IN}"
275278
End
@@ -321,6 +324,7 @@ Describe 'common-options'
321324
The stderr should satisfy spec_expect_no_message "${REMOVED_IMAGE}.*"
322325
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*"
323326
The stderr should satisfy spec_expect_no_message "${DONE_REMOVING_IMAGES}"
327+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
324328
The stderr should satisfy spec_expect_no_message "${SCHEDULE_NEXT_UPDATE_AT}"
325329
The stderr should satisfy spec_expect_no_message "${WATCH_CHANGES_IN}"
326330
End

tests/gantry_filters_spec.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ Describe 'filters'
6464
The stderr should satisfy spec_expect_no_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
6565
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
6666
The stderr should satisfy spec_expect_no_message "${DONE_REMOVING_IMAGES}"
67+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
6768
End
6869
End
6970
Describe "test_SERVICES_EXCLUDED_multiple_services"
@@ -124,6 +125,7 @@ Describe 'filters'
124125
The stderr should satisfy spec_expect_no_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
125126
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
126127
The stderr should satisfy spec_expect_no_message "${DONE_REMOVING_IMAGES}"
128+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
127129
End
128130
End
129131
Describe "test_SERVICES_EXCLUDED_FILTERS_default"
@@ -177,6 +179,7 @@ Describe 'filters'
177179
The stderr should satisfy spec_expect_no_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
178180
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
179181
The stderr should satisfy spec_expect_no_message "${DONE_REMOVING_IMAGES}"
182+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
180183
End
181184
End
182185
Describe "test_SERVICES_EXCLUDED_FILTERS_bad"
@@ -224,6 +227,7 @@ Describe 'filters'
224227
The stderr should satisfy spec_expect_no_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
225228
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
226229
The stderr should satisfy spec_expect_no_message "${DONE_REMOVING_IMAGES}"
230+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
227231
End
228232
End
229233
End # Describe 'Filters'

tests/gantry_jobs_spec.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ Describe 'jobs'
8686
The stderr should satisfy spec_expect_no_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
8787
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
8888
The stderr should satisfy spec_expect_no_message "${DONE_REMOVING_IMAGES}"
89+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
8990
End
9091
End
9192
Describe "test_jobs_UPDATE_JOBS_true"
@@ -139,6 +140,7 @@ Describe 'jobs'
139140
The stderr should satisfy spec_expect_no_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
140141
The stderr should satisfy spec_expect_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
141142
The stderr should satisfy spec_expect_message "${DONE_REMOVING_IMAGES}"
143+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
142144
End
143145
End
144146
Describe "test_jobs_label_UPDATE_JOBS_true"
@@ -198,6 +200,7 @@ Describe 'jobs'
198200
The stderr should satisfy spec_expect_no_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
199201
The stderr should satisfy spec_expect_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
200202
The stderr should satisfy spec_expect_message "${DONE_REMOVING_IMAGES}"
203+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
201204
End
202205
End
203206
Describe "test_jobs_no_running_tasks"
@@ -259,6 +262,7 @@ Describe 'jobs'
259262
The stderr should satisfy spec_expect_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
260263
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
261264
The stderr should satisfy spec_expect_message "${DONE_REMOVING_IMAGES}"
265+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
262266
End
263267
End
264268
End # Describe 'jobs'

tests/gantry_login_docker_config_spec.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ Describe 'login-docker-config'
113113
The stderr should satisfy spec_expect_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
114114
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
115115
The stderr should satisfy spec_expect_message "${DONE_REMOVING_IMAGES}"
116+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
116117
End
117118
End
118119
Describe "test_login_docker_config_default_config"
@@ -188,6 +189,7 @@ Describe 'login-docker-config'
188189
The stderr should satisfy spec_expect_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
189190
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
190191
The stderr should satisfy spec_expect_message "${DONE_REMOVING_IMAGES}"
192+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
191193
End
192194
End
193195
Describe "test_login_docker_config_label_override"
@@ -320,6 +322,7 @@ Describe 'login-docker-config'
320322
The stderr should satisfy spec_expect_no_message "${REMOVED_IMAGE}.*"
321323
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*"
322324
The stderr should satisfy spec_expect_no_message "${DONE_REMOVING_IMAGES}"
325+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
323326
End
324327
End
325328
End # Describe 'login-docker-config'

tests/gantry_login_negative_spec.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ Describe 'login-negative'
7272
The stderr should satisfy spec_expect_no_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
7373
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
7474
The stderr should satisfy spec_expect_no_message "${DONE_REMOVING_IMAGES}"
75+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
7576
End
7677
End
7778
Describe "test_login_incorrect_password"
@@ -145,6 +146,7 @@ Describe 'login-negative'
145146
The stderr should satisfy spec_expect_no_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
146147
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
147148
The stderr should satisfy spec_expect_no_message "${DONE_REMOVING_IMAGES}"
149+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
148150
End
149151
End
150152
Describe "test_login_read_only_file"
@@ -218,6 +220,7 @@ Describe 'login-negative'
218220
The stderr should satisfy spec_expect_no_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
219221
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
220222
The stderr should satisfy spec_expect_no_message "${DONE_REMOVING_IMAGES}"
223+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
221224
End
222225
End
223226
Describe "test_login_config_mismatch_default"
@@ -308,6 +311,7 @@ Describe 'login-negative'
308311
The stderr should satisfy spec_expect_no_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
309312
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
310313
The stderr should satisfy spec_expect_no_message "${DONE_REMOVING_IMAGES}"
314+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
311315
End
312316
End
313317
Describe "test_login_config_mismatch_no_default"
@@ -392,6 +396,7 @@ Describe 'login-negative'
392396
The stderr should satisfy spec_expect_no_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
393397
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
394398
The stderr should satisfy spec_expect_no_message "${DONE_REMOVING_IMAGES}"
399+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
395400
End
396401
End
397402
Describe "test_login_multi_services_no_label_multi_config"
@@ -512,6 +517,7 @@ Describe 'login-negative'
512517
The stderr should satisfy spec_expect_no_message "${REMOVED_IMAGE}.*"
513518
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*"
514519
The stderr should satisfy spec_expect_no_message "${DONE_REMOVING_IMAGES}"
520+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
515521
End
516522
End
517523
Describe "test_login_REGISTRY_CONFIGS_FILE_bad_format"
@@ -586,6 +592,7 @@ Describe 'login-negative'
586592
The stderr should satisfy spec_expect_no_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
587593
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
588594
The stderr should satisfy spec_expect_no_message "${DONE_REMOVING_IMAGES}"
595+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
589596
End
590597
End
591598
Describe "test_login_file_not_exist"
@@ -656,6 +663,7 @@ Describe 'login-negative'
656663
The stderr should satisfy spec_expect_no_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
657664
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
658665
The stderr should satisfy spec_expect_no_message "${DONE_REMOVING_IMAGES}"
666+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
659667
End
660668
End
661669
End # Describe 'login-negative'

tests/gantry_login_spec.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ Describe 'login'
100100
The stderr should satisfy spec_expect_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
101101
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
102102
The stderr should satisfy spec_expect_message "${DONE_REMOVING_IMAGES}"
103+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
103104
End
104105
End
105106
Describe "test_login_default_config"
@@ -173,6 +174,7 @@ Describe 'login'
173174
The stderr should satisfy spec_expect_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
174175
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
175176
The stderr should satisfy spec_expect_message "${DONE_REMOVING_IMAGES}"
177+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
176178
End
177179
End
178180
Describe "test_login_REGISTRY_CONFIGS_FILE"
@@ -254,6 +256,7 @@ Describe 'login'
254256
The stderr should satisfy spec_expect_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
255257
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
256258
The stderr should satisfy spec_expect_message "${DONE_REMOVING_IMAGES}"
259+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
257260
End
258261
End
259262
Describe "test_login_external_config"
@@ -331,6 +334,7 @@ Describe 'login'
331334
The stderr should satisfy spec_expect_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
332335
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
333336
The stderr should satisfy spec_expect_message "${DONE_REMOVING_IMAGES}"
337+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
334338
End
335339
End
336340
Describe "test_login_multi_services_no_label"
@@ -450,6 +454,7 @@ Describe 'login'
450454
The stderr should satisfy spec_expect_no_message "${REMOVED_IMAGE}.*"
451455
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*"
452456
The stderr should satisfy spec_expect_no_message "${DONE_REMOVING_IMAGES}"
457+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
453458
End
454459
End
455460
End # Describe 'Login'

tests/gantry_manifest_spec.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ Describe 'manifest-command'
7979
The stderr should satisfy spec_expect_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
8080
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
8181
The stderr should satisfy spec_expect_message "${DONE_REMOVING_IMAGES}"
82+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
8283
End
8384
End
8485
Describe "test_MANIFEST_CMD_none_SERVICES_SELF"
@@ -129,6 +130,7 @@ Describe 'manifest-command'
129130
The stderr should satisfy spec_expect_no_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
130131
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
131132
The stderr should satisfy spec_expect_no_message "${DONE_REMOVING_IMAGES}"
133+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
132134
End
133135
End
134136
Describe "test_MANIFEST_CMD_manifest"
@@ -176,6 +178,7 @@ Describe 'manifest-command'
176178
The stderr should satisfy spec_expect_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
177179
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
178180
The stderr should satisfy spec_expect_message "${DONE_REMOVING_IMAGES}"
181+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
179182
End
180183
End
181184
Describe "test_MANIFEST_CMD_label"
@@ -228,6 +231,7 @@ Describe 'manifest-command'
228231
The stderr should satisfy spec_expect_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
229232
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
230233
The stderr should satisfy spec_expect_message "${DONE_REMOVING_IMAGES}"
234+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
231235
End
232236
End
233237
Describe "test_MANIFEST_CMD_unsupported_cmd"
@@ -277,6 +281,7 @@ Describe 'manifest-command'
277281
The stderr should satisfy spec_expect_no_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
278282
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
279283
The stderr should satisfy spec_expect_no_message "${DONE_REMOVING_IMAGES}"
284+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
280285
End
281286
End
282287
Describe "test_MANIFEST_CMD_failure"
@@ -334,6 +339,7 @@ Describe 'manifest-command'
334339
The stderr should satisfy spec_expect_no_message "${REMOVED_IMAGE}.*${IMAGE_WITH_TAG}"
335340
The stderr should satisfy spec_expect_no_message "${FAILED_TO_REMOVE_IMAGE}.*${IMAGE_WITH_TAG}"
336341
The stderr should satisfy spec_expect_no_message "${DONE_REMOVING_IMAGES}"
342+
The stderr should satisfy spec_expect_no_message "${USED_RATE_NAN}"
337343
End
338344
End
339345
End # Describe 'Manifest command'

0 commit comments

Comments
 (0)