fix metadata test

Amazon changes key owner for imported keys.
So test should check key only without onwer.

Change-Id: I491b6ac1de08df28a85944b5b00347659c847136
This commit is contained in:
Andrey Pavlov 2015-12-07 14:33:47 +03:00
parent 52fd166045
commit 47f72e1741
1 changed files with 2 additions and 1 deletions

View File

@ -106,7 +106,8 @@ class InstancesTest(scenario_base.BaseScenarioTest):
data = ssh_client.exec_command(
'curl %s/latest/meta-data/public-keys/0/openssh-key' % url)
self.assertEqual(PUBLIC_KEY_MATERIAL, data)
# compare only keys. without 'sha-rsa' and owner
self.assertEqual(PUBLIC_KEY_MATERIAL.split()[1], data.split()[1])
@testtools.skipUnless(CONF.aws.run_ssh, 'SSH tests are disabled.')
@testtools.skipUnless(CONF.aws.image_id, "image id is not defined")