Skip to content

Commit 3fffa29

Browse files
author
Martin Jackson
committed
Update tests for new common
1 parent b7cfecc commit 3fffa29

13 files changed

Lines changed: 662 additions & 403 deletions

tests/common-acm-industrial-edge-hub.expected.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ spec:
234234
- name: global.clusterVersion
235235
value: '{{ printf "%d.%d" ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Major) ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Minor) }}'
236236
- name: global.clusterPlatform
237-
value:
237+
value: aws
238238
- name: clusterGroup.name
239239
value: factory
240240
- name: clusterGroup.isHubCluster

tests/common-acm-medical-diagnosis-hub.expected.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ spec:
225225
- name: global.clusterVersion
226226
value: '{{ printf "%d.%d" ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Major) ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Minor) }}'
227227
- name: global.clusterPlatform
228-
value:
228+
value: aws
229229
- name: clusterGroup.name
230230
value: region-one
231231
- name: clusterGroup.isHubCluster

tests/common-acm-normal.expected.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -628,7 +628,7 @@ spec:
628628
- name: global.clusterVersion
629629
value: '{{ printf "%d.%d" ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Major) ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Minor) }}'
630630
- name: global.clusterPlatform
631-
value:
631+
value: aws
632632
- name: clusterGroup.name
633633
value: acm-edge
634634
- name: clusterGroup.isHubCluster
@@ -722,7 +722,7 @@ spec:
722722
- name: global.clusterVersion
723723
value: '{{ printf "%d.%d" ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Major) ((semver (lookup "operator.openshift.io/v1" "OpenShiftControllerManager" "" "cluster").status.version).Minor) }}'
724724
- name: global.clusterPlatform
725-
value:
725+
value: aws
726726
- name: clusterGroup.name
727727
value: acm-provision-edge
728728
- name: clusterGroup.isHubCluster

tests/common-clustergroup-industrial-edge-factory.expected.yaml

Lines changed: 33 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ data:
115115
- manuela-factory-ml-workspace
116116
projects:
117117
- factory
118+
sharedValueFiles: []
118119
subscriptions:
119120
- channel: stable
120121
name: opendatahub-operator
@@ -138,6 +139,8 @@ data:
138139
cicd:
139140
namespace: devsecops-ci
140141
clusterDomain: region.example.com
142+
clusterPlatform: aws
143+
clusterVersion: "4.12"
141144
extraValueFiles: []
142145
git:
143146
account: PLAINTEXT
@@ -383,6 +386,8 @@ kind: Application
383386
metadata:
384387
name: stormshift
385388
namespace: mypattern-factory
389+
labels:
390+
validatedpatterns.io/pattern: mypattern
386391
finalizers:
387392
- resources-finalizer.argocd.argoproj.io/foreground
388393
spec:
@@ -408,6 +413,8 @@ kind: Application
408413
metadata:
409414
name: odh
410415
namespace: mypattern-factory
416+
labels:
417+
validatedpatterns.io/pattern: mypattern
411418
finalizers:
412419
- resources-finalizer.argocd.argoproj.io/foreground
413420
spec:
@@ -423,7 +430,11 @@ spec:
423430
ignoreMissingValueFiles: true
424431
valueFiles:
425432
- "/values-global.yaml"
426-
- "/values-factory.yaml"
433+
- "/values-factory.yaml"
434+
- "/values-aws.yaml"
435+
- "/values-aws-4.12.yaml"
436+
- "/values-aws-factory.yaml"
437+
- "/values-4.12-factory.yaml"
427438
parameters:
428439
- name: global.repoURL
429440
value: $ARGOCD_APP_SOURCE_REPO_URL
@@ -436,9 +447,9 @@ spec:
436447
- name: global.clusterDomain
437448
value: region.example.com
438449
- name: global.clusterVersion
439-
value: ""
450+
value: "4.12"
440451
- name: global.clusterPlatform
441-
value: ""
452+
value: "aws"
442453
- name: global.hubClusterDomain
443454
value: apps.hub.example.com
444455
- name: global.localClusterDomain
@@ -463,26 +474,27 @@ metadata:
463474
spec:
464475
# Adding health checks to argocd to prevent pvc resources
465476
# that aren't bound state from blocking deployments
466-
resourceCustomizations: |
467-
PersistentVolumeClaim:
468-
health.lua: |
469-
hs = {}
470-
if obj.status ~= nil then
471-
if obj.status.phase ~= nil then
472-
if obj.status.phase == "Pending" then
473-
hs.status = "Healthy"
474-
hs.message = obj.status.phase
475-
return hs
476-
elseif obj.status.phase == "Bound" then
477-
hs.status = "Healthy"
478-
hs.message = obj.status.phase
479-
return hs
480-
end
477+
resourceHealthChecks:
478+
- kind: PersistentVolumeClaim
479+
check: |
480+
hs = {}
481+
if obj.status ~= nil then
482+
if obj.status.phase ~= nil then
483+
if obj.status.phase == "Pending" then
484+
hs.status = "Healthy"
485+
hs.message = obj.status.phase
486+
return hs
487+
elseif obj.status.phase == "Bound" then
488+
hs.status = "Healthy"
489+
hs.message = obj.status.phase
490+
return hs
481491
end
482492
end
483-
hs.status = "Progressing"
484-
hs.message = "Waiting for PVC"
485-
return hs
493+
end
494+
hs.status = "Progressing"
495+
hs.message = "Waiting for PVC"
496+
return hs
497+
486498
applicationInstanceLabelKey: argocd.argoproj.io/instance
487499
# Not the greatest way to pass git/quay info to sub-applications, but it will do until
488500
# we can support helmChart with kustomize

0 commit comments

Comments
 (0)