Merge "Correct host_key setting in statemachine driver"

This commit is contained in:
Zuul 2021-12-09 02:33:55 +00:00 committed by Gerrit Code Review
commit 0b6eb8e2c9
2 changed files with 2 additions and 1 deletions

View File

@ -165,7 +165,7 @@ class StateMachineNodeLauncher(stats.StatsReporter):
if (self.state_machine.complete and self.keyscan_future
and self.keyscan_future.done()):
keys = self.keyscan_future.result()
node.keys = keys
node.host_keys = keys
self.log.debug(f"Node {node.id} is ready")
node.state = zk.READY
self.zk.storeNode(node)

View File

@ -57,6 +57,7 @@ class TestDriverAzure(tests.DBTestCase):
self.assertEqual(node.shell_type, 'sh')
self.assertEqual(node.attributes,
{'key1': 'value1', 'key2': 'value2'})
self.assertEqual(node.host_keys, ['ssh-rsa FAKEKEY'])
def test_azure_diskimage(self):
configfile = self.setup_config(