8
8
use Magento \MagentoCloud \Config \Environment as EnvironmentConfig ;
9
9
use Magento \MagentoCloud \Config \Environment \Reader as EnvironmentReader ;
10
10
use Magento \MagentoCloud \Config \Stage \Deploy ;
11
+ use Magento \MagentoCloud \Config \StageConfigInterface ;
11
12
use PHPUnit \Framework \TestCase ;
12
13
use PHPUnit_Framework_MockObject_MockObject as Mock ;
13
14
@@ -273,6 +274,7 @@ public function testGetDeprecatedScdThreads(
273
274
274
275
/**
275
276
* @return array
277
+ * @SuppressWarnings(PHPMD.ExcessiveMethodLength)
276
278
*/
277
279
public function getDeprecatedScdThreadsDataProvider (): array
278
280
{
@@ -286,7 +288,18 @@ public function getDeprecatedScdThreadsDataProvider(): array
286
288
[],
287
289
4 ,
288
290
],
289
- 'threads raw ' => [
291
+ 'threads ENV raw ' => [
292
+ Deploy::VAR_SCD_THREADS ,
293
+ [],
294
+ [
295
+
296
+ ],
297
+ [
298
+ 'STATIC_CONTENT_THREADS ' => 5 ,
299
+ ],
300
+ 5 ,
301
+ ],
302
+ 'threads ENV raw and magento cloud variable ' => [
290
303
Deploy::VAR_SCD_THREADS ,
291
304
[],
292
305
[
@@ -315,6 +328,105 @@ public function getDeprecatedScdThreadsDataProvider(): array
315
328
],
316
329
3 ,
317
330
],
331
+ 'threads mode enterprise and ENV raw ' => [
332
+ Deploy::VAR_SCD_THREADS ,
333
+ [],
334
+ [],
335
+ [
336
+ 'STATIC_CONTENT_THREADS ' => 5 ,
337
+ 'MAGENTO_CLOUD_MODE ' => EnvironmentConfig::CLOUD_MODE_ENTERPRISE ,
338
+ ],
339
+ 5 ,
340
+ ],
341
+ 'threads mode enterprise and ENV raw and magento cloud variable ' => [
342
+ Deploy::VAR_SCD_THREADS ,
343
+ [],
344
+ [
345
+ 'STATIC_CONTENT_THREADS ' => 4
346
+ ],
347
+ [
348
+ 'STATIC_CONTENT_THREADS ' => 5 ,
349
+ 'MAGENTO_CLOUD_MODE ' => EnvironmentConfig::CLOUD_MODE_ENTERPRISE ,
350
+ ],
351
+ 4 ,
352
+ ],
353
+ 'threads mode enterprise and magento cloud variable ' => [
354
+ Deploy::VAR_SCD_THREADS ,
355
+ [],
356
+ [
357
+ 'STATIC_CONTENT_THREADS ' => 5 ,
358
+ ],
359
+ [
360
+ 'MAGENTO_CLOUD_MODE ' => EnvironmentConfig::CLOUD_MODE_ENTERPRISE ,
361
+ ],
362
+ 5 ,
363
+ ],
364
+ 'mode enterprise with global and deploy scd_threads in .magento.env.yaml ' => [
365
+ Deploy::VAR_SCD_THREADS ,
366
+ [
367
+ StageConfigInterface::STAGE_GLOBAL => [
368
+ StageConfigInterface::VAR_SCD_THREADS => 5
369
+ ],
370
+ StageConfigInterface::STAGE_DEPLOY => [
371
+ StageConfigInterface::VAR_SCD_THREADS => 4
372
+ ],
373
+ ],
374
+ [],
375
+ [
376
+ 'MAGENTO_CLOUD_MODE ' => EnvironmentConfig::CLOUD_MODE_ENTERPRISE ,
377
+ ],
378
+ 4 ,
379
+ ],
380
+ 'threads mode enterprise with global scd_threads in .magento.env.yaml ' => [
381
+ Deploy::VAR_SCD_THREADS ,
382
+ [
383
+ StageConfigInterface::STAGE_GLOBAL => [
384
+ StageConfigInterface::VAR_SCD_THREADS => 5
385
+ ],
386
+ ],
387
+ [],
388
+ [
389
+ 'MAGENTO_CLOUD_MODE ' => EnvironmentConfig::CLOUD_MODE_ENTERPRISE ,
390
+ ],
391
+ 5 ,
392
+ ],
393
+ 'threads mode enterprise with global and deploy scd_threads in .magento.env.yaml and ENV variable ' => [
394
+ Deploy::VAR_SCD_THREADS ,
395
+ [
396
+ StageConfigInterface::STAGE_GLOBAL => [
397
+ StageConfigInterface::VAR_SCD_THREADS => 5
398
+ ],
399
+ StageConfigInterface::STAGE_DEPLOY => [
400
+ StageConfigInterface::VAR_SCD_THREADS => 4
401
+ ],
402
+ ],
403
+ [],
404
+ [
405
+ 'STATIC_CONTENT_THREADS ' => 7 ,
406
+ 'MAGENTO_CLOUD_MODE ' => EnvironmentConfig::CLOUD_MODE_ENTERPRISE ,
407
+ ],
408
+ 7 ,
409
+ ],
410
+ 'threads mode enterprise with global and deploy scd_threads in .magento.env.yaml ' .
411
+ 'and magento cloud variable and ENV variable ' => [
412
+ Deploy::VAR_SCD_THREADS ,
413
+ [
414
+ StageConfigInterface::STAGE_GLOBAL => [
415
+ StageConfigInterface::VAR_SCD_THREADS => 5
416
+ ],
417
+ StageConfigInterface::STAGE_DEPLOY => [
418
+ StageConfigInterface::VAR_SCD_THREADS => 4
419
+ ],
420
+ ],
421
+ [
422
+ 'STATIC_CONTENT_THREADS ' => 6 ,
423
+ ],
424
+ [
425
+ 'STATIC_CONTENT_THREADS ' => 7 ,
426
+ 'MAGENTO_CLOUD_MODE ' => EnvironmentConfig::CLOUD_MODE_ENTERPRISE ,
427
+ ],
428
+ 6 ,
429
+ ],
318
430
];
319
431
}
320
432
0 commit comments