diff --git a/tobiko/shell/ssh/_config.py b/tobiko/shell/ssh/_config.py index 8e7f7e6bc..a285c4a99 100644 --- a/tobiko/shell/ssh/_config.py +++ b/tobiko/shell/ssh/_config.py @@ -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, diff --git a/tobiko/tests/unit/shell/test_ssh.py b/tobiko/tests/unit/shell/test_ssh.py index bda127796..52440d75c 100644 --- a/tobiko/tests/unit/shell/test_ssh.py +++ b/tobiko/tests/unit/shell/test_ssh.py @@ -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)