77
77
defaultRuntime: runc
78
78
logLevel: info
79
79
onUpdate :
80
- - name : Should not be able to update from default to invalid value
80
+ - name : Case 1 - Change another field - Should be able to update other parameters with invalid defaultRuntime
81
81
initialCRDPatches :
82
82
- op : remove
83
83
path : /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/containerRuntimeConfig/properties/defaultRuntime/enum
86
86
kind: ContainerRuntimeConfig
87
87
spec:
88
88
containerRuntimeConfig:
89
- defaultRuntime: crun
89
+ defaultRuntime: docker
90
90
logLevel: fatal
91
91
updated : |
92
92
apiVersion: machineconfiguration.openshift.io/v1
@@ -95,26 +95,14 @@ tests:
95
95
containerRuntimeConfig:
96
96
defaultRuntime: docker
97
97
logLevel: info
98
- expectedError : " Unsupported value: \" docker\" : supported values: \" crun\" , \" runc\" "
99
- - name : Should be able to update from not set to default when other params are set
100
- initial : |
101
- apiVersion: machineconfiguration.openshift.io/v1
102
- kind: ContainerRuntimeConfig
103
- spec:
104
- containerRuntimeConfig: {}
105
- updated : |
106
- apiVersion: machineconfiguration.openshift.io/v1
107
- kind: ContainerRuntimeConfig
108
- spec:
109
- containerRuntimeConfig:
110
- logLevel: info
111
98
expected : |
112
99
apiVersion: machineconfiguration.openshift.io/v1
113
100
kind: ContainerRuntimeConfig
114
101
spec:
115
102
containerRuntimeConfig:
103
+ defaultRuntime: docker
116
104
logLevel: info
117
- - name : Should be able to update from runc to crun with other parameters
105
+ - name : Case 2 - Remove the field - Should be able to update from invalid to removed
118
106
initialCRDPatches :
119
107
- op : remove
120
108
path : /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/containerRuntimeConfig/properties/defaultRuntime/enum
@@ -123,23 +111,18 @@ tests:
123
111
kind: ContainerRuntimeConfig
124
112
spec:
125
113
containerRuntimeConfig:
126
- defaultRuntime: runc
127
- logLevel: fatal
114
+ defaultRuntime: docker
128
115
updated : |
129
116
apiVersion: machineconfiguration.openshift.io/v1
130
117
kind: ContainerRuntimeConfig
131
118
spec:
132
- containerRuntimeConfig:
133
- defaultRuntime: crun
134
- logLevel: info
119
+ containerRuntimeConfig: {}
135
120
expected : |
136
121
apiVersion: machineconfiguration.openshift.io/v1
137
122
kind: ContainerRuntimeConfig
138
123
spec:
139
- containerRuntimeConfig:
140
- defaultRuntime: crun
141
- logLevel: info
142
- - name : Should be able to update other parameters with invalid defaultRuntime
124
+ containerRuntimeConfig: {}
125
+ - name : Case 3 - Update the field - Should be able to update from invalid to correct value
143
126
initialCRDPatches :
144
127
- op : remove
145
128
path : /spec/versions/0/schema/openAPIV3Schema/properties/spec/properties/containerRuntimeConfig/properties/defaultRuntime/enum
@@ -149,18 +132,15 @@ tests:
149
132
spec:
150
133
containerRuntimeConfig:
151
134
defaultRuntime: docker
152
- logLevel: fatal
153
135
updated : |
154
136
apiVersion: machineconfiguration.openshift.io/v1
155
137
kind: ContainerRuntimeConfig
156
138
spec:
157
139
containerRuntimeConfig:
158
- defaultRuntime: docker
159
- logLevel: info
140
+ defaultRuntime: runc
160
141
expected : |
161
142
apiVersion: machineconfiguration.openshift.io/v1
162
143
kind: ContainerRuntimeConfig
163
144
spec:
164
145
containerRuntimeConfig:
165
- defaultRuntime: docker
166
- logLevel: info
146
+ defaultRuntime: runc
0 commit comments