Skip to content

Commit 59ad19d

Browse files
author
OpenShift Bot
committed
Merge pull request #9160 from gabemontero/bldDescrFlake
Merged by openshift-bot
2 parents f76ea9e + 79020e2 commit 59ad19d

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

pkg/cmd/cli/describe/describer_test.go

+11-11
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ func TestDescribeBuildDuration(t *testing.T) {
167167
Duration: zeroDuration,
168168
},
169169
},
170-
"waiting for 1m0s",
170+
"waiting for 1m",
171171
},
172172
{ // 1 - build pending
173173
&buildapi.Build{
@@ -177,7 +177,7 @@ func TestDescribeBuildDuration(t *testing.T) {
177177
Duration: zeroDuration,
178178
},
179179
},
180-
"waiting for 1m0s",
180+
"waiting for 1m",
181181
},
182182
{ // 2 - build running
183183
&buildapi.Build{
@@ -188,7 +188,7 @@ func TestDescribeBuildDuration(t *testing.T) {
188188
Duration: duration,
189189
},
190190
},
191-
"running for 1m0s",
191+
"running for 1m",
192192
},
193193
{ // 3 - build completed
194194
&buildapi.Build{
@@ -200,7 +200,7 @@ func TestDescribeBuildDuration(t *testing.T) {
200200
Duration: duration,
201201
},
202202
},
203-
"1m0s",
203+
"1m",
204204
},
205205
{ // 4 - build failed
206206
&buildapi.Build{
@@ -212,7 +212,7 @@ func TestDescribeBuildDuration(t *testing.T) {
212212
Duration: duration,
213213
},
214214
},
215-
"1m0s",
215+
"1m",
216216
},
217217
{ // 5 - build error
218218
&buildapi.Build{
@@ -224,7 +224,7 @@ func TestDescribeBuildDuration(t *testing.T) {
224224
Duration: duration,
225225
},
226226
},
227-
"1m0s",
227+
"1m",
228228
},
229229
{ // 6 - build cancelled before running, start time wasn't set yet
230230
&buildapi.Build{
@@ -235,7 +235,7 @@ func TestDescribeBuildDuration(t *testing.T) {
235235
Duration: duration,
236236
},
237237
},
238-
"waited for 2m0s",
238+
"waited for 2m",
239239
},
240240
{ // 7 - build cancelled while running, start time is set already
241241
&buildapi.Build{
@@ -247,7 +247,7 @@ func TestDescribeBuildDuration(t *testing.T) {
247247
Duration: duration,
248248
},
249249
},
250-
"1m0s",
250+
"1m",
251251
},
252252
{ // 8 - build failed before running, start time wasn't set yet
253253
&buildapi.Build{
@@ -258,7 +258,7 @@ func TestDescribeBuildDuration(t *testing.T) {
258258
Duration: duration,
259259
},
260260
},
261-
"waited for 2m0s",
261+
"waited for 2m",
262262
},
263263
{ // 9 - build error before running, start time wasn't set yet
264264
&buildapi.Build{
@@ -269,12 +269,12 @@ func TestDescribeBuildDuration(t *testing.T) {
269269
Duration: duration,
270270
},
271271
},
272-
"waited for 2m0s",
272+
"waited for 2m",
273273
},
274274
}
275275

276276
for i, tc := range tests {
277-
if actual, expected := describeBuildDuration(tc.build), tc.output; actual != expected {
277+
if actual, expected := describeBuildDuration(tc.build), tc.output; !strings.Contains(actual, expected) {
278278
t.Errorf("(%d) expected duration output %s, got %s", i, expected, actual)
279279
}
280280
}

0 commit comments

Comments
 (0)