Skip to content

Commit 90d6675

Browse files
Merge pull request #383 from magento-thunder/MAGECLOUD-2923
MAGECLOUD-2923: Whole Cron Configuration Is Removed from ENV.php on Every Deployment
2 parents 0b0db79 + 8e61c3e commit 90d6675

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Process/PostDeploy/EnableCron.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public function execute()
5858
{
5959
$this->logger->info('Enable cron');
6060
$config = $this->reader->read();
61-
unset($config['cron']);
61+
unset($config['cron']['enabled']);
6262
$this->writer->create($config);
6363
}
6464
}

src/Test/Unit/Process/PostDeploy/EnableCronTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ protected function setUp()
5555

5656
public function testExecute()
5757
{
58-
$config = ['cron' => ['enabled' => 0], 'other_conf' => 'value'];
59-
$configResult = ['other_conf' => 'value'];
58+
$config = ['cron' => ['enabled' => 0, 'other_cron_config' => 1], 'other_conf' => 'value'];
59+
$configResult = ['cron' => ['other_cron_config' => 1], 'other_conf' => 'value'];
6060
$this->loggerMock->expects($this->once())
6161
->method('info')
6262
->with('Enable cron');

0 commit comments

Comments
 (0)