|
| 1 | +apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this |
| 2 | +name: "[TechPreview] OSStreams" |
| 3 | +crdName: machineconfigpools.machineconfiguration.openshift.io |
| 4 | +featureGates: |
| 5 | +- OSStreams |
| 6 | +tests: |
| 7 | + onCreate: |
| 8 | + - name: Should be able to create a minimal MachineConfigPool |
| 9 | + initial: | |
| 10 | + apiVersion: machineconfiguration.openshift.io/v1 |
| 11 | + kind: MachineConfigPool |
| 12 | + spec: {} # No spec is required for a MachineConfigPool |
| 13 | + expected: | |
| 14 | + apiVersion: machineconfiguration.openshift.io/v1 |
| 15 | + kind: MachineConfigPool |
| 16 | + spec: {} |
| 17 | + - name: Should be able to select a non-default osImageStream |
| 18 | + initial: | |
| 19 | + apiVersion: machineconfiguration.openshift.io/v1 |
| 20 | + kind: MachineConfigPool |
| 21 | + spec: |
| 22 | + osImageStream: |
| 23 | + name: "rhel10-coreos" |
| 24 | + expected: | |
| 25 | + apiVersion: machineconfiguration.openshift.io/v1 |
| 26 | + kind: MachineConfigPool |
| 27 | + spec: |
| 28 | + osImageStream: |
| 29 | + name: "rhel10-coreos" |
| 30 | + - name: If given, the osImageStream.name must not be empty |
| 31 | + initial: | |
| 32 | + apiVersion: machineconfiguration.openshift.io/v1 |
| 33 | + kind: MachineConfigPool |
| 34 | + spec: |
| 35 | + osImageStream: |
| 36 | + name: "" |
| 37 | + expectedError: "spec.osImageStream.name in body should be at least 1 chars long" |
| 38 | + - name: If given, the osImageStream.name should be composed only by lowercase alphanumeric chars, hyphens and dots |
| 39 | + initial: | |
| 40 | + apiVersion: machineconfiguration.openshift.io/v1 |
| 41 | + kind: MachineConfigPool |
| 42 | + spec: |
| 43 | + osImageStream: |
| 44 | + name: "rhel10#1-coreos" |
| 45 | + expectedError: "spec.osImageStream.name: 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." |
| 46 | + - name: If given, the osImageStream.name must be lowercase |
| 47 | + initial: | |
| 48 | + apiVersion: machineconfiguration.openshift.io/v1 |
| 49 | + kind: MachineConfigPool |
| 50 | + spec: |
| 51 | + osImageStream: |
| 52 | + name: "RHEL10-COREOS" |
| 53 | + expectedError: "spec.osImageStream.name: 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." |
| 54 | + - name: If given, the osImageStream.name should not exceed 253 characters |
| 55 | + initial: | |
| 56 | + apiVersion: machineconfiguration.openshift.io/v1 |
| 57 | + kind: MachineConfigPool |
| 58 | + spec: |
| 59 | + osImageStream: |
| 60 | + name: "rhel-coreos32131e2ddf34f44r3r3r4f43tg54frg54tg45454g4g45gt34f43g54g45g3rhel-coreos32131e2ddf34f44r3r3r4f43tg54frg54tg45454g4g45gt34f43g54g45g3rhel-coreos32131e2ddf34f44r3r3r4f43tg54frg54tg45454g4g45gt34f43g54g45g3rhel-coreos32131e2ddf34f44r3r3r4f43tg54frg54tg" |
| 61 | + expectedError: "Too long: may not be more than 253 bytes" |
| 62 | + onUpdate: |
| 63 | + - name: If given, the osImageStream can be removed |
| 64 | + initial: | |
| 65 | + apiVersion: machineconfiguration.openshift.io/v1 |
| 66 | + kind: MachineConfigPool |
| 67 | + spec: |
| 68 | + osImageStream: |
| 69 | + name: "rhel10-coreos" |
| 70 | + updated: | |
| 71 | + apiVersion: machineconfiguration.openshift.io/v1 |
| 72 | + kind: MachineConfigPool |
| 73 | + spec: {} |
| 74 | + expected: | |
| 75 | + apiVersion: machineconfiguration.openshift.io/v1 |
| 76 | + kind: MachineConfigPool |
| 77 | + spec: {} |
| 78 | + - name: If not present, the osImageStream can be added to the pool |
| 79 | + initial: | |
| 80 | + apiVersion: machineconfiguration.openshift.io/v1 |
| 81 | + kind: MachineConfigPool |
| 82 | + spec: {} |
| 83 | + updated: | |
| 84 | + apiVersion: machineconfiguration.openshift.io/v1 |
| 85 | + kind: MachineConfigPool |
| 86 | + spec: |
| 87 | + osImageStream: |
| 88 | + name: "rhel10-coreos" |
| 89 | + expected: | |
| 90 | + apiVersion: machineconfiguration.openshift.io/v1 |
| 91 | + kind: MachineConfigPool |
| 92 | + spec: |
| 93 | + osImageStream: |
| 94 | + name: "rhel10-coreos" |
| 95 | + - name: Status osImageStream can be set |
| 96 | + initial: | |
| 97 | + apiVersion: machineconfiguration.openshift.io/v1 |
| 98 | + kind: MachineConfigPool |
| 99 | + spec: {} |
| 100 | + status: {} |
| 101 | + updated: | |
| 102 | + apiVersion: machineconfiguration.openshift.io/v1 |
| 103 | + kind: MachineConfigPool |
| 104 | + spec: {} |
| 105 | + status: |
| 106 | + osImageStream: |
| 107 | + name: "rhel10-coreos" |
| 108 | + expected: | |
| 109 | + apiVersion: machineconfiguration.openshift.io/v1 |
| 110 | + kind: MachineConfigPool |
| 111 | + spec: {} |
| 112 | + status: |
| 113 | + osImageStream: |
| 114 | + name: "rhel10-coreos" |
| 115 | + - name: Status osImageStream can be updated |
| 116 | + initial: | |
| 117 | + apiVersion: machineconfiguration.openshift.io/v1 |
| 118 | + kind: MachineConfigPool |
| 119 | + spec: {} |
| 120 | + status: |
| 121 | + osImageStream: |
| 122 | + name: "rhel9-coreos" |
| 123 | + updated: | |
| 124 | + apiVersion: machineconfiguration.openshift.io/v1 |
| 125 | + kind: MachineConfigPool |
| 126 | + spec: {} |
| 127 | + status: |
| 128 | + osImageStream: |
| 129 | + name: "rhel10-coreos" |
| 130 | + expected: | |
| 131 | + apiVersion: machineconfiguration.openshift.io/v1 |
| 132 | + kind: MachineConfigPool |
| 133 | + spec: {} |
| 134 | + status: |
| 135 | + osImageStream: |
| 136 | + name: "rhel10-coreos" |
| 137 | + - name: Status osImageStream can be removed |
| 138 | + initial: | |
| 139 | + apiVersion: machineconfiguration.openshift.io/v1 |
| 140 | + kind: MachineConfigPool |
| 141 | + spec: {} |
| 142 | + status: |
| 143 | + osImageStream: |
| 144 | + name: "rhel10-coreos" |
| 145 | + updated: | |
| 146 | + apiVersion: machineconfiguration.openshift.io/v1 |
| 147 | + kind: MachineConfigPool |
| 148 | + spec: {} |
| 149 | + status: {} |
| 150 | + expected: | |
| 151 | + apiVersion: machineconfiguration.openshift.io/v1 |
| 152 | + kind: MachineConfigPool |
| 153 | + spec: {} |
| 154 | + status: {} |
| 155 | + - name: Status osImageStream.name must not be empty |
| 156 | + initial: | |
| 157 | + apiVersion: machineconfiguration.openshift.io/v1 |
| 158 | + kind: MachineConfigPool |
| 159 | + spec: {} |
| 160 | + status: {} |
| 161 | + updated: | |
| 162 | + apiVersion: machineconfiguration.openshift.io/v1 |
| 163 | + kind: MachineConfigPool |
| 164 | + spec: {} |
| 165 | + status: |
| 166 | + osImageStream: |
| 167 | + name: "" |
| 168 | + expectedStatusError: "status.osImageStream.name: Invalid value: \"\": osImageStream.name in body should be at least 1 chars long" |
| 169 | + - name: Status osImageStream.name should be composed only by lowercase alphanumeric chars, hyphens and dots |
| 170 | + initial: | |
| 171 | + apiVersion: machineconfiguration.openshift.io/v1 |
| 172 | + kind: MachineConfigPool |
| 173 | + spec: {} |
| 174 | + status: {} |
| 175 | + updated: | |
| 176 | + apiVersion: machineconfiguration.openshift.io/v1 |
| 177 | + kind: MachineConfigPool |
| 178 | + spec: {} |
| 179 | + status: |
| 180 | + osImageStream: |
| 181 | + name: "rhel10#1-coreos" |
| 182 | + expectedStatusError: "status.osImageStream.name: 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." |
| 183 | + - name: Status osImageStream.name must be lowercase |
| 184 | + initial: | |
| 185 | + apiVersion: machineconfiguration.openshift.io/v1 |
| 186 | + kind: MachineConfigPool |
| 187 | + spec: {} |
| 188 | + status: {} |
| 189 | + updated: | |
| 190 | + apiVersion: machineconfiguration.openshift.io/v1 |
| 191 | + kind: MachineConfigPool |
| 192 | + spec: {} |
| 193 | + status: |
| 194 | + osImageStream: |
| 195 | + name: "RHEL10-COREOS" |
| 196 | + expectedStatusError: "status.osImageStream.name: 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." |
| 197 | + - name: Status osImageStream.name should not exceed 253 characters |
| 198 | + initial: | |
| 199 | + apiVersion: machineconfiguration.openshift.io/v1 |
| 200 | + kind: MachineConfigPool |
| 201 | + spec: {} |
| 202 | + status: {} |
| 203 | + updated: | |
| 204 | + apiVersion: machineconfiguration.openshift.io/v1 |
| 205 | + kind: MachineConfigPool |
| 206 | + spec: {} |
| 207 | + status: |
| 208 | + osImageStream: |
| 209 | + name: "rhel-coreos32131e2ddf34f44r3r3r4f43tg54frg54tg45454g4g45gt34f43g54g45g3rhel-coreos32131e2ddf34f44r3r3r4f43tg54frg54tg45454g4g45gt34f43g54g45g3rhel-coreos32131e2ddf34f44r3r3r4f43tg54frg54tg45454g4g45gt34f43g54g45g3rhel-coreos32131e2ddf34f44r3r3r4f43tg54frg54tg" |
| 210 | + expectedStatusError: "Too long: may not be more than 253 bytes" |
0 commit comments