diff options
Diffstat (limited to 'nova/tests/functional/regressions/test_bug_1843708.py')
-rw-r--r-- | nova/tests/functional/regressions/test_bug_1843708.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/nova/tests/functional/regressions/test_bug_1843708.py b/nova/tests/functional/regressions/test_bug_1843708.py index 2ae725a5eb..2eda92125b 100644 --- a/nova/tests/functional/regressions/test_bug_1843708.py +++ b/nova/tests/functional/regressions/test_bug_1843708.py @@ -15,6 +15,7 @@ from nova import context from nova import objects from nova.tests.functional import integrated_helpers +from nova.tests.unit import fake_crypto class RebuildWithKeypairTestCase(integrated_helpers._IntegratedTestBase): @@ -26,14 +27,19 @@ class RebuildWithKeypairTestCase(integrated_helpers._IntegratedTestBase): microversion = 'latest' def test_rebuild_with_keypair(self): + pub_key1 = fake_crypto.get_ssh_public_key() + keypair_req = { 'keypair': { 'name': 'test-key1', 'type': 'ssh', + 'public_key': pub_key1, }, } keypair1 = self.api.post_keypair(keypair_req) + pub_key2 = fake_crypto.get_ssh_public_key() keypair_req['keypair']['name'] = 'test-key2' + keypair_req['keypair']['public_key'] = pub_key2 keypair2 = self.api.post_keypair(keypair_req) server = self._build_server(networks='none') |