Skip to content

Commit

Permalink
Update tests after common rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
mbaldessari committed May 2, 2024
1 parent 05d660c commit 216683f
Show file tree
Hide file tree
Showing 25 changed files with 21,290 additions and 4,959 deletions.
12 changes: 11 additions & 1 deletion tests/common-acm-industrial-edge-factory.expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ metadata:
namespace: open-cluster-management
annotations:
argocd.argoproj.io/sync-wave: "-1"
installer.open-cluster-management.io/mce-subscription-spec: '{"source": "redhat-operators" }'
spec: {}
---
# Source: acm/templates/policies/ocp-gitops-policy.yaml
Expand Down Expand Up @@ -89,6 +90,15 @@ spec:
include:
- default
object-templates:
- complianceType: mustonlyhave
objectDefinition:
kind: ConfigMap
apiVersion: v1
metadata:
name: trusted-ca-bundle
namespace: openshift-gitops
labels:
config.openshift.io/inject-trusted-cabundle: 'true'
- complianceType: mustonlyhave
objectDefinition:
# This is an auto-generated file. DO NOT EDIT
Expand All @@ -100,7 +110,7 @@ spec:
labels:
operators.coreos.com/openshift-gitops-operator.openshift-operators: ''
spec:
channel: gitops-1.8
channel: gitops-1.12
installPlanApproval: Automatic
name: openshift-gitops-operator
source: redhat-operators
Expand Down
37 changes: 23 additions & 14 deletions tests/common-acm-industrial-edge-hub.expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -215,19 +215,19 @@ spec:
helm:
ignoreMissingValueFiles: true
valueFiles:
- "/values-global.yaml"
- "/values-factory.yaml"
- '/values-{{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").spec.platformSpec.type }}.yaml'
- '/values-{{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").spec.platformSpec.type }}-{{ 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) }}.yaml'
- '/values-{{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").spec.platformSpec.type }}-factory.yaml'
# We cannot use $.Values.global.clusterVersion because that gets resolved to the
# hub's cluster version, whereas we want to include the spoke cluster version
- '/values-{{ 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) }}-factory.yaml'
- "/values-global.yaml"
- "/values-factory.yaml"
- '/values-{{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").spec.platformSpec.type }}.yaml'
- '/values-{{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").spec.platformSpec.type }}-{{ printf "%d.%d" ((semver (index (lookup "config.openshift.io/v1" "ClusterVersion" "" "version").status.history 0).version).Major) ((semver (index (lookup "config.openshift.io/v1" "ClusterVersion" "" "version").status.history 0).version).Minor) }}.yaml'
- '/values-{{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").spec.platformSpec.type }}-factory.yaml'
# We cannot use $.Values.global.clusterVersion because that gets resolved to the
# hub's cluster version, whereas we want to include the spoke cluster version
- '/values-{{ printf "%d.%d" ((semver (index (lookup "config.openshift.io/v1" "ClusterVersion" "" "version").status.history 0).version).Major) ((semver (index (lookup "config.openshift.io/v1" "ClusterVersion" "" "version").status.history 0).version).Minor) }}.yaml'
parameters:
- name: global.repoURL
value: $ARGOCD_APP_SOURCE_REPO_URL
value: https://github.com/pattern-clone/mypattern
- name: global.targetRevision
value: $ARGOCD_APP_SOURCE_TARGET_REVISION
value: main
- name: global.namespace
value: $ARGOCD_APP_NAMESPACE
- name: global.pattern
Expand All @@ -236,18 +236,18 @@ spec:
value: apps.hub.example.com
- name: global.localClusterDomain
value: '{{ (lookup "config.openshift.io/v1" "Ingress" "" "cluster").spec.domain }}'
# Requires ACM 2.6 or higher
- name: global.clusterDomain
value: '{{ (lookup "config.openshift.io/v1" "Ingress" "" "cluster").spec.domain | replace "apps." "" }}'
# Requires ACM 2.6 or higher (I could not come up with something less terrible to get maj.min)
- 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) }}'
value: '{{ printf "%d.%d" ((semver (index (lookup "config.openshift.io/v1" "ClusterVersion" "" "version").status.history 0).version).Major) ((semver (index (lookup "config.openshift.io/v1" "ClusterVersion" "" "version").status.history 0).version).Minor) }}'
- name: global.localClusterName
value: '{{ (split "." (lookup "config.openshift.io/v1" "Ingress" "" "cluster").spec.domain)._1 }}'
- name: global.clusterPlatform
value: aws
- name: clusterGroup.name
value: factory
- name: global.experimentalCapabilities
value:
- name: clusterGroup.isHubCluster
value: "false"
destination:
Expand Down Expand Up @@ -296,6 +296,15 @@ spec:
include:
- default
object-templates:
- complianceType: mustonlyhave
objectDefinition:
kind: ConfigMap
apiVersion: v1
metadata:
name: trusted-ca-bundle
namespace: openshift-gitops
labels:
config.openshift.io/inject-trusted-cabundle: 'true'
- complianceType: mustonlyhave
objectDefinition:
# This is an auto-generated file. DO NOT EDIT
Expand All @@ -307,7 +316,7 @@ spec:
labels:
operators.coreos.com/openshift-gitops-operator.openshift-operators: ''
spec:
channel: gitops-1.8
channel: gitops-1.12
installPlanApproval: Automatic
name: openshift-gitops-operator
source: redhat-operators
Expand Down
37 changes: 23 additions & 14 deletions tests/common-acm-medical-diagnosis-hub.expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -206,19 +206,19 @@ spec:
helm:
ignoreMissingValueFiles: true
valueFiles:
- "/values-global.yaml"
- "/values-region-one.yaml"
- '/values-{{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").spec.platformSpec.type }}.yaml'
- '/values-{{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").spec.platformSpec.type }}-{{ 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) }}.yaml'
- '/values-{{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").spec.platformSpec.type }}-region-one.yaml'
# We cannot use $.Values.global.clusterVersion because that gets resolved to the
# hub's cluster version, whereas we want to include the spoke cluster version
- '/values-{{ 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) }}-region-one.yaml'
- "/values-global.yaml"
- "/values-region-one.yaml"
- '/values-{{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").spec.platformSpec.type }}.yaml'
- '/values-{{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").spec.platformSpec.type }}-{{ printf "%d.%d" ((semver (index (lookup "config.openshift.io/v1" "ClusterVersion" "" "version").status.history 0).version).Major) ((semver (index (lookup "config.openshift.io/v1" "ClusterVersion" "" "version").status.history 0).version).Minor) }}.yaml'
- '/values-{{ (lookup "config.openshift.io/v1" "Infrastructure" "" "cluster").spec.platformSpec.type }}-region-one.yaml'
# We cannot use $.Values.global.clusterVersion because that gets resolved to the
# hub's cluster version, whereas we want to include the spoke cluster version
- '/values-{{ printf "%d.%d" ((semver (index (lookup "config.openshift.io/v1" "ClusterVersion" "" "version").status.history 0).version).Major) ((semver (index (lookup "config.openshift.io/v1" "ClusterVersion" "" "version").status.history 0).version).Minor) }}.yaml'
parameters:
- name: global.repoURL
value: $ARGOCD_APP_SOURCE_REPO_URL
value: https://github.com/pattern-clone/mypattern
- name: global.targetRevision
value: $ARGOCD_APP_SOURCE_TARGET_REVISION
value: main
- name: global.namespace
value: $ARGOCD_APP_NAMESPACE
- name: global.pattern
Expand All @@ -227,18 +227,18 @@ spec:
value: apps.hub.example.com
- name: global.localClusterDomain
value: '{{ (lookup "config.openshift.io/v1" "Ingress" "" "cluster").spec.domain }}'
# Requires ACM 2.6 or higher
- name: global.clusterDomain
value: '{{ (lookup "config.openshift.io/v1" "Ingress" "" "cluster").spec.domain | replace "apps." "" }}'
# Requires ACM 2.6 or higher (I could not come up with something less terrible to get maj.min)
- 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) }}'
value: '{{ printf "%d.%d" ((semver (index (lookup "config.openshift.io/v1" "ClusterVersion" "" "version").status.history 0).version).Major) ((semver (index (lookup "config.openshift.io/v1" "ClusterVersion" "" "version").status.history 0).version).Minor) }}'
- name: global.localClusterName
value: '{{ (split "." (lookup "config.openshift.io/v1" "Ingress" "" "cluster").spec.domain)._1 }}'
- name: global.clusterPlatform
value: aws
- name: clusterGroup.name
value: region-one
- name: global.experimentalCapabilities
value:
- name: clusterGroup.isHubCluster
value: "false"
destination:
Expand Down Expand Up @@ -287,6 +287,15 @@ spec:
include:
- default
object-templates:
- complianceType: mustonlyhave
objectDefinition:
kind: ConfigMap
apiVersion: v1
metadata:
name: trusted-ca-bundle
namespace: openshift-gitops
labels:
config.openshift.io/inject-trusted-cabundle: 'true'
- complianceType: mustonlyhave
objectDefinition:
# This is an auto-generated file. DO NOT EDIT
Expand All @@ -298,7 +307,7 @@ spec:
labels:
operators.coreos.com/openshift-gitops-operator.openshift-operators: ''
spec:
channel: gitops-1.8
channel: gitops-1.12
installPlanApproval: Automatic
name: openshift-gitops-operator
source: redhat-operators
Expand Down
11 changes: 10 additions & 1 deletion tests/common-acm-naked.expected.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,15 @@ spec:
include:
- default
object-templates:
- complianceType: mustonlyhave
objectDefinition:
kind: ConfigMap
apiVersion: v1
metadata:
name: trusted-ca-bundle
namespace: openshift-gitops
labels:
config.openshift.io/inject-trusted-cabundle: 'true'
- complianceType: mustonlyhave
objectDefinition:
# This is an auto-generated file. DO NOT EDIT
Expand All @@ -101,7 +110,7 @@ spec:
labels:
operators.coreos.com/openshift-gitops-operator.openshift-operators: ''
spec:
channel: gitops-1.8
channel: gitops-1.12
installPlanApproval: Automatic
name: openshift-gitops-operator
source: redhat-operators
Expand Down
Loading

0 comments on commit 216683f

Please sign in to comment.