add test and fix describe regions
This commit is contained in:
@@ -218,7 +218,7 @@ def _get_my_ip():
|
||||
DEFINE_string('my_ip', _get_my_ip(), 'host ip address')
|
||||
DEFINE_list('region_list',
|
||||
[],
|
||||
'list of region=url pairs separated by commas')
|
||||
'list of region=fqdn pairs separated by commas')
|
||||
DEFINE_string('connection_type', 'libvirt', 'libvirt, xenapi or fake')
|
||||
DEFINE_string('aws_access_key_id', 'admin', 'AWS Access ID')
|
||||
DEFINE_string('aws_secret_access_key', 'admin', 'AWS Access Key')
|
||||
|
@@ -87,6 +87,17 @@ class CloudTestCase(test.TestCase):
|
||||
# NOTE(vish): create depends on pool, so just call helper directly
|
||||
return cloud._gen_key(self.context, self.context.user.id, name)
|
||||
|
||||
def test_describe_regions(self):
|
||||
"""Makes sure describe regions runs without raising an exception"""
|
||||
result = self.cloud.describe_regions(self.context)
|
||||
self.assertEqual(len(result['regionInfo']), 1)
|
||||
regions = FLAGS.region_list
|
||||
FLAGS.region_list = ["one=test_host1", "two=test_host2"]
|
||||
result = self.cloud.describe_regions(self.context)
|
||||
print result
|
||||
self.assertEqual(len(result['regionInfo']), 2)
|
||||
regions = FLAGS.region_list
|
||||
|
||||
def test_describe_addresses(self):
|
||||
"""Makes sure describe addresses runs without raising an exception"""
|
||||
address = "10.10.10.10"
|
||||
|
Reference in New Issue
Block a user