From fa0436cfca190a5912e290322dd0a9720d7c33d2 Mon Sep 17 00:00:00 2001 From: chiragkyal Date: Wed, 15 Jan 2025 14:08:34 +0530 Subject: [PATCH] update tests Signed-off-by: chiragkyal --- .../CPMSMachineNamePrefix.yaml | 23 ++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/machine/v1/tests/controlplanemachinesets.machine.openshift.io/CPMSMachineNamePrefix.yaml b/machine/v1/tests/controlplanemachinesets.machine.openshift.io/CPMSMachineNamePrefix.yaml index aff24bd6b93..9a70847e52a 100644 --- a/machine/v1/tests/controlplanemachinesets.machine.openshift.io/CPMSMachineNamePrefix.yaml +++ b/machine/v1/tests/controlplanemachinesets.machine.openshift.io/CPMSMachineNamePrefix.yaml @@ -131,4 +131,25 @@ tests: machine.openshift.io/cluster-api-cluster: cluster spec: providerSpec: {} - expectedError: 'Invalid value: "string": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, ''-'' or ''.'', and must start and end with an alphanumeric character.' + expectedError: 'Invalid value: "string": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, ''-'' or ''.'', and must start and end with an alphanumeric character. Consecutive ''.'' are not permitted.' + - name: Should reject to create ControlPlaneMachineSet with invalid machineNamePrefix - Consecutive dots are not permitted + initial: | + apiVersion: machine.openshift.io/v1 + kind: ControlPlaneMachineSet + spec: + machineNamePrefix: "control..plane" + 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: {} + expectedError: 'Invalid value: "string": a lowercase RFC 1123 subdomain must consist of lower case alphanumeric characters, ''-'' or ''.'', and must start and end with an alphanumeric character. Consecutive ''.'' are not permitted.'