Skip to content

Commit

Permalink
adjust tests to account for required fields
Browse files Browse the repository at this point in the history
  • Loading branch information
jkyros committed Jun 15, 2023
1 parent de23517 commit 84bb609
Show file tree
Hide file tree
Showing 5 changed files with 107 additions and 19 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "[Stable] ContainerRuntimeConfig"
crd: 0000_10_containerruntimeconfig.crd.yaml
crd: 0000_80_containerruntimeconfig.crd.yaml
tests:
onCreate:
- name: Should be able to create a minimal ContainerRuntimeConfig
Expand Down
94 changes: 90 additions & 4 deletions machineconfiguration/v1/stable.controllerconfig.testsuite.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,101 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "[Stable] ControllerConfig"
crd: 0000_10_controllerconfig.crd.yaml
crd: 0000_80_controllerconfig.crd.yaml
tests:
onCreate:
- name: Should be able to create a minimal ControllerConfig
initial: |
apiVersion: machineconfiguration.openshift.io/v1
kind: ControllerConfig
spec: {} # No spec is required for a ControllerConfig
spec:
additionalTrustBundle: Y2VydGlmaWNhdGUK
baseOSContainerImage: example.com/example/openshift-release-dev@sha256:d98795f7932441b30bb8bcfbbf05912875383fad1f2b3be08a22ec148d68607e
baseOSExtensionsContainerImage: example.com/example/openshift-release-dev@sha256:d98795f7932441b30bb8bcfbbf05912875383fad1f2b3be08a22ec148d68607e
cloudProviderCAData: null
cloudProviderConfig: ""
clusterDNSIP: fd02::a
dns:
apiVersion: config.openshift.io/v1
kind: DNS
spec:
baseDomain: fake.redhat.com
images:
machineConfigOperator: rexample.com/example/openshift-release-dev@sha256:2c3ea52ac3a41c6d58e85977c3149413e3fa4b70eb2397426456863adbf43306
infra:
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
cloudConfig:
name: ""
platformSpec:
type: None
status:
apiServerInternalURI: https://api-int.cnfde4.sno.ptp.lab.eng.bos.redhat.com:6443
apiServerURL: https://api.cnfde4.sno.ptp.lab.eng.bos.redhat.com:6443
controlPlaneTopology: SingleReplica
etcdDiscoveryDomain: ""
infrastructureName: cnfde4-sxhr7
infrastructureTopology: SingleReplica
platform: None
platformStatus:
type: None
ipFamilies: IPv6
kubeAPIServerServingCAData: Y2VydGlmaWNhdGUK
network: null
networkType: OVNKubernetes
osImageURL: example.com/example/openshift-release-dev@sha256:eacdc37aec78fdbf8caa9601e4012ab31453cf59b086474901900e853e803ea8
platform: none
proxy: null
pullSecret:
name: pull-secret
namespace: openshift-config
releaseImage: ""
rootCAData: Y2VydGlmaWNhdGUK
expected: |
apiVersion: machineconfiguration.openshift.io/v1
kind: ControllerConfig
spec: {}
spec:
additionalTrustBundle: Y2VydGlmaWNhdGUK
baseOSContainerImage: example.com/example/openshift-release-dev@sha256:d98795f7932441b30bb8bcfbbf05912875383fad1f2b3be08a22ec148d68607e
baseOSExtensionsContainerImage: example.com/example/openshift-release-dev@sha256:d98795f7932441b30bb8bcfbbf05912875383fad1f2b3be08a22ec148d68607e
cloudProviderCAData: null
cloudProviderConfig: ""
clusterDNSIP: fd02::a
dns:
apiVersion: config.openshift.io/v1
kind: DNS
spec:
baseDomain: fake.redhat.com
images:
machineConfigOperator: rexample.com/example/openshift-release-dev@sha256:2c3ea52ac3a41c6d58e85977c3149413e3fa4b70eb2397426456863adbf43306
infra:
apiVersion: config.openshift.io/v1
kind: Infrastructure
spec:
cloudConfig:
name: ""
platformSpec:
type: None
status:
apiServerInternalURI: https://api-int.cnfde4.sno.ptp.lab.eng.bos.redhat.com:6443
apiServerURL: https://api.cnfde4.sno.ptp.lab.eng.bos.redhat.com:6443
controlPlaneTopology: SingleReplica
etcdDiscoveryDomain: ""
infrastructureName: cnfde4-sxhr7
infrastructureTopology: SingleReplica
platform: None
platformStatus:
type: None
ipFamilies: IPv6
kubeAPIServerServingCAData: Y2VydGlmaWNhdGUK
network: null
networkType: OVNKubernetes
osImageURL: example.com/example/openshift-release-dev@sha256:eacdc37aec78fdbf8caa9601e4012ab31453cf59b086474901900e853e803ea8
platform: none
proxy: null
pullSecret:
name: pull-secret
namespace: openshift-config
releaseImage: ""
rootCAData: Y2VydGlmaWNhdGUK
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "[Stable] KubeletConfig"
crd: 0000_10_kubeletconfig.crd.yaml
crd: 0000_80_kubeletconfig.crd.yaml
tests:
onCreate:
- name: Should be able to create a minimal KubeletConfig
Expand Down
13 changes: 7 additions & 6 deletions machineconfiguration/v1/stable.machineconfig.testsuite.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "[Stable] MachineConfigPool"
crd: 0000_10_machineconfigpool.crd.yaml
name: "[Stable] MachineConfig"
crd: 0000_80_machineconfig.crd.yaml
tests:
onCreate:
- name: Should be able to create a minimal MachineConfigPool
- name: Should be able to create a minimal MachineConfig
initial: |
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfigPool
spec: {} # No spec is required for a MachineConfigPool
kind: MachineConfig
spec: {} # No spec is required for a MachineConfig
expected: |
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfigPool
kind: MachineConfig
spec: {}
15 changes: 8 additions & 7 deletions machineconfiguration/v1/stable.machineconfigpool.testsuite.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "[Stable] ControllerConfig"
crd: 0000_10_controllerconfig.crd.yaml
name: "[Stable] MachineConfigPool"
crd: 0000_80_machineconfigpool.crd.yaml
tests:
onCreate:
- name: Should be able to create a minimal ControllerConfig
- name: Should be able to create a minimal MachineConfigPool
initial: |
apiVersion: machineconfiguration.openshift.io/v1
kind: ControllerConfig
spec: {} # No spec is required for a ControllerConfig
kind: MachineConfigPool
spec: {} # No spec is required for a MachineConfigPool
expected: |
apiVersion: apiserver.openshift.io/v1
kind: ControllerConfig
apiVersion: machineconfiguration.openshift.io/v1
kind: MachineConfigPool
spec: {}

0 comments on commit 84bb609

Please sign in to comment.