Merge "Fix test_ssh after Include directive is being ignored."
This commit is contained in:
commit
3ade57be61
|
@ -82,7 +82,10 @@ class SSHConfigFixture(tobiko.SharedFixture):
|
|||
def lookup(self, host=None):
|
||||
host_config = host and self.config.lookup(host) or {}
|
||||
# remove unsupported directive
|
||||
host_config.pop('include', None)
|
||||
include_files = host_config.pop('include', None)
|
||||
if include_files:
|
||||
LOG.warning('Ignoring unsupported directive: Include %s',
|
||||
include_files)
|
||||
return SSHHostConfig(host=host,
|
||||
ssh_config=self,
|
||||
host_config=host_config,
|
||||
|
|
|
@ -62,6 +62,7 @@ class SSHClientFixtureTest(unit.TobikoUnitTest):
|
|||
with open(ssh_config_file) as f:
|
||||
ssh_config.parse(f)
|
||||
expected_host_config = ssh_config.lookup(fixture.host)
|
||||
expected_host_config.pop('include', None)
|
||||
self.assertEqual(fixture.host, fixture.host_config.host)
|
||||
self.assertEqual(expected_host_config,
|
||||
fixture.host_config.host_config)
|
||||
|
|
Loading…
Reference in New Issue