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 91c98da
Show file tree
Hide file tree
Showing 14 changed files with 653 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,0 +1,50 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "[TechPreview] ControlPlaneMachineSet"
crd: 0000_10_control-plane-machine-set_01_controlplanemachinesets-TechPreviewNoUpgrade.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"
14 changes: 14 additions & 0 deletions machine/v1beta1/custom.machine.testsuite.yaml
@@ -0,0 +1,14 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "[Custom] Machine"
crd: 0000_10_machine-api_01_machines-CustomNoUpgrade.crd.yaml
tests:
onCreate:
- name: Should be able to create a minimal Machine
initial: |
apiVersion: machine.openshift.io/v1beta1
kind: Machine
spec: {} # No spec is required for a Machine
expected: |
apiVersion: machine.openshift.io/v1beta1
kind: Machine
spec: {}
15 changes: 15 additions & 0 deletions machine/v1beta1/custom.machineset.testsuite.yaml
@@ -0,0 +1,15 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "[Custom] MachineSet"
crd: 0000_10_machine-api_01_machinesets-CustomNoUpgrade.crd.yaml
tests:
onCreate:
- name: Should be able to create a minimal MachineSet
initial: |
apiVersion: machine.openshift.io/v1beta1
kind: MachineSet
spec: {} # No spec is required for a MachineSet
expected: |
apiVersion: machine.openshift.io/v1beta1
kind: MachineSet
spec:
replicas: 1
2 changes: 1 addition & 1 deletion machine/v1beta1/stable.machine.testsuite.yaml
@@ -1,6 +1,6 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "[Stable] Machine"
crd: 0000_10_machine-api_01_machines.crd.yaml
crd: 0000_10_machine-api_01_machines-Default.crd.yaml
tests:
onCreate:
- name: Should be able to create a minimal Machine
Expand Down
2 changes: 1 addition & 1 deletion machine/v1beta1/stable.machineset.testsuite.yaml
@@ -1,6 +1,6 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "[Stable] MachineSet"
crd: 0000_10_machine-api_01_machinesets.crd.yaml
crd: 0000_10_machine-api_01_machinesets-Default.crd.yaml
tests:
onCreate:
- name: Should be able to create a minimal MachineSet
Expand Down
14 changes: 14 additions & 0 deletions machine/v1beta1/techpreview.machine.testsuite.yaml
@@ -0,0 +1,14 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "[TechPreview] Machine"
crd: 0000_10_machine-api_01_machines-TechPreviewNoUpgrade.crd.yaml
tests:
onCreate:
- name: Should be able to create a minimal Machine
initial: |
apiVersion: machine.openshift.io/v1beta1
kind: Machine
spec: {} # No spec is required for a Machine
expected: |
apiVersion: machine.openshift.io/v1beta1
kind: Machine
spec: {}
15 changes: 15 additions & 0 deletions machine/v1beta1/techpreview.machineset.testsuite.yaml
@@ -0,0 +1,15 @@
apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
name: "[TechPreview] MachineSet"
crd: 0000_10_machine-api_01_machinesets-TechPreviewNoUpgrade.crd.yaml
tests:
onCreate:
- name: Should be able to create a minimal MachineSet
initial: |
apiVersion: machine.openshift.io/v1beta1
kind: MachineSet
spec: {} # No spec is required for a MachineSet
expected: |
apiVersion: machine.openshift.io/v1beta1
kind: MachineSet
spec:
replicas: 1

0 comments on commit 91c98da

Please sign in to comment.