You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge pull request #15994 from coreydaley/build_pruning_tests_fix
Automatic merge from submit-queue
Fixing build pruning tests
Updating tests to look for 2-3 remaining builds based on HandleBuildPruning getting it's information from the cache.
@@ -81,7 +84,11 @@ var _ = g.Describe("[builds][pruning] prune builds based on settings in the buil
81
84
fmt.Fprintf(g.GinkgoWriter, "%v", err)
82
85
}
83
86
84
-
o.Expect(int32(len(builds.Items))).To(o.Equal(*buildConfig.Spec.SuccessfulBuildsHistoryLimit), "there should be %v completed builds left after pruning, but instead there were %v", *buildConfig.Spec.SuccessfulBuildsHistoryLimit, len(builds.Items))
@@ -122,7 +129,11 @@ var _ = g.Describe("[builds][pruning] prune builds based on settings in the buil
122
129
fmt.Fprintf(g.GinkgoWriter, "%v", err)
123
130
}
124
131
125
-
o.Expect(int32(len(builds.Items))).To(o.Equal(*buildConfig.Spec.FailedBuildsHistoryLimit), "there should be %v failed builds left after pruning, but instead there were %v", *buildConfig.Spec.FailedBuildsHistoryLimit, len(builds.Items))
o.Expect(passed).To(o.BeTrue(), "there should be 2-3 completed builds left after pruning, but instead there were %v", len(builds.Items))
126
137
127
138
})
128
139
@@ -163,7 +174,11 @@ var _ = g.Describe("[builds][pruning] prune builds based on settings in the buil
163
174
fmt.Fprintf(g.GinkgoWriter, "%v", err)
164
175
}
165
176
166
-
o.Expect(int32(len(builds.Items))).To(o.Equal(*buildConfig.Spec.FailedBuildsHistoryLimit), "there should be %v canceled builds left after pruning, but instead there were %v", *buildConfig.Spec.FailedBuildsHistoryLimit, len(builds.Items))
@@ -204,7 +219,11 @@ var _ = g.Describe("[builds][pruning] prune builds based on settings in the buil
204
219
fmt.Fprintf(g.GinkgoWriter, "%v", err)
205
220
}
206
221
207
-
o.Expect(int32(len(builds.Items))).To(o.Equal(*buildConfig.Spec.FailedBuildsHistoryLimit), "there should be %v failed builds left after pruning, but instead there were %v", *buildConfig.Spec.FailedBuildsHistoryLimit, len(builds.Items))
0 commit comments