Skip to content

Commit 9d21419

Browse files
committed
Prevent generating a kernel_secret file in the standalone image if it already exists or is defined through an environment variable
1 parent cc10e54 commit 9d21419

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/Docker/Standalone/InitTest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,13 @@ public function testKernelSecretNotRegeneratedOnRestart(): void
4949

5050
$initialSecret = $this->filesystem->readFile(__DIR__ . '/config/secrets/kernel_secret');
5151

52-
$this->container->restart();
52+
$this->container->stop();
53+
54+
$this->container = (new GenericContainer('dirigent-standalone'))
55+
->withMount(__DIR__ . '/config', '/srv/config')
56+
->withMount(__DIR__ . '/scripts', '/srv/scripts/tests')
57+
->withWait(new WaitForLog('ready to handle connections'))
58+
->start();
5359

5460
$this->assertContainerLogsContain('Kernel secret exists');
5561

0 commit comments

Comments
 (0)