...

Text file src/github.com/openshift/api/machine/v1/stable.controlplanemachineset.azure.testsuite.yaml

Documentation: github.com/openshift/api/machine/v1

     1apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
     2name: "[Stable] ControlPlaneMachineSet"
     3crd: 0000_10_controlplanemachineset.crd.yaml
     4tests:
     5  onCreate:
     6  - name: Should reject an Azure platform failure domain without any Azure config
     7    initial: |
     8      apiVersion: machine.openshift.io/v1
     9      kind: ControlPlaneMachineSet
    10      spec:
    11        selector:
    12          matchLabels:
    13            machine.openshift.io/cluster-api-machine-role: master
    14            machine.openshift.io/cluster-api-machine-type: master
    15        template:
    16          machineType: machines_v1beta1_machine_openshift_io
    17          machines_v1beta1_machine_openshift_io:
    18            metadata:
    19              labels:
    20                machine.openshift.io/cluster-api-machine-role: master
    21                machine.openshift.io/cluster-api-machine-type: master
    22                machine.openshift.io/cluster-api-cluster: cluster
    23            spec:
    24              providerSpec: {}
    25            failureDomains:
    26              platform: Azure
    27    expectedError: "spec.template.machines_v1beta1_machine_openshift_io.failureDomains: Invalid value: \"object\": azure configuration is required when platform is Azure"
    28  - name: Should reject an Azure configured failure domain without a platform type
    29    initial: |
    30      apiVersion: machine.openshift.io/v1
    31      kind: ControlPlaneMachineSet
    32      spec:
    33        selector:
    34          matchLabels:
    35            machine.openshift.io/cluster-api-machine-role: master
    36            machine.openshift.io/cluster-api-machine-type: master
    37        template:
    38          machineType: machines_v1beta1_machine_openshift_io
    39          machines_v1beta1_machine_openshift_io:
    40            metadata:
    41              labels:
    42                machine.openshift.io/cluster-api-machine-role: master
    43                machine.openshift.io/cluster-api-machine-type: master
    44                machine.openshift.io/cluster-api-cluster: cluster
    45            spec:
    46              providerSpec: {}
    47            failureDomains:
    48              azure:
    49              - zone: foo
    50    expectedError: "spec.template.machines_v1beta1_machine_openshift_io.failureDomains.platform: Required value"
    51  - name: Should reject an Azure configured failure domain with the wrong platform type
    52    initial: |
    53      apiVersion: machine.openshift.io/v1
    54      kind: ControlPlaneMachineSet
    55      spec:
    56        selector:
    57          matchLabels:
    58            machine.openshift.io/cluster-api-machine-role: master
    59            machine.openshift.io/cluster-api-machine-type: master
    60        template:
    61          machineType: machines_v1beta1_machine_openshift_io
    62          machines_v1beta1_machine_openshift_io:
    63            metadata:
    64              labels:
    65                machine.openshift.io/cluster-api-machine-role: master
    66                machine.openshift.io/cluster-api-machine-type: master
    67                machine.openshift.io/cluster-api-cluster: cluster
    68            spec:
    69              providerSpec: {}
    70            failureDomains:
    71              platform: BareMetal
    72              azure:
    73              - zone: foo
    74    expectedError: "spec.template.machines_v1beta1_machine_openshift_io.failureDomains: Invalid value: \"object\": azure configuration is required when platform is Azure, and forbidden otherwise"

View as plain text