mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #45218 from gtmanfred/oxygen
fix up rackspace/openstack cloud test
This commit is contained in:
commit
70ccdef729
1 changed files with 9 additions and 9 deletions
|
@ -18,10 +18,10 @@ from salt.config import cloud_providers_config
|
|||
|
||||
# Import Third-Party Libs
|
||||
try:
|
||||
import libcloud # pylint: disable=unused-import
|
||||
HAS_LIBCLOUD = True
|
||||
import shade # pylint: disable=unused-import
|
||||
HAS_SHADE = True
|
||||
except ImportError:
|
||||
HAS_LIBCLOUD = False
|
||||
HAS_SHADE = False
|
||||
|
||||
# Create the cloud instance name to be used throughout the tests
|
||||
INSTANCE_NAME = generate_random_name('CLOUD-TEST-')
|
||||
|
@ -29,7 +29,7 @@ PROVIDER_NAME = 'rackspace'
|
|||
DRIVER_NAME = 'openstack'
|
||||
|
||||
|
||||
@skipIf(HAS_LIBCLOUD is False, 'salt-cloud requires >= libcloud 0.13.2')
|
||||
@skipIf(HAS_SHADE is False, 'openstack driver requires `shade`')
|
||||
class RackspaceTest(ShellCase):
|
||||
'''
|
||||
Integration tests for the Rackspace cloud provider using the Openstack driver
|
||||
|
@ -62,12 +62,12 @@ class RackspaceTest(ShellCase):
|
|||
)
|
||||
)
|
||||
|
||||
user = config[profile_str][DRIVER_NAME]['user']
|
||||
tenant = config[profile_str][DRIVER_NAME]['tenant']
|
||||
api = config[profile_str][DRIVER_NAME]['apikey']
|
||||
if api == '' or tenant == '' or user == '':
|
||||
region_name = config[profile_str][DRIVER_NAME].get('region_name')
|
||||
auth = config[profile_str][DRIVER_NAME].get('auth')
|
||||
cloud = config[profile_str][DRIVER_NAME].get('cloud')
|
||||
if region_name and (auth or cloud):
|
||||
self.skipTest(
|
||||
'A user, tenant, and an api key must be provided to run these '
|
||||
'A region_name and (auth or cloud) must be provided to run these '
|
||||
'tests. Check tests/integration/files/conf/cloud.providers.d/{0}.conf'
|
||||
.format(PROVIDER_NAME)
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue