...

Text file src/github.com/openshift/api/operator/v1/stable.storage.testsuite.yaml

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

     1apiVersion: apiextensions.k8s.io/v1 # Hack because controller-gen complains if we don't have this
     2name: "[Stable] Storage"
     3crd: 0000_50_cluster_storage_operator_01_crd.yaml
     4tests:
     5  onCreate:
     6  - name: Should be able to create a minimal Storage
     7    initial: |
     8      apiVersion: operator.openshift.io/v1
     9      kind: Storage
    10      spec: {} # No spec is required for a Storage
    11    expected: |
    12      apiVersion: operator.openshift.io/v1
    13      kind: Storage
    14      spec:
    15        logLevel: Normal
    16        operatorLogLevel: Normal
    17  onCreate:
    18  - name: Should allow creating Storage with vsphere migration enabled
    19    initial: |
    20      apiVersion: operator.openshift.io/v1
    21      kind: Storage
    22      spec:
    23        vsphereStorageDriver: CSIWithMigrationDriver
    24    expected: |
    25      apiVersion: operator.openshift.io/v1
    26      kind: Storage
    27      spec:
    28        vsphereStorageDriver: CSIWithMigrationDriver
    29        logLevel: Normal
    30        operatorLogLevel: Normal
    31  onCreate:
    32  - name: Should not allow creating Storage with vsphere migration disabled
    33    initial: |
    34      apiVersion: operator.openshift.io/v1
    35      kind: Storage
    36      spec:
    37        vsphereStorageDriver: LegacyDeprecatedInTreeDriver
    38    expectedError: "VSphereStorageDriver can not be set to LegacyDeprecatedInTreeDriver"
    39  onUpdate:
    40  - name: Should allow enabling CSI migration for vSphere
    41    initial: |
    42      apiVersion: operator.openshift.io/v1
    43      kind: Storage
    44      spec: {} # No spec is required
    45    updated: |
    46      apiVersion: operator.openshift.io/v1
    47      kind: Storage
    48      spec:
    49        vsphereStorageDriver: CSIWithMigrationDriver
    50    expected: |
    51      apiVersion: operator.openshift.io/v1
    52      kind: Storage
    53      spec:
    54        vsphereStorageDriver: CSIWithMigrationDriver
    55        logLevel: Normal
    56        operatorLogLevel: Normal
    57  - name: Should not allow disabling CSI migration for vSphere
    58    initial: |
    59      apiVersion: operator.openshift.io/v1
    60      kind: Storage
    61      spec: {} # No spec is required
    62    updated: |
    63      apiVersion: operator.openshift.io/v1
    64      kind: Storage
    65      spec:
    66        vsphereStorageDriver: LegacyDeprecatedInTreeDriver
    67    expectedError: "VSphereStorageDriver can not be set to LegacyDeprecatedInTreeDriver"
    68  - name: Should not allow changing CSIWithMigrationDriver to LegacyDeprecatedInTreeDriver
    69    initial: |
    70      apiVersion: operator.openshift.io/v1
    71      kind: Storage
    72      spec:
    73        vsphereStorageDriver: CSIWithMigrationDriver
    74    updated: |
    75      apiVersion: operator.openshift.io/v1
    76      kind: Storage
    77      spec:
    78        vsphereStorageDriver: LegacyDeprecatedInTreeDriver
    79    expectedError: "VSphereStorageDriver can not be changed once it is set to CSIWithMigrationDriver"
    80  - name: Should not allow changing CSIWithMigrationDriver to empty string
    81    initial: |
    82      apiVersion: operator.openshift.io/v1
    83      kind: Storage
    84      spec:
    85        vsphereStorageDriver: CSIWithMigrationDriver
    86    updated: |
    87      apiVersion: operator.openshift.io/v1
    88      kind: Storage
    89      spec:
    90        vsphereStorageDriver: ""
    91    expectedError: "VSphereStorageDriver can not be changed once it is set to CSIWithMigrationDriver"
    92  - name: Should not allow unsetting VSphereStorageDriver once it is set
    93    initial: |
    94      apiVersion: operator.openshift.io/v1
    95      kind: Storage
    96      spec:
    97        vsphereStorageDriver: CSIWithMigrationDriver
    98    updated: |
    99      apiVersion: operator.openshift.io/v1
   100      kind: Storage
   101      spec: {}
   102    expectedError: "VSphereStorageDriver is required once set"

View as plain text