Skip to content

Commit

Permalink
Update Machine API test files for FeatureGates
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelSpeed committed Mar 21, 2024
1 parent 52688e5 commit 8a8ed13
Show file tree
Hide file tree
Showing 14 changed files with 1,091 additions and 52 deletions.
488 changes: 488 additions & 0 deletions machine/v1/custom.controlplanemachineset.testsuite.yaml

Large diffs are not rendered by default.

@@ -1,6 +1,6 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "[Stable] ControlPlaneMachineSet (AWS)"
crd: 0000_10_control-plane-machine-set_01_controlplanemachinesets.crd.yaml
crd: 0000_10_control-plane-machine-set_01_controlplanemachinesets-Default.crd.yaml
tests:
onCreate:
- name: Should reject an AWS platform failure domain without any AWS config
Expand Down
@@ -1,6 +1,6 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "[Stable] ControlPlaneMachineSet"
crd: 0000_10_control-plane-machine-set_01_controlplanemachinesets.crd.yaml
crd: 0000_10_control-plane-machine-set_01_controlplanemachinesets-Default.crd.yaml
tests:
onCreate:
- name: Should reject an Azure platform failure domain without any Azure config
Expand Down
@@ -1,6 +1,6 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "[Stable] ControlPlaneMachineSet"
crd: 0000_10_control-plane-machine-set_01_controlplanemachinesets.crd.yaml
crd: 0000_10_control-plane-machine-set_01_controlplanemachinesets-Default.crd.yaml
tests:
onCreate:
- name: Should reject an GCP platform failure domain without any GCP config
Expand Down
@@ -1,6 +1,6 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "[Stable] ControlPlaneMachineSet"
crd: 0000_10_control-plane-machine-set_01_controlplanemachinesets.crd.yaml
crd: 0000_10_control-plane-machine-set_01_controlplanemachinesets-Default.crd.yaml
tests:
onCreate:
- name: Should reject an OpenStack platform failure domain without any OpenStack config
Expand Down
47 changes: 1 addition & 46 deletions machine/v1/stable.controlplanemachineset.testsuite.yaml
@@ -1,53 +1,8 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "[Stable] ControlPlaneMachineSet"
crd: 0000_10_control-plane-machine-set_01_controlplanemachinesets.crd.yaml
crd: 0000_10_control-plane-machine-set_01_controlplanemachinesets-Default.crd.yaml
tests:
onCreate:
- name: Should reject an VSphere platform failure domain without any VSphere config
initial: |
apiVersion: machine.openshift.io/v1
kind: ControlPlaneMachineSet
spec:
selector:
matchLabels:
machine.openshift.io/cluster-api-machine-role: master
machine.openshift.io/cluster-api-machine-type: master
template:
machineType: machines_v1beta1_machine_openshift_io
machines_v1beta1_machine_openshift_io:
metadata:
labels:
machine.openshift.io/cluster-api-machine-role: master
machine.openshift.io/cluster-api-machine-type: master
machine.openshift.io/cluster-api-cluster: cluster
spec:
providerSpec: {}
failureDomains:
platform: VSphere
expectedError: "spec.template.machines_v1beta1_machine_openshift_io.failureDomains: Invalid value: \"object\": vsphere configuration is required when platform is VSphere"
- name: Should reject an VSphere configured failure domain without a platform type
initial: |
apiVersion: machine.openshift.io/v1
kind: ControlPlaneMachineSet
spec:
selector:
matchLabels:
machine.openshift.io/cluster-api-machine-role: master
machine.openshift.io/cluster-api-machine-type: master
template:
machineType: machines_v1beta1_machine_openshift_io
machines_v1beta1_machine_openshift_io:
metadata:
labels:
machine.openshift.io/cluster-api-machine-role: master
machine.openshift.io/cluster-api-machine-type: master
machine.openshift.io/cluster-api-cluster: cluster
spec:
providerSpec: {}
failureDomains:
vsphere:
- name: foo
expectedError: "spec.template.machines_v1beta1_machine_openshift_io.failureDomains.platform: Required value"
- name: Should be able to create a minimal ControlPlaneMachineSet
initial: |
apiVersion: machine.openshift.io/v1
Expand Down
50 changes: 50 additions & 0 deletions machine/v1/stable.controlplanemachineset.vsphere.testsuite.yaml
@@ -0,0 +1,50 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "[Stable] ControlPlaneMachineSet"
crd: 0000_10_control-plane-machine-set_01_controlplanemachinesets-Default.crd.yaml
tests:
onCreate:
- name: Should reject an VSphere platform failure domain without any VSphere config
initial: |
apiVersion: machine.openshift.io/v1
kind: ControlPlaneMachineSet
spec:
selector:
matchLabels:
machine.openshift.io/cluster-api-machine-role: master
machine.openshift.io/cluster-api-machine-type: master
template:
machineType: machines_v1beta1_machine_openshift_io
machines_v1beta1_machine_openshift_io:
metadata:
labels:
machine.openshift.io/cluster-api-machine-role: master
machine.openshift.io/cluster-api-machine-type: master
machine.openshift.io/cluster-api-cluster: cluster
spec:
providerSpec: {}
failureDomains:
platform: VSphere
expectedError: "spec.template.machines_v1beta1_machine_openshift_io.failureDomains: Invalid value: \"object\": vsphere configuration is required when platform is VSphere"
- name: Should reject an VSphere configured failure domain without a platform type
initial: |
apiVersion: machine.openshift.io/v1
kind: ControlPlaneMachineSet
spec:
selector:
matchLabels:
machine.openshift.io/cluster-api-machine-role: master
machine.openshift.io/cluster-api-machine-type: master
template:
machineType: machines_v1beta1_machine_openshift_io
machines_v1beta1_machine_openshift_io:
metadata:
labels:
machine.openshift.io/cluster-api-machine-role: master
machine.openshift.io/cluster-api-machine-type: master
machine.openshift.io/cluster-api-cluster: cluster
spec:
providerSpec: {}
failureDomains:
vsphere:
- name: foo
expectedError: "spec.template.machines_v1beta1_machine_openshift_io.failureDomains.platform: Required value"

0 comments on commit 8a8ed13

Please sign in to comment.