...

Text file src/github.com/openshift/api/config/v1/stable.infrastructure.testsuite.yaml

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

     1apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
     2name: "[Stable] Infrastructure"
     3crd: 0000_10_config-operator_01_infrastructure-Default.crd.yaml
     4tests:
     5  onCreate:
     6  - name: Should be able to create a minimal Infrastructure
     7    initial: |
     8      apiVersion: config.openshift.io/v1
     9      kind: Infrastructure
    10      spec: {} # No spec is required for a Infrastructure
    11    expected: |
    12      apiVersion: config.openshift.io/v1
    13      kind: Infrastructure
    14      spec: {}
    15  onUpdate:
    16    - name: Should be able to change External platformName from unknown to something else
    17      initial: |
    18        apiVersion: config.openshift.io/v1
    19        kind: Infrastructure
    20        spec:
    21          platformSpec:
    22            type: External
    23            external:
    24              platformName: Unknown
    25      updated: |
    26        apiVersion: config.openshift.io/v1
    27        kind: Infrastructure
    28        spec:
    29          platformSpec:
    30            type: External
    31            external:
    32              platformName: M&PCloud
    33      expected: |
    34        apiVersion: config.openshift.io/v1
    35        kind: Infrastructure
    36        spec:
    37          platformSpec:
    38            type: External
    39            external:
    40              platformName: M&PCloud
    41    - name: Should not be able to change External platformName once it was set
    42      initial: |
    43        apiVersion: config.openshift.io/v1
    44        kind: Infrastructure
    45        spec:
    46          platformSpec:
    47            type: External
    48            external:
    49              platformName: M&PCloud
    50      updated: |
    51        apiVersion: config.openshift.io/v1
    52        kind: Infrastructure
    53        spec:
    54          platformSpec:
    55            type: External
    56            external:
    57              platformName: SomeOtherCoolplatformName
    58      expectedError: " spec.platformSpec.external.platformName: Invalid value: \"string\": platform name cannot be changed once set"
    59    - name: Should not be able to modify an existing Azure ResourceTags Tag
    60      initial: |
    61        apiVersion: config.openshift.io/v1
    62        kind: Infrastructure
    63        spec: {}
    64        status:
    65          controlPlaneTopology: "HighlyAvailable"
    66          infrastructureTopology: "HighlyAvailable"
    67          platform: Azure
    68          platformStatus:
    69            type: Azure
    70            azure:
    71              resourceTags:
    72                - {key: "key", value: "value"}
    73      updated: |
    74        apiVersion: config.openshift.io/v1
    75        kind: Infrastructure
    76        spec: {}
    77        status:
    78          platform: Azure
    79          platformStatus:
    80            type: Azure
    81            azure:
    82              resourceTags:
    83                - {key: "key", value: "changed"}
    84      expectedStatusError: "status.platformStatus.azure.resourceTags: Invalid value: \"array\": resourceTags are immutable and may only be configured during installation"
    85    - name: Should not be able to add a Tag to an existing Azure ResourceTags
    86      initial: |
    87        apiVersion: config.openshift.io/v1
    88        kind: Infrastructure
    89        spec: {}
    90        status:
    91          controlPlaneTopology: "HighlyAvailable"
    92          infrastructureTopology: "HighlyAvailable"
    93          platform: Azure
    94          platformStatus:
    95            type: Azure
    96            azure:
    97              resourceTags:
    98                - {key: "key", value: "value"}
    99      updated: |
   100        apiVersion: config.openshift.io/v1
   101        kind: Infrastructure
   102        spec: {}
   103        status:
   104          platform: Azure
   105          platformStatus:
   106            type: Azure
   107            azure:
   108              resourceTags:
   109                - {key: "key", value: "value"}
   110                - {key: "new", value: "entry"}
   111      expectedStatusError: "status.platformStatus.azure.resourceTags: Invalid value: \"array\": resourceTags are immutable and may only be configured during installation"
   112    - name: Should not be able to remove a Tag from an existing Azure ResourceTags
   113      initial: |
   114        apiVersion: config.openshift.io/v1
   115        kind: Infrastructure
   116        spec: {}
   117        status:
   118          platform: Azure
   119          platformStatus:
   120            type: Azure
   121            azure:
   122              resourceTags:
   123                - {key: "key", value: "value"}
   124                - {key: "new", value: "entry"}
   125      updated: |
   126        apiVersion: config.openshift.io/v1
   127        kind: Infrastructure
   128        spec: {}
   129        status:
   130          platform: Azure
   131          platformStatus:
   132            type: Azure
   133            azure:
   134              resourceTags:
   135                - {key: "key", value: "value"}
   136      expectedStatusError: "status.platformStatus.azure.resourceTags: Invalid value: \"array\": resourceTags are immutable and may only be configured during installation"
   137    - name: Should not be able to add Azure ResourceTags to an empty platformStatus.azure
   138      initial: |
   139        apiVersion: config.openshift.io/v1
   140        kind: Infrastructure
   141        spec: {}
   142        status:
   143          platform: Azure
   144          platformStatus:
   145            type: Azure
   146            azure: {}
   147      updated: |
   148        apiVersion: config.openshift.io/v1
   149        kind: Infrastructure
   150        spec: {}
   151        status:
   152          platform: Azure
   153          platformStatus:
   154            azure:
   155              resourceTags:
   156                - {key: "key", value: "value"}
   157      expectedStatusError: "status.platformStatus.azure: Invalid value: \"object\": resourceTags may only be configured during installation"
   158    - name: Should not be able to remove Azure ResourceTags from platformStatus.azure
   159      initial: |
   160        apiVersion: config.openshift.io/v1
   161        kind: Infrastructure
   162        spec: {}
   163        status:
   164          platform: Azure
   165          platformStatus:
   166            type: Azure
   167            azure:
   168              resourceTags:
   169                - {key: "key", value: "value"}
   170      updated: |
   171        apiVersion: config.openshift.io/v1
   172        kind: Infrastructure
   173        spec: {}
   174        status:
   175          platform: Azure
   176          platformStatus:
   177            type: Azure
   178            azure: {}
   179      expectedStatusError: "status.platformStatus.azure: Invalid value: \"object\": resourceTags may only be configured during installation"
   180    - name: Should be able to modify the ResourceGroupName while Azure ResourceTags are present
   181      initial: |
   182        apiVersion: config.openshift.io/v1
   183        kind: Infrastructure
   184        spec: {}
   185        status:
   186          platform: Azure
   187          platformStatus:
   188            type: Azure
   189            azure:
   190              resourceGroupName: foo
   191              resourceTags:
   192                - {key: "key", value: "value"}
   193      updated: |
   194        apiVersion: config.openshift.io/v1
   195        kind: Infrastructure
   196        spec: {}
   197        status:
   198          platform: Azure
   199          platformStatus:
   200            azure:
   201              resourceGroupName: bar
   202              resourceTags:
   203                - {key: "key", value: "value"}
   204      expected: |
   205        apiVersion: config.openshift.io/v1
   206        kind: Infrastructure
   207        spec: {}
   208        status:
   209          controlPlaneTopology: "HighlyAvailable"
   210          infrastructureTopology: "HighlyAvailable"
   211          platform: Azure
   212          platformStatus:
   213            azure:
   214              resourceGroupName: bar
   215              resourceTags:
   216                - {key: "key", value: "value"}
   217    - name: PowerVS platform status's resourceGroup length should not exceed the max length set
   218      initial: |
   219        apiVersion: config.openshift.io/v1
   220        kind: Infrastructure
   221        spec:
   222          platformSpec:
   223            type: PowerVS
   224        status:
   225          platform: PowerVS
   226          platformStatus:
   227            powervs:
   228              resourceGroup: resource-group
   229      updated: |
   230        apiVersion: config.openshift.io/v1
   231        kind: Infrastructure
   232        spec:
   233          platformSpec:
   234            type: PowerVS
   235        status:
   236          platform: PowerVS
   237          platformStatus:
   238            powervs:
   239              resourceGroup: resource-group-should-not-accept-the-string-that-exceeds-max-length-set
   240      expectedStatusError: "status.platformStatus.powervs.resourceGroup: Too long: may not be longer than 40"
   241    - name: PowerVS platform status's resourceGroup should match the regex configured
   242      initial: |
   243        apiVersion: config.openshift.io/v1
   244        kind: Infrastructure
   245        spec:
   246          platformSpec:
   247            type: PowerVS
   248        status:
   249          platform: PowerVS
   250          platformStatus:
   251            powervs:
   252              resourceGroup: resource-group
   253      updated: |
   254        apiVersion: config.openshift.io/v1
   255        kind: Infrastructure
   256        spec:
   257          platformSpec:
   258            type: PowerVS
   259        status:
   260          platform: PowerVS
   261          platformStatus:
   262            powervs:
   263              resourceGroup: re$ource-group
   264      expectedStatusError: "status.platformStatus.powervs.resourceGroup in body should match '^[a-zA-Z0-9-_ ]+$'"
   265    - name: Should not be able to change PowerVS platform status's resourceGroup once it was set
   266      initial: |
   267        apiVersion: config.openshift.io/v1
   268        kind: Infrastructure
   269        spec:
   270          platformSpec:
   271            type: PowerVS
   272        status:
   273          platform: PowerVS
   274          platformStatus:
   275            powervs:
   276              resourceGroup: resource-group
   277      updated: |
   278        apiVersion: config.openshift.io/v1
   279        kind: Infrastructure
   280        spec:
   281          platformSpec:
   282            type: PowerVS
   283        status:
   284          platform: PowerVS
   285          platformStatus:
   286            powervs:
   287              resourceGroup: other-resource-group-name
   288      expectedStatusError: "status.platformStatus.powervs.resourceGroup: Invalid value: \"string\": resourceGroup is immutable once set"
   289    - name: Should not be able to unset PowerVS platform status's resourceGroup once it was set
   290      initial: |
   291        apiVersion: config.openshift.io/v1
   292        kind: Infrastructure
   293        spec:
   294          platformSpec:
   295            type: PowerVS
   296        status:
   297          platform: PowerVS
   298          platformStatus:
   299            powervs:
   300              region: some-region
   301              resourceGroup: resource-group
   302      updated: |
   303        apiVersion: config.openshift.io/v1
   304        kind: Infrastructure
   305        spec:
   306          platformSpec:
   307            type: PowerVS
   308        status:
   309          platform: PowerVS
   310          platformStatus:
   311            powervs:
   312              region: some-region
   313      expectedStatusError: "status.platformStatus.powervs: Invalid value: \"object\": cannot unset resourceGroup once set"
   314    - name: Should set load balancer type to OpenShiftManagedDefault if not specified
   315      initial: |
   316        apiVersion: config.openshift.io/v1
   317        kind: Infrastructure
   318        spec:
   319          platformSpec:
   320            openstack: {}
   321            type: OpenStack
   322      updated: |
   323        apiVersion: config.openshift.io/v1
   324        kind: Infrastructure
   325        spec:
   326          platformSpec:
   327            openstack: {}
   328            type: OpenStack
   329        status:
   330          platform: OpenStack
   331          platformStatus:
   332            openstack: {}
   333            type: OpenStack
   334      expected: |
   335        apiVersion: config.openshift.io/v1
   336        kind: Infrastructure
   337        spec:
   338          platformSpec:
   339            openstack: {}
   340            type: OpenStack
   341        status:
   342          controlPlaneTopology: HighlyAvailable
   343          infrastructureTopology: HighlyAvailable
   344          platform: OpenStack
   345          platformStatus:
   346            openstack:
   347              loadBalancer:
   348                type: OpenShiftManagedDefault
   349            type: OpenStack
   350    - name: Should be able to override the default load balancer with a valid value
   351      initial: |
   352        apiVersion: config.openshift.io/v1
   353        kind: Infrastructure
   354        spec:
   355          platformSpec:
   356            openstack: {}
   357            type: OpenStack
   358      updated: |
   359        apiVersion: config.openshift.io/v1
   360        kind: Infrastructure
   361        spec:
   362          platformSpec:
   363            openstack: {}
   364            type: OpenStack
   365        status:
   366          platform: OpenStack
   367          platformStatus:
   368            openstack:
   369              loadBalancer:
   370                type: UserManaged
   371            type: OpenStack
   372      expected: |
   373        apiVersion: config.openshift.io/v1
   374        kind: Infrastructure
   375        spec:
   376          platformSpec:
   377            openstack: {}
   378            type: OpenStack
   379        status:
   380          controlPlaneTopology: HighlyAvailable
   381          infrastructureTopology: HighlyAvailable
   382          platform: OpenStack
   383          platformStatus:
   384            openstack:
   385              loadBalancer:
   386                type: UserManaged
   387            type: OpenStack
   388    - name: Should not allow changing the immutable load balancer type field
   389      initial: |
   390        apiVersion: config.openshift.io/v1
   391        kind: Infrastructure
   392        spec:
   393          platformSpec:
   394            openstack: {}
   395            type: OpenStack
   396        status:
   397          controlPlaneTopology: HighlyAvailable
   398          infrastructureTopology: HighlyAvailable
   399          platform: OpenStack
   400          platformStatus:
   401            openstack:
   402              loadBalancer:
   403                type: OpenShiftManagedDefault
   404            type: OpenStack
   405      updated: |
   406        apiVersion: config.openshift.io/v1
   407        kind: Infrastructure
   408        spec:
   409          platformSpec:
   410            type: OpenStack
   411            openstack: {}
   412        status:
   413          controlPlaneTopology: HighlyAvailable
   414          infrastructureTopology: HighlyAvailable
   415          platform: OpenStack
   416          platformStatus:
   417            openstack:
   418              loadBalancer:
   419                type: UserManaged
   420            type: OpenStack
   421      expectedStatusError: "status.platformStatus.openstack.loadBalancer.type: Invalid value: \"string\": type is immutable once set"
   422    - name: Should not allow removing the immutable load balancer type field that was initially set
   423      initial: |
   424        apiVersion: config.openshift.io/v1
   425        kind: Infrastructure
   426        spec:
   427          platformSpec:
   428            openstack: {}
   429            type: OpenStack
   430        status:
   431          controlPlaneTopology: HighlyAvailable
   432          infrastructureTopology: HighlyAvailable
   433          platform: OpenStack
   434          platformStatus:
   435            openstack:
   436              loadBalancer:
   437                type: UserManaged
   438            type: OpenStack
   439      updated: |
   440        apiVersion: config.openshift.io/v1
   441        kind: Infrastructure
   442        spec:
   443          platformSpec:
   444            type: OpenStack
   445            openstack: {}
   446        status:
   447          controlPlaneTopology: HighlyAvailable
   448          infrastructureTopology: HighlyAvailable
   449          platform: OpenStack
   450          platformStatus:
   451            openstack: {}
   452            type: OpenStack
   453      expectedStatusError: "status.platformStatus.openstack.loadBalancer.type: Invalid value: \"string\": type is immutable once set"
   454    - name: Should not allow setting the load balancer type to a wrong value
   455      initial: |
   456        apiVersion: config.openshift.io/v1
   457        kind: Infrastructure
   458        spec:
   459          platformSpec:
   460            openstack: {}
   461            type: OpenStack
   462      updated: |
   463        apiVersion: config.openshift.io/v1
   464        kind: Infrastructure
   465        spec:
   466          platformSpec:
   467            openstack: {}
   468            type: OpenStack
   469        status:
   470          platform: OpenStack
   471          platformStatus:
   472            openstack:
   473              loadBalancer:
   474                type: FooBar
   475            type: OpenStack
   476      expectedStatusError: "status.platformStatus.openstack.loadBalancer.type: Unsupported value: \"FooBar\": supported values: \"OpenShiftManagedDefault\", \"UserManaged\""

View as plain text