From 47f72e17412c98c8402e9914fada7c01ce802c82 Mon Sep 17 00:00:00 2001 From: Andrey Pavlov Date: Mon, 7 Dec 2015 14:33:47 +0300 Subject: [PATCH] fix metadata test Amazon changes key owner for imported keys. So test should check key only without onwer. Change-Id: I491b6ac1de08df28a85944b5b00347659c847136 --- scenario/test_instances.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scenario/test_instances.py b/scenario/test_instances.py index fe69570..f6e96a8 100644 --- a/scenario/test_instances.py +++ b/scenario/test_instances.py @@ -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")