Skip to content

Commit

Permalink
fix check ssh tunnels
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrajodas committed Nov 21, 2023
1 parent 7f95041 commit 047fbd9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/phpunit/SshTunnelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ public function setUp(): void
{
parent::setUp();
$this->closeSshTunnels();
sleep(1);
}

public function testOpenTunnel(): void
Expand Down Expand Up @@ -83,7 +82,8 @@ private static function getDatabaseConfig(): array

private static function checkIfTunnelIsOpen(): bool
{
$process = new Process(['sh', '-c', 'pgrep ssh | wc -l']);
# Find open ssh tunnels
$process = new Process(['sh', '-c', 'ps aux | grep -i "ssh -p 22" | grep -v grep | wc -l']);
$process->mustRun();

$count = (int) $process->getOutput();
Expand Down

0 comments on commit 047fbd9

Please sign in to comment.