@@ -145,6 +145,62 @@ func TestReconcileDevWorkspaceConfigStorage(t *testing.T) {
145145 },
146146 },
147147 },
148+ {
149+ name : "Create DevWorkspaceOperatorConfig with non empty StorageAccessMode" ,
150+ cheCluster : & chev2.CheCluster {
151+ ObjectMeta : metav1.ObjectMeta {
152+ Namespace : "eclipse-che" ,
153+ Name : "eclipse-che" ,
154+ },
155+ Spec : chev2.CheClusterSpec {
156+ DevEnvironments : chev2.CheClusterDevEnvironments {
157+ DisableContainerBuildCapabilities : pointer .Bool (true ),
158+ Storage : chev2.WorkspaceStorage {
159+ PvcStrategy : constants .PerUserPVCStorageStrategy ,
160+ PerUserStrategyPvcConfig : & chev2.PVC {
161+ StorageAccessMode : []corev1.PersistentVolumeAccessMode {
162+ corev1 .ReadWriteMany ,
163+ },
164+ },
165+ },
166+ },
167+ },
168+ },
169+ expectedOperatorConfig : & controllerv1alpha1.OperatorConfiguration {
170+ Workspace : & controllerv1alpha1.WorkspaceConfig {
171+ StorageAccessMode : []corev1.PersistentVolumeAccessMode {
172+ corev1 .ReadWriteMany ,
173+ },
174+ DeploymentStrategy : "Recreate" ,
175+ },
176+ },
177+ },
178+ {
179+ name : "Create DevWorkspaceOperatorConfig with nil StorageAccessMode" ,
180+ cheCluster : & chev2.CheCluster {
181+ ObjectMeta : metav1.ObjectMeta {
182+ Namespace : "eclipse-che" ,
183+ Name : "eclipse-che" ,
184+ },
185+ Spec : chev2.CheClusterSpec {
186+ DevEnvironments : chev2.CheClusterDevEnvironments {
187+ DisableContainerBuildCapabilities : pointer .Bool (true ),
188+ Storage : chev2.WorkspaceStorage {
189+ PvcStrategy : constants .PerUserPVCStorageStrategy ,
190+ PerUserStrategyPvcConfig : & chev2.PVC {
191+ StorageAccessMode : nil ,
192+ },
193+ },
194+ },
195+ },
196+ },
197+ expectedOperatorConfig : & controllerv1alpha1.OperatorConfiguration {
198+ Workspace : & controllerv1alpha1.WorkspaceConfig {
199+ StorageAccessMode : nil ,
200+ DeploymentStrategy : "Recreate" ,
201+ },
202+ },
203+ },
148204 {
149205 name : "Create DevWorkspaceOperatorConfig with per-user storage strategy" ,
150206 cheCluster : & chev2.CheCluster {
0 commit comments