mirror of
https://github.com/hauke68/Magallanes.git
synced 2026-08-29 18:48:56 +02:00
Support colon notation in host config definition
This commit is contained in:
@@ -119,6 +119,20 @@ class RuntimeTest extends TestCase
|
||||
$this->assertEquals('-q -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no', $sshConfig['flags']);
|
||||
}
|
||||
|
||||
public function testSSHConfigPortDefinedInHostNotation()
|
||||
{
|
||||
$runtime = new Runtime();
|
||||
$runtime->setWorkingHost('223.12.24.64:1056');
|
||||
$sshConfig = $runtime->getSSHConfig();
|
||||
|
||||
$this->assertEquals('1056', $sshConfig['port']);
|
||||
|
||||
$runtime->setWorkingHost('223.12.24.64');
|
||||
$sshConfig = $runtime->getSSHConfig();
|
||||
|
||||
$this->assertEquals('22', $sshConfig['port']);
|
||||
}
|
||||
|
||||
public function testSSHConfigEmptyOptions()
|
||||
{
|
||||
$runtime = new Runtime();
|
||||
|
||||
Reference in New Issue
Block a user