|
3 | 3 | source test/init |
4 | 4 | bpan:source bashplus +err +fs +sym |
5 | 5 |
|
6 | | -plan tests 100 |
| 6 | +plan tests 102 |
7 | 7 |
|
8 | 8 | host=localhost |
9 | 9 | url=https://localhost |
@@ -93,6 +93,9 @@ client-get-job() { |
93 | 93 | 10042) |
94 | 94 | echo '{"job": { "test": "vim", "result": "failed", "group": "42", "settings": {"NO_INVESTIGATION": "1"} } }' |
95 | 95 | ;; |
| 96 | + 10043) |
| 97 | + echo '{"job": { "test": "vim", "result": "failed", "group": "43", "settings": {"NO_INVESTIGATION": "0"} } }' |
| 98 | + ;; |
96 | 99 | 404) |
97 | 100 | echo '404 Not Found' |
98 | 101 | ;; |
@@ -144,6 +147,9 @@ client-get-job-comments() { |
144 | 147 | 10035) |
145 | 148 | echo '[{"id": 1236, "text":"Starting investigation for job 10035"}]' |
146 | 149 | ;; |
| 150 | + 10043) |
| 151 | + echo '[{"id": 10043, "text":"Starting investigation for job 10043"}]' |
| 152 | + ;; |
147 | 153 | 3000) |
148 | 154 | echo '[{"id": 1236, "text":"Automatic investigation jobs for job\n*a:investigate:retry*: t#30001\n*a:investigate:last_good_tests:coffee*: t#30002\n*a:investigate:last_good_build:2001*: t#30003\n*a:investigate:last_good_tests_and_build:coffee+2001*: t#30004"}]' |
149 | 155 | ;; |
@@ -174,6 +180,9 @@ client-post-job-comment() { |
174 | 180 | 10035) |
175 | 181 | echo '{"id": 1236}' |
176 | 182 | ;; |
| 183 | + 10043) |
| 184 | + echo '{"id": 10043}' |
| 185 | + ;; |
177 | 186 | 3000) |
178 | 187 | warn "Commenting 3000 ($@)" |
179 | 188 | exit 99 |
@@ -231,6 +240,9 @@ get-dependencies-ajax() { |
231 | 240 | 10042) |
232 | 241 | echo '{"cluster":{}, "edges":[], "nodes":[{"id":10042,"state":"done","result":"failed"}]}' |
233 | 242 | ;; |
| 243 | + 10043) |
| 244 | + echo '{"cluster":{}, "edges":[], "nodes":[{"id":10043,"state":"done","result":"failed"}]}' |
| 245 | + ;; |
234 | 246 | *) |
235 | 247 | echo '{"debug": "get-dependencies-ajax '"$tid"'"}' |
236 | 248 | ;; |
@@ -316,6 +328,10 @@ try investigate 10042 |
316 | 328 | is "$rc" 0 'NO_INVESTIGATION=1, a failed job with this variable should be skipped' |
317 | 329 | has "$got" 'NO_INVESTIGATION=1 detected, skipping' |
318 | 330 |
|
| 331 | +try investigate 10043 |
| 332 | +is "$rc" 0 "Successful clone, NO_INVESTIGATION != 1 should not change default behavior" |
| 333 | +has "$got" '_TRIGGER_JOB_DONE_HOOK=1' "job is cloned with _TRIGGER_JOB_DONE_HOOK" |
| 334 | + |
319 | 335 | test-post-investigate() { |
320 | 336 | # job is one of the other investigation types, e.g. :investigate:last_good_tests |
321 | 337 | try investigate 3001 |
|
0 commit comments