Skip to content

Commit 00c7cac

Browse files
committed
Add new tests to verify behavior of the new byo DNS feature
Currently feature is in Tech preview
1 parent cd76933 commit 00c7cac

File tree

1 file changed

+129
-0
lines changed

1 file changed

+129
-0
lines changed

config/v1/techpreview.infrastructure.testsuite.yaml

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,3 +211,132 @@ tests:
211211
type: FooBar
212212
type: BareMetal
213213
expectedStatusError: "status.platformStatus.baremetal.loadBalancer.type: Unsupported value: \"FooBar\": supported values: \"OpenShiftManagedDefault\", \"UserManaged\""
214+
- name: Should set dnsConfig provider to "" if not specified
215+
initial: |
216+
apiVersion: config.openshift.io/v1
217+
kind: Infrastructure
218+
spec:
219+
platformSpec:
220+
aws: {}
221+
type: AWS
222+
updated: |
223+
apiVersion: config.openshift.io/v1
224+
kind: Infrastructure
225+
spec:
226+
platformSpec:
227+
aws: {}
228+
type: AWS
229+
status:
230+
platform: AWS
231+
platformStatus:
232+
aws: {}
233+
type: AWS
234+
expected: |
235+
apiVersion: config.openshift.io/v1
236+
kind: Infrastructure
237+
spec:
238+
platformSpec:
239+
aws: {}
240+
type: AWS
241+
status:
242+
controlPlaneTopology: HighlyAvailable
243+
cpuPartitioning: None
244+
infrastructureTopology: HighlyAvailable
245+
platform: AWS
246+
platformStatus:
247+
aws:
248+
dnsConfig:
249+
provider: ""
250+
type: AWS
251+
- name: Should be able to override the default Provider with a valid value
252+
initial: |
253+
apiVersion: config.openshift.io/v1
254+
kind: Infrastructure
255+
spec:
256+
platformSpec:
257+
aws: {}
258+
type: AWS
259+
updated: |
260+
apiVersion: config.openshift.io/v1
261+
kind: Infrastructure
262+
spec:
263+
platformSpec:
264+
aws: {}
265+
type: AWS
266+
status:
267+
platform: AWS
268+
platformStatus:
269+
aws:
270+
dnsConfig:
271+
provider: UserAndClusterProvided
272+
type: AWS
273+
expected: |
274+
apiVersion: config.openshift.io/v1
275+
kind: Infrastructure
276+
spec:
277+
platformSpec:
278+
aws: {}
279+
type: AWS
280+
status:
281+
controlPlaneTopology: HighlyAvailable
282+
cpuPartitioning: None
283+
infrastructureTopology: HighlyAvailable
284+
platform: AWS
285+
platformStatus:
286+
aws:
287+
dnsConfig:
288+
provider: UserAndClusterProvided
289+
type: AWS
290+
- name: Should be not be able to modify immutable 'provider'
291+
initial: |
292+
apiVersion: config.openshift.io/v1
293+
kind: Infrastructure
294+
spec:
295+
platformSpec:
296+
aws: {}
297+
type: AWS
298+
status:
299+
platform: AWS
300+
platformStatus:
301+
aws:
302+
dnsConfig:
303+
provider: CloudProvided
304+
type: AWS
305+
updated: |
306+
apiVersion: config.openshift.io/v1
307+
kind: Infrastructure
308+
spec:
309+
platformSpec:
310+
aws: {}
311+
type: AWS
312+
status:
313+
platform: AWS
314+
platformStatus:
315+
aws:
316+
dnsConfig:
317+
provider: ""
318+
type: AWS
319+
expectedStatusError: "status.platformStatus.aws.dnsConfig.provider: Invalid value: \"string\": provider is immutable once set"
320+
- name: Should be not be able to set Provider with an invalid value
321+
initial: |
322+
apiVersion: config.openshift.io/v1
323+
kind: Infrastructure
324+
spec:
325+
platformSpec:
326+
aws: {}
327+
type: AWS
328+
updated: |
329+
apiVersion: config.openshift.io/v1
330+
kind: Infrastructure
331+
spec:
332+
platformSpec:
333+
aws: {}
334+
type: AWS
335+
status:
336+
platform: AWS
337+
platformStatus:
338+
aws:
339+
dnsConfig:
340+
provider: CloudProvided
341+
type: AWS
342+
expectedStatusError: "status.platformStatus.aws.dnsConfig.provider: Unsupported value: \"CloudProvided\": supported values: \"UserAndClusterProvided\", \"\""

0 commit comments

Comments
 (0)