parent
							
								
									98110fac91
								
							
						
					
					
						commit
						13efd245f9
					
				|  | @ -316,6 +316,19 @@ func TestEnsureJobFailedWithMaxRetries(t *testing.T) { | ||||||
| 				}, nil) | 				}, nil) | ||||||
| 		} | 		} | ||||||
| 
 | 
 | ||||||
|  | 		// fifth run - build should be unrecoverable failed and status updated
 | ||||||
|  | 		if reconcileAttempt == 5 { | ||||||
|  | 			jenkinsClient. | ||||||
|  | 				EXPECT(). | ||||||
|  | 				GetBuild(buildName, int64(2)). | ||||||
|  | 				Return(&gojenkins.Build{ | ||||||
|  | 					Raw: &gojenkins.BuildResponse{ | ||||||
|  | 						Result: string(v1alpha2.BuildFailureStatus), | ||||||
|  | 					}, | ||||||
|  | 					Jenkins: gojenkins.CreateJenkins(nil, ""), | ||||||
|  | 				}, nil) | ||||||
|  | 		} | ||||||
|  | 
 | ||||||
| 		done, errEnsureBuildJob := jobs.EnsureBuildJob(buildName, encodedHash, nil, jenkins, true) | 		done, errEnsureBuildJob := jobs.EnsureBuildJob(buildName, encodedHash, nil, jenkins, true) | ||||||
| 		assert.NoError(t, err) | 		assert.NoError(t, err) | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue