Skip to content

Commit c47f3e9

Browse files
committed
fix: integration tests
Signed-off-by: Ondrej Pokorny <[email protected]>
1 parent 1d4bc48 commit c47f3e9

File tree

2 files changed

+22
-10
lines changed

2 files changed

+22
-10
lines changed

config/v1/tests/insightsdatagathers.config.openshift.io/InsightsConfig.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,23 @@ tests:
99
initial: |
1010
apiVersion: config.openshift.io/v1
1111
kind: InsightsDataGather
12-
spec: {} # No spec is required for a InsightsDataGather
12+
spec:
13+
gatherConfig:
14+
gatherers:
15+
mode: All
1316
expected: |
17+
apiVersion: config.openshift.io/v1
18+
kind: InsightsDataGather
19+
spec:
20+
gatherConfig:
21+
gatherers:
22+
mode: All
23+
- name: InsightsDataGather without the spec should not be created
24+
initial: |
1425
apiVersion: config.openshift.io/v1
1526
kind: InsightsDataGather
1627
spec: {}
28+
expectedError: "spec: Invalid value: 0: spec in body should have at least 1 properties"
1729
- name: Should be able to create InsightsDataGather with a storage and PersistentVolume
1830
initial: |
1931
apiVersion: config.openshift.io/v1

insights/v1/tests/datagathers.insights.openshift.io/InsightsOnDemandDataGather.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ tests:
262262
relatedObjects:
263263
- name: periodic-job-xyz
264264
resource: "pods"
265-
group: ""
265+
group: "group"
266266
namespace: "openshift-insights"
267267
updated: |
268268
apiVersion: insights.openshift.io/v1
@@ -273,7 +273,7 @@ tests:
273273
relatedObjects:
274274
- name: periodic-job-xyz
275275
resource: "pods"
276-
group: ""
276+
group: "group"
277277
namespace: "openshift-insights"
278278
expected: |
279279
apiVersion: insights.openshift.io/v1
@@ -283,7 +283,7 @@ tests:
283283
insightsRequestID: testing-xyz
284284
relatedObjects:
285285
- name: periodic-job-xyz
286-
group: ""
286+
group: "group"
287287
resource: "pods"
288288
namespace: "openshift-insights"
289289
- name: insightsRequestID cannot be removed from status
@@ -295,7 +295,7 @@ tests:
295295
insightsRequestID: testing-xyz
296296
relatedObjects:
297297
- name: periodic-job-xyz
298-
group: ""
298+
group: "group"
299299
resource: "pods"
300300
namespace: "openshift-insights"
301301
updated: |
@@ -305,7 +305,7 @@ tests:
305305
status:
306306
relatedObjects:
307307
- name: periodic-job-xyz
308-
group: ""
308+
group: "group"
309309
resource: "pods"
310310
namespace: "openshift-insights"
311311
expectedStatusError: 'status: Invalid value: "object": cannot remove insightsRequestID attribute from status'
@@ -318,7 +318,7 @@ tests:
318318
insightsRequestID: testing-xyz
319319
relatedObjects:
320320
- name: periodic-job-xyz
321-
group: ""
321+
group: "group"
322322
resource: "pods"
323323
namespace: "openshift-insights"
324324
updated: |
@@ -329,7 +329,7 @@ tests:
329329
insightsRequestID: testing-xyz-updated
330330
relatedObjects:
331331
- name: periodic-job-xyz
332-
group: ""
332+
group: "group"
333333
resource: "pods"
334334
namespace: "openshift-insights"
335335
expectedStatusError: 'Invalid value: "string": insightsRequestID is immutable once set'
@@ -342,7 +342,7 @@ tests:
342342
finishTime: 2023-03-13T11:34:06Z
343343
relatedObjects:
344344
- name: periodic-job-xyz
345-
group: ""
345+
group: "group"
346346
resource: "pods"
347347
namespace: "openshift-insights"
348348
updated: |
@@ -352,7 +352,7 @@ tests:
352352
status:
353353
relatedObjects:
354354
- name: periodic-job-xyz
355-
group: ""
355+
group: "group"
356356
resource: "pods"
357357
namespace: "openshift-insights"
358358
expectedStatusError: 'status: Invalid value: "object": cannot remove finishTime attribute from status'

0 commit comments

Comments
 (0)