Skip to content

Commit

Permalink
chore: Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephan Huber committed Nov 5, 2024
1 parent 0389a51 commit 04ed619
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/PhabTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,13 @@ protected function runDockerizedSshServer($logger, ConfigurationService $config)
], $runDockerShell, $config);

$result = $runDockerShell->run('docker pull ghcr.io/linuxserver/openssh-server', true);
$this->assertEquals(0, $result->getExitCode());
$result = $runDockerShell->run('docker stop phabalicious_ssh_test | true', true);
$this->assertEquals(0, $result->getExitCode());
$result = $runDockerShell->run('docker rm phabalicious_ssh_test | true', true);
$this->assertEquals(0, $result->getExitCode());
$result = $runDockerShell->run(sprintf('chmod 600 %s', $privateKeyFile));
$this->assertEquals(0, $result->getExitCode());
$public_key = trim(file_get_contents($publicKeyFile));

$backgroundProcess = new Process([
Expand Down Expand Up @@ -77,7 +81,7 @@ protected function runDockerizedSshServer($logger, ConfigurationService $config)
fwrite(STDOUT, $buffer);
});
// Give the container some time to spin up
sleep(5);
sleep(10);

return $privateKeyFile;
}
Expand Down
1 change: 1 addition & 0 deletions tests/assets/scaffolder-test/scaffold-callback.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ scaffold:
- composer init --name phabalicious/helloworld -n
- scaffold("https://config.factorial.io/scaffold/precommit-hooks/drupal/1.0/index.yml", %rootFolder%)
- mkdir %secondFolder%
- cd %secondFolder% &&composer init --name phabalicious/helloworld-2 -n
- scaffold("https://config.factorial.io/scaffold/precommit-hooks/drupal/1.0/index.yml", %secondFolder%)


0 comments on commit 04ed619

Please sign in to comment.