From 84bb60936979cce30dda6b5814be58f9183df661 Mon Sep 17 00:00:00 2001 From: John Kyros <79665180+jkyros@users.noreply.github.com> Date: Fri, 5 May 2023 02:56:19 -0500 Subject: [PATCH] adjust tests to account for required fields --- ...able.containerruntimeconfig.testsuite.yaml | 2 +- .../v1/stable.controllerconfig.testsuite.yaml | 94 ++++++++++++++++++- .../v1/stable.kubeletconfig.testsuite.yaml | 2 +- .../v1/stable.machineconfig.testsuite.yaml | 13 +-- .../stable.machineconfigpool.testsuite.yaml | 15 +-- 5 files changed, 107 insertions(+), 19 deletions(-) diff --git a/machineconfiguration/v1/stable.containerruntimeconfig.testsuite.yaml b/machineconfiguration/v1/stable.containerruntimeconfig.testsuite.yaml index 34dd64181b8..c6d1fad68b1 100644 --- a/machineconfiguration/v1/stable.containerruntimeconfig.testsuite.yaml +++ b/machineconfiguration/v1/stable.containerruntimeconfig.testsuite.yaml @@ -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 diff --git a/machineconfiguration/v1/stable.controllerconfig.testsuite.yaml b/machineconfiguration/v1/stable.controllerconfig.testsuite.yaml index 77b6e8d5f92..8e949673cd1 100644 --- a/machineconfiguration/v1/stable.controllerconfig.testsuite.yaml +++ b/machineconfiguration/v1/stable.controllerconfig.testsuite.yaml @@ -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: {} - \ No newline at end of file + 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 + \ No newline at end of file diff --git a/machineconfiguration/v1/stable.kubeletconfig.testsuite.yaml b/machineconfiguration/v1/stable.kubeletconfig.testsuite.yaml index b94e1f7ecea..012ca85aec8 100644 --- a/machineconfiguration/v1/stable.kubeletconfig.testsuite.yaml +++ b/machineconfiguration/v1/stable.kubeletconfig.testsuite.yaml @@ -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 diff --git a/machineconfiguration/v1/stable.machineconfig.testsuite.yaml b/machineconfiguration/v1/stable.machineconfig.testsuite.yaml index b638e74946b..6270aa6ff10 100644 --- a/machineconfiguration/v1/stable.machineconfig.testsuite.yaml +++ b/machineconfiguration/v1/stable.machineconfig.testsuite.yaml @@ -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: {} + \ No newline at end of file diff --git a/machineconfiguration/v1/stable.machineconfigpool.testsuite.yaml b/machineconfiguration/v1/stable.machineconfigpool.testsuite.yaml index 0d6de43c5f6..6aa9a0a777c 100644 --- a/machineconfiguration/v1/stable.machineconfigpool.testsuite.yaml +++ b/machineconfiguration/v1/stable.machineconfigpool.testsuite.yaml @@ -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: {} + \ No newline at end of file