File tree 2 files changed +76
-0
lines changed
Process/Deploy/InstallUpdate/ConfigUpdate
Test/Unit/Process/Deploy/InstallUpdate/ConfigUpdate
2 files changed +76
-0
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,11 @@ public function execute()
104
104
$ redisSessionConfig
105
105
),
106
106
];
107
+
108
+ if (isset ($ config ['session ' ]['redis ' ]['disable_locking ' ])) {
109
+ $ this ->logger ->info ('Removing disable_locking env.php. ' );
110
+ unset($ config ['session ' ]['redis ' ]['disable_locking ' ]);
111
+ }
107
112
} else {
108
113
$ config = $ this ->removeRedisConfiguration ($ config );
109
114
}
Original file line number Diff line number Diff line change @@ -262,4 +262,75 @@ public function testExecuteWithDifferentRedisOptions()
262
262
263
263
$ this ->process ->execute ();
264
264
}
265
+
266
+ public function testRemoveDisableLocking ()
267
+ {
268
+ $ this ->loggerMock ->expects ($ this ->exactly (2 ))
269
+ ->method ('info ' )
270
+ ->withConsecutive (
271
+ [
272
+ 'Updating env.php Redis cache configuration. ' ,
273
+ ],
274
+ [
275
+ 'Removing disable_locking env.php. '
276
+ ]
277
+ );
278
+ $ this ->environmentMock ->expects ($ this ->any ())
279
+ ->method ('getRelationships ' )
280
+ ->willReturn ([
281
+ 'redis ' => [
282
+ 0 => [
283
+ 'host ' => '127.0.0.1 ' ,
284
+ 'port ' => '6379 ' ,
285
+ ],
286
+ ],
287
+ ]);
288
+ $ this ->environmentMock ->expects ($ this ->any ())
289
+ ->method ('getAdminUrl ' )
290
+ ->willReturn ('admin ' );
291
+ $ this ->configReaderMock ->expects ($ this ->once ())
292
+ ->method ('read ' )
293
+ ->willReturn ([
294
+ 'session ' => [
295
+ 'redis ' => [
296
+ 'disable_locking ' => '1 ' ,
297
+ ],
298
+ ],
299
+ ]);
300
+
301
+ $ this ->configWriterMock ->expects ($ this ->once ())
302
+ ->method ('write ' )
303
+ ->with ([
304
+ 'cache ' => [
305
+ 'frontend ' => [
306
+ 'default ' => [
307
+ 'backend ' => 'Cm_Cache_Backend_Redis ' ,
308
+ 'backend_options ' => [
309
+ 'server ' => '127.0.0.1 ' ,
310
+ 'port ' => '6379 ' ,
311
+ 'database ' => 1 ,
312
+ ],
313
+ ],
314
+ 'page_cache ' => [
315
+ 'backend ' => 'Cm_Cache_Backend_Redis ' ,
316
+ 'backend_options ' => [
317
+ 'server ' => '127.0.0.1 ' ,
318
+ 'port ' => '6379 ' ,
319
+ 'database ' => 1 ,
320
+ ],
321
+ ],
322
+ ],
323
+ ],
324
+ 'session ' => [
325
+ 'save ' => 'redis ' ,
326
+ 'redis ' => [
327
+ 'host ' => '127.0.0.1 ' ,
328
+ 'port ' => '6379 ' ,
329
+ 'database ' => 0 ,
330
+ ],
331
+ ],
332
+ ]);
333
+
334
+ $ this ->process ->execute ();
335
+ }
265
336
}
You can’t perform that action at this time.
0 commit comments