Skip to content

Commit

Permalink
Update tests for new common
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Jackson committed Oct 16, 2023
1 parent b7cfecc commit 3fffa29
Show file tree
Hide file tree
Showing 13 changed files with 662 additions and 403 deletions.
2 changes: 1 addition & 1 deletion tests/common-acm-industrial-edge-hub.expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ spec:
- name: global.clusterVersion
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) }}'
- name: global.clusterPlatform
value:
value: aws
- name: clusterGroup.name
value: factory
- name: clusterGroup.isHubCluster
Expand Down
2 changes: 1 addition & 1 deletion tests/common-acm-medical-diagnosis-hub.expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ spec:
- name: global.clusterVersion
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) }}'
- name: global.clusterPlatform
value:
value: aws
- name: clusterGroup.name
value: region-one
- name: clusterGroup.isHubCluster
Expand Down
4 changes: 2 additions & 2 deletions tests/common-acm-normal.expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ spec:
- name: global.clusterVersion
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) }}'
- name: global.clusterPlatform
value:
value: aws
- name: clusterGroup.name
value: acm-edge
- name: clusterGroup.isHubCluster
Expand Down Expand Up @@ -722,7 +722,7 @@ spec:
- name: global.clusterVersion
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) }}'
- name: global.clusterPlatform
value:
value: aws
- name: clusterGroup.name
value: acm-provision-edge
- name: clusterGroup.isHubCluster
Expand Down
54 changes: 33 additions & 21 deletions tests/common-clustergroup-industrial-edge-factory.expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ data:
- manuela-factory-ml-workspace
projects:
- factory
sharedValueFiles: []
subscriptions:
- channel: stable
name: opendatahub-operator
Expand All @@ -138,6 +139,8 @@ data:
cicd:
namespace: devsecops-ci
clusterDomain: region.example.com
clusterPlatform: aws
clusterVersion: "4.12"
extraValueFiles: []
git:
account: PLAINTEXT
Expand Down Expand Up @@ -383,6 +386,8 @@ kind: Application
metadata:
name: stormshift
namespace: mypattern-factory
labels:
validatedpatterns.io/pattern: mypattern
finalizers:
- resources-finalizer.argocd.argoproj.io/foreground
spec:
Expand All @@ -408,6 +413,8 @@ kind: Application
metadata:
name: odh
namespace: mypattern-factory
labels:
validatedpatterns.io/pattern: mypattern
finalizers:
- resources-finalizer.argocd.argoproj.io/foreground
spec:
Expand All @@ -423,7 +430,11 @@ spec:
ignoreMissingValueFiles: true
valueFiles:
- "/values-global.yaml"
- "/values-factory.yaml"
- "/values-factory.yaml"
- "/values-aws.yaml"
- "/values-aws-4.12.yaml"
- "/values-aws-factory.yaml"
- "/values-4.12-factory.yaml"
parameters:
- name: global.repoURL
value: $ARGOCD_APP_SOURCE_REPO_URL
Expand All @@ -436,9 +447,9 @@ spec:
- name: global.clusterDomain
value: region.example.com
- name: global.clusterVersion
value: ""
value: "4.12"
- name: global.clusterPlatform
value: ""
value: "aws"
- name: global.hubClusterDomain
value: apps.hub.example.com
- name: global.localClusterDomain
Expand All @@ -463,26 +474,27 @@ metadata:
spec:
# Adding health checks to argocd to prevent pvc resources
# that aren't bound state from blocking deployments
resourceCustomizations: |
PersistentVolumeClaim:
health.lua: |
hs = {}
if obj.status ~= nil then
if obj.status.phase ~= nil then
if obj.status.phase == "Pending" then
hs.status = "Healthy"
hs.message = obj.status.phase
return hs
elseif obj.status.phase == "Bound" then
hs.status = "Healthy"
hs.message = obj.status.phase
return hs
end
resourceHealthChecks:
- kind: PersistentVolumeClaim
check: |
hs = {}
if obj.status ~= nil then
if obj.status.phase ~= nil then
if obj.status.phase == "Pending" then
hs.status = "Healthy"
hs.message = obj.status.phase
return hs
elseif obj.status.phase == "Bound" then
hs.status = "Healthy"
hs.message = obj.status.phase
return hs
end
end
hs.status = "Progressing"
hs.message = "Waiting for PVC"
return hs
end
hs.status = "Progressing"
hs.message = "Waiting for PVC"
return hs
applicationInstanceLabelKey: argocd.argoproj.io/instance
# Not the greatest way to pass git/quay info to sub-applications, but it will do until
# we can support helmChart with kustomize
Expand Down
Loading

0 comments on commit 3fffa29

Please sign in to comment.