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
Copy file name to clipboardExpand all lines: insights/v1alpha1/tests/datagathers.insights.openshift.io/InsightsOnDemandDataGather.yaml
+140-1Lines changed: 140 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -257,4 +257,143 @@ tests:
257
257
spec: {} # No spec is required for a DataGather
258
258
status:
259
259
dataGatherState: Running
260
-
expectedStatusError: "status.dataGatherState: Invalid value: \"string\": dataGatherState cannot transition from Failed to Running"
260
+
expectedStatusError: "status.dataGatherState: Invalid value: \"string\": dataGatherState cannot transition from Failed to Running"
261
+
- name: lastGatherDuration can be updated with a trailing zero value
262
+
initial: |
263
+
apiVersion: insights.openshift.io/v1alpha1
264
+
kind: DataGather
265
+
spec: {} # No spec is required for a DataGather
266
+
updated: |
267
+
apiVersion: insights.openshift.io/v1alpha1
268
+
kind: DataGather
269
+
spec: {} # No spec is required for a DataGather
270
+
status:
271
+
gatherers:
272
+
- name: testGatherer
273
+
lastGatherDuration: 1m0s
274
+
conditions:
275
+
- type: Gathered
276
+
status: "True"
277
+
reason: OK
278
+
message: "test message"
279
+
lastTransitionTime: "2024-12-01T08:04:21Z"
280
+
expected: |
281
+
apiVersion: insights.openshift.io/v1alpha1
282
+
kind: DataGather
283
+
spec: {} # No spec is required for a DataGather
284
+
status:
285
+
gatherers:
286
+
- name: testGatherer
287
+
lastGatherDuration: 1m0s
288
+
conditions:
289
+
- type: Gathered
290
+
status: "True"
291
+
reason: OK
292
+
message: "test message"
293
+
lastTransitionTime: "2024-12-01T08:04:21Z"
294
+
- name: lastGatherDuration can be updated with a leading zero value
295
+
initial: |
296
+
apiVersion: insights.openshift.io/v1alpha1
297
+
kind: DataGather
298
+
spec: {} # No spec is required for a DataGather
299
+
updated: |
300
+
apiVersion: insights.openshift.io/v1alpha1
301
+
kind: DataGather
302
+
spec: {} # No spec is required for a DataGather
303
+
status:
304
+
gatherers:
305
+
- name: testGatherer
306
+
lastGatherDuration: 0m11s
307
+
conditions:
308
+
- type: Gathered
309
+
status: "True"
310
+
reason: OK
311
+
message: "test message"
312
+
lastTransitionTime: "2024-12-01T08:04:21Z"
313
+
expected: |
314
+
apiVersion: insights.openshift.io/v1alpha1
315
+
kind: DataGather
316
+
spec: {} # No spec is required for a DataGather
317
+
status:
318
+
gatherers:
319
+
- name: testGatherer
320
+
lastGatherDuration: 0m11s
321
+
conditions:
322
+
- type: Gathered
323
+
status: "True"
324
+
reason: OK
325
+
message: "test message"
326
+
lastTransitionTime: "2024-12-01T08:04:21Z"
327
+
- name: lastGatherDuration can be updated with a decimal number value
328
+
initial: |
329
+
apiVersion: insights.openshift.io/v1alpha1
330
+
kind: DataGather
331
+
spec: {} # No spec is required for a DataGather
332
+
updated: |
333
+
apiVersion: insights.openshift.io/v1alpha1
334
+
kind: DataGather
335
+
spec: {} # No spec is required for a DataGather
336
+
status:
337
+
gatherers:
338
+
- name: testGatherer
339
+
lastGatherDuration: 1m0.77s
340
+
conditions:
341
+
- type: Gathered
342
+
status: "True"
343
+
reason: OK
344
+
message: "test message"
345
+
lastTransitionTime: "2024-12-01T08:04:21Z"
346
+
expected: |
347
+
apiVersion: insights.openshift.io/v1alpha1
348
+
kind: DataGather
349
+
spec: {} # No spec is required for a DataGather
350
+
status:
351
+
gatherers:
352
+
- name: testGatherer
353
+
lastGatherDuration: 1m0.77s
354
+
conditions:
355
+
- type: Gathered
356
+
status: "True"
357
+
reason: OK
358
+
message: "test message"
359
+
lastTransitionTime: "2024-12-01T08:04:21Z"
360
+
- name: lastGatherDuration cannot be updated with an invalid value
361
+
initial: |
362
+
apiVersion: insights.openshift.io/v1alpha1
363
+
kind: DataGather
364
+
spec: {} # No spec is required for a DataGather
365
+
updated: |
366
+
apiVersion: insights.openshift.io/v1alpha1
367
+
kind: DataGather
368
+
spec: {} # No spec is required for a DataGather
369
+
status:
370
+
gatherers:
371
+
- name: testGatherer
372
+
lastGatherDuration: 1d2h
373
+
conditions:
374
+
- type: Gathered
375
+
status: "True"
376
+
reason: OK
377
+
message: "test message"
378
+
lastTransitionTime: "2024-12-01T08:04:21Z"
379
+
expectedStatusError: "Invalid value: \"1d2h\": gatherers[0].lastGatherDuration in body should match '^(([0-9]+(?:\\.[0-9]+)?(ns|us|µs|μs|ms|s|m|h))+)$'"
380
+
- name: lastGatherDuration cannot be updated with a negative value
381
+
initial: |
382
+
apiVersion: insights.openshift.io/v1alpha1
383
+
kind: DataGather
384
+
spec: {} # No spec is required for a DataGather
385
+
updated: |
386
+
apiVersion: insights.openshift.io/v1alpha1
387
+
kind: DataGather
388
+
spec: {} # No spec is required for a DataGather
389
+
status:
390
+
gatherers:
391
+
- name: testGatherer
392
+
lastGatherDuration: -0m5s
393
+
conditions:
394
+
- type: Gathered
395
+
status: "True"
396
+
reason: OK
397
+
message: "test message"
398
+
lastTransitionTime: "2024-12-01T08:04:21Z"
399
+
expectedStatusError: "Invalid value: \"-0m5s\": gatherers[0].lastGatherDuration in body should match '^(([0-9]+(?:\\.[0-9]+)?(ns|us|µs|μs|ms|s|m|h))+)$'"
Copy file name to clipboardExpand all lines: insights/v1alpha1/zz_generated.crd-manifests/0000_10_insights_01_datagathers-TechPreviewNoUpgrade.crd.yaml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -263,7 +263,7 @@ spec:
263
263
x-kubernetes-list-type: map
264
264
lastGatherDuration:
265
265
description: lastGatherDuration represents the time spent gathering.
Copy file name to clipboardExpand all lines: insights/v1alpha1/zz_generated.featuregated-crd-manifests/datagathers.insights.openshift.io/InsightsOnDemandDataGather.yaml
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -263,7 +263,7 @@ spec:
263
263
x-kubernetes-list-type: map
264
264
lastGatherDuration:
265
265
description: lastGatherDuration represents the time spent gathering.
0 commit comments