Use os-cloud instead of OS env vars for functional tests
In order to support switching auth contexts, such as for registered_limits which take a system scoped token, switch the functional tests to using the --os-cloud command line parameter. However, honor the OS_CLOUD env var as a way that someone can select a different cloud, including 'envvars', to use. Use devstack-system-admin cloud for limit tests Keystone requires these to have system scope now. Change-Id: Ia81eebd3e00ae986cf3ba7e3d98f3e8a1647b622
This commit is contained in:
parent
2ab3396f19
commit
2dd5393167
@ -24,6 +24,7 @@ COMMON_DIR = os.path.dirname(os.path.abspath(__file__))
|
|||||||
FUNCTIONAL_DIR = os.path.normpath(os.path.join(COMMON_DIR, '..'))
|
FUNCTIONAL_DIR = os.path.normpath(os.path.join(COMMON_DIR, '..'))
|
||||||
ROOT_DIR = os.path.normpath(os.path.join(FUNCTIONAL_DIR, '..'))
|
ROOT_DIR = os.path.normpath(os.path.join(FUNCTIONAL_DIR, '..'))
|
||||||
EXAMPLE_DIR = os.path.join(ROOT_DIR, 'examples')
|
EXAMPLE_DIR = os.path.join(ROOT_DIR, 'examples')
|
||||||
|
ADMIN_CLOUD = os.environ.get('OS_ADMIN_CLOUD', 'devstack-admin')
|
||||||
|
|
||||||
|
|
||||||
def execute(cmd, fail_ok=False, merge_stderr=False):
|
def execute(cmd, fail_ok=False, merge_stderr=False):
|
||||||
@ -59,9 +60,11 @@ class TestCase(testtools.TestCase):
|
|||||||
delimiter_line = re.compile('^\+\-[\+\-]+\-\+$')
|
delimiter_line = re.compile('^\+\-[\+\-]+\-\+$')
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def openstack(cls, cmd, fail_ok=False):
|
def openstack(cls, cmd, cloud=ADMIN_CLOUD, fail_ok=False):
|
||||||
"""Executes openstackclient command for the given action."""
|
"""Executes openstackclient command for the given action."""
|
||||||
return execute('openstack ' + cmd, fail_ok=fail_ok)
|
return execute(
|
||||||
|
'openstack --os-cloud={cloud} '.format(cloud=cloud) +
|
||||||
|
cmd, fail_ok=fail_ok)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_openstack_configuration_value(cls, configuration):
|
def get_openstack_configuration_value(cls, configuration):
|
||||||
|
@ -19,6 +19,7 @@ from openstackclient.tests.functional import base
|
|||||||
|
|
||||||
|
|
||||||
BASIC_LIST_HEADERS = ['ID', 'Name']
|
BASIC_LIST_HEADERS = ['ID', 'Name']
|
||||||
|
SYSTEM_CLOUD = os.environ.get('OS_SYSTEM_CLOUD', 'devstack-system-admin')
|
||||||
|
|
||||||
|
|
||||||
class IdentityTests(base.TestCase):
|
class IdentityTests(base.TestCase):
|
||||||
@ -341,7 +342,8 @@ class IdentityTests(base.TestCase):
|
|||||||
'registered limit create'
|
'registered limit create'
|
||||||
' --service %(service_name)s'
|
' --service %(service_name)s'
|
||||||
' --default-limit %(default_limit)s'
|
' --default-limit %(default_limit)s'
|
||||||
' %(resource_name)s' % params
|
' %(resource_name)s' % params,
|
||||||
|
cloud=SYSTEM_CLOUD
|
||||||
)
|
)
|
||||||
items = self.parse_show(raw_output)
|
items = self.parse_show(raw_output)
|
||||||
registered_limit_id = self._extract_value_from_items('id', items)
|
registered_limit_id = self._extract_value_from_items('id', items)
|
||||||
@ -349,7 +351,8 @@ class IdentityTests(base.TestCase):
|
|||||||
if add_clean_up:
|
if add_clean_up:
|
||||||
self.addCleanup(
|
self.addCleanup(
|
||||||
self.openstack,
|
self.openstack,
|
||||||
'registered limit delete %s' % registered_limit_id
|
'registered limit delete %s' % registered_limit_id,
|
||||||
|
cloud=SYSTEM_CLOUD
|
||||||
)
|
)
|
||||||
|
|
||||||
self.assert_show_fields(items, self.REGISTERED_LIMIT_FIELDS)
|
self.assert_show_fields(items, self.REGISTERED_LIMIT_FIELDS)
|
||||||
@ -365,7 +368,8 @@ class IdentityTests(base.TestCase):
|
|||||||
registered_limit_id = self._create_dummy_registered_limit()
|
registered_limit_id = self._create_dummy_registered_limit()
|
||||||
|
|
||||||
raw_output = self.openstack(
|
raw_output = self.openstack(
|
||||||
'registered limit show %s' % registered_limit_id
|
'registered limit show %s' % registered_limit_id,
|
||||||
|
cloud=SYSTEM_CLOUD
|
||||||
)
|
)
|
||||||
items = self.parse_show(raw_output)
|
items = self.parse_show(raw_output)
|
||||||
resource_name = self._extract_value_from_items('resource_name', items)
|
resource_name = self._extract_value_from_items('resource_name', items)
|
||||||
@ -389,13 +393,17 @@ class IdentityTests(base.TestCase):
|
|||||||
' --project %(project_id)s'
|
' --project %(project_id)s'
|
||||||
' --service %(service_id)s'
|
' --service %(service_id)s'
|
||||||
' --resource-limit %(resource_limit)s'
|
' --resource-limit %(resource_limit)s'
|
||||||
' %(resource_name)s' % params
|
' %(resource_name)s' % params,
|
||||||
|
cloud=SYSTEM_CLOUD
|
||||||
)
|
)
|
||||||
items = self.parse_show(raw_output)
|
items = self.parse_show(raw_output)
|
||||||
limit_id = self._extract_value_from_items('id', items)
|
limit_id = self._extract_value_from_items('id', items)
|
||||||
|
|
||||||
if add_clean_up:
|
if add_clean_up:
|
||||||
self.addCleanup(self.openstack, 'limit delete %s' % limit_id)
|
self.addCleanup(
|
||||||
|
self.openstack, 'limit delete %s' % limit_id,
|
||||||
|
cloud=SYSTEM_CLOUD
|
||||||
|
)
|
||||||
|
|
||||||
self.assert_show_fields(items, self.LIMIT_FIELDS)
|
self.assert_show_fields(items, self.LIMIT_FIELDS)
|
||||||
return limit_id
|
return limit_id
|
||||||
|
@ -10,17 +10,22 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
|
|
||||||
from openstackclient.tests.functional.identity.v3 import common
|
from openstackclient.tests.functional.identity.v3 import common
|
||||||
|
|
||||||
|
SYSTEM_CLOUD = os.environ.get('OS_SYSTEM_CLOUD', 'devstack-system-admin')
|
||||||
|
|
||||||
|
|
||||||
class LimitTestCase(common.IdentityTests):
|
class LimitTestCase(common.IdentityTests):
|
||||||
|
|
||||||
def test_limit_create_with_service_name(self):
|
def test_limit_create_with_service_name(self):
|
||||||
registered_limit_id = self._create_dummy_registered_limit()
|
registered_limit_id = self._create_dummy_registered_limit()
|
||||||
raw_output = self.openstack(
|
raw_output = self.openstack(
|
||||||
'registered limit show %s' % registered_limit_id
|
'registered limit show %s' % registered_limit_id,
|
||||||
|
cloud=SYSTEM_CLOUD
|
||||||
)
|
)
|
||||||
items = self.parse_show(raw_output)
|
items = self.parse_show(raw_output)
|
||||||
service_id = self._extract_value_from_items('service_id', items)
|
service_id = self._extract_value_from_items('service_id', items)
|
||||||
@ -46,18 +51,24 @@ class LimitTestCase(common.IdentityTests):
|
|||||||
' --project %(project_id)s'
|
' --project %(project_id)s'
|
||||||
' --service %(service_name)s'
|
' --service %(service_name)s'
|
||||||
' --resource-limit %(resource_limit)s'
|
' --resource-limit %(resource_limit)s'
|
||||||
' %(resource_name)s' % params
|
' %(resource_name)s' % params,
|
||||||
|
cloud=SYSTEM_CLOUD
|
||||||
)
|
)
|
||||||
items = self.parse_show(raw_output)
|
items = self.parse_show(raw_output)
|
||||||
limit_id = self._extract_value_from_items('id', items)
|
limit_id = self._extract_value_from_items('id', items)
|
||||||
self.addCleanup(self.openstack, 'limit delete %s' % limit_id)
|
self.addCleanup(
|
||||||
|
self.openstack,
|
||||||
|
'limit delete %s' % limit_id,
|
||||||
|
cloud=SYSTEM_CLOUD
|
||||||
|
)
|
||||||
|
|
||||||
self.assert_show_fields(items, self.LIMIT_FIELDS)
|
self.assert_show_fields(items, self.LIMIT_FIELDS)
|
||||||
|
|
||||||
def test_limit_create_with_project_name(self):
|
def test_limit_create_with_project_name(self):
|
||||||
registered_limit_id = self._create_dummy_registered_limit()
|
registered_limit_id = self._create_dummy_registered_limit()
|
||||||
raw_output = self.openstack(
|
raw_output = self.openstack(
|
||||||
'registered limit show %s' % registered_limit_id
|
'registered limit show %s' % registered_limit_id,
|
||||||
|
cloud=SYSTEM_CLOUD
|
||||||
)
|
)
|
||||||
items = self.parse_show(raw_output)
|
items = self.parse_show(raw_output)
|
||||||
service_id = self._extract_value_from_items('service_id', items)
|
service_id = self._extract_value_from_items('service_id', items)
|
||||||
@ -80,11 +91,16 @@ class LimitTestCase(common.IdentityTests):
|
|||||||
' --project %(project_name)s'
|
' --project %(project_name)s'
|
||||||
' --service %(service_name)s'
|
' --service %(service_name)s'
|
||||||
' --resource-limit %(resource_limit)s'
|
' --resource-limit %(resource_limit)s'
|
||||||
' %(resource_name)s' % params
|
' %(resource_name)s' % params,
|
||||||
|
cloud=SYSTEM_CLOUD
|
||||||
)
|
)
|
||||||
items = self.parse_show(raw_output)
|
items = self.parse_show(raw_output)
|
||||||
limit_id = self._extract_value_from_items('id', items)
|
limit_id = self._extract_value_from_items('id', items)
|
||||||
self.addCleanup(self.openstack, 'limit delete %s' % limit_id)
|
self.addCleanup(
|
||||||
|
self.openstack,
|
||||||
|
'limit delete %s' % limit_id,
|
||||||
|
cloud=SYSTEM_CLOUD
|
||||||
|
)
|
||||||
|
|
||||||
self.assert_show_fields(items, self.LIMIT_FIELDS)
|
self.assert_show_fields(items, self.LIMIT_FIELDS)
|
||||||
registered_limit_id = self._create_dummy_registered_limit()
|
registered_limit_id = self._create_dummy_registered_limit()
|
||||||
@ -107,7 +123,8 @@ class LimitTestCase(common.IdentityTests):
|
|||||||
raw_output = self.openstack(
|
raw_output = self.openstack(
|
||||||
'registered limit set'
|
'registered limit set'
|
||||||
' %(registered_limit_id)s'
|
' %(registered_limit_id)s'
|
||||||
' --region %(region_id)s' % params
|
' --region %(region_id)s' % params,
|
||||||
|
cloud=SYSTEM_CLOUD
|
||||||
)
|
)
|
||||||
items = self.parse_show(raw_output)
|
items = self.parse_show(raw_output)
|
||||||
service_id = self._extract_value_from_items('service_id', items)
|
service_id = self._extract_value_from_items('service_id', items)
|
||||||
@ -134,17 +151,25 @@ class LimitTestCase(common.IdentityTests):
|
|||||||
' --resource-limit %(resource_limit)s'
|
' --resource-limit %(resource_limit)s'
|
||||||
' --region %(region_id)s'
|
' --region %(region_id)s'
|
||||||
' --description %(description)s'
|
' --description %(description)s'
|
||||||
' %(resource_name)s' % params
|
' %(resource_name)s' % params,
|
||||||
|
cloud=SYSTEM_CLOUD
|
||||||
)
|
)
|
||||||
items = self.parse_show(raw_output)
|
items = self.parse_show(raw_output)
|
||||||
limit_id = self._extract_value_from_items('id', items)
|
limit_id = self._extract_value_from_items('id', items)
|
||||||
self.addCleanup(self.openstack, 'limit delete %s' % limit_id)
|
self.addCleanup(
|
||||||
|
self.openstack,
|
||||||
|
'limit delete %s' % limit_id,
|
||||||
|
cloud=SYSTEM_CLOUD
|
||||||
|
)
|
||||||
|
|
||||||
self.assert_show_fields(items, self.LIMIT_FIELDS)
|
self.assert_show_fields(items, self.LIMIT_FIELDS)
|
||||||
|
|
||||||
def test_limit_show(self):
|
def test_limit_show(self):
|
||||||
limit_id = self._create_dummy_limit()
|
limit_id = self._create_dummy_limit()
|
||||||
raw_output = self.openstack('limit show %s' % limit_id)
|
raw_output = self.openstack(
|
||||||
|
'limit show %s' % limit_id,
|
||||||
|
cloud=SYSTEM_CLOUD
|
||||||
|
)
|
||||||
items = self.parse_show(raw_output)
|
items = self.parse_show(raw_output)
|
||||||
self.assert_show_fields(items, self.LIMIT_FIELDS)
|
self.assert_show_fields(items, self.LIMIT_FIELDS)
|
||||||
|
|
||||||
@ -159,7 +184,8 @@ class LimitTestCase(common.IdentityTests):
|
|||||||
raw_output = self.openstack(
|
raw_output = self.openstack(
|
||||||
'limit set'
|
'limit set'
|
||||||
' --description %(description)s'
|
' --description %(description)s'
|
||||||
' %(limit_id)s' % params
|
' %(limit_id)s' % params,
|
||||||
|
cloud=SYSTEM_CLOUD
|
||||||
)
|
)
|
||||||
items = self.parse_show(raw_output)
|
items = self.parse_show(raw_output)
|
||||||
self.assert_show_fields(items, self.LIMIT_FIELDS)
|
self.assert_show_fields(items, self.LIMIT_FIELDS)
|
||||||
@ -175,18 +201,21 @@ class LimitTestCase(common.IdentityTests):
|
|||||||
raw_output = self.openstack(
|
raw_output = self.openstack(
|
||||||
'limit set'
|
'limit set'
|
||||||
' --resource-limit %(resource_limit)s'
|
' --resource-limit %(resource_limit)s'
|
||||||
' %(limit_id)s' % params
|
' %(limit_id)s' % params,
|
||||||
|
cloud=SYSTEM_CLOUD
|
||||||
)
|
)
|
||||||
items = self.parse_show(raw_output)
|
items = self.parse_show(raw_output)
|
||||||
self.assert_show_fields(items, self.LIMIT_FIELDS)
|
self.assert_show_fields(items, self.LIMIT_FIELDS)
|
||||||
|
|
||||||
def test_limit_list(self):
|
def test_limit_list(self):
|
||||||
self._create_dummy_limit()
|
self._create_dummy_limit()
|
||||||
raw_output = self.openstack('limit list')
|
raw_output = self.openstack('limit list', cloud=SYSTEM_CLOUD)
|
||||||
items = self.parse_listing(raw_output)
|
items = self.parse_listing(raw_output)
|
||||||
self.assert_table_structure(items, self.LIMIT_LIST_HEADERS)
|
self.assert_table_structure(items, self.LIMIT_LIST_HEADERS)
|
||||||
|
|
||||||
def test_limit_delete(self):
|
def test_limit_delete(self):
|
||||||
limit_id = self._create_dummy_limit(add_clean_up=False)
|
limit_id = self._create_dummy_limit(add_clean_up=False)
|
||||||
raw_output = self.openstack('limit delete %s' % limit_id)
|
raw_output = self.openstack(
|
||||||
|
'limit delete %s' % limit_id,
|
||||||
|
cloud=SYSTEM_CLOUD)
|
||||||
self.assertEqual(0, len(raw_output))
|
self.assertEqual(0, len(raw_output))
|
||||||
|
@ -10,10 +10,14 @@
|
|||||||
# License for the specific language governing permissions and limitations
|
# License for the specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
import os
|
||||||
|
|
||||||
from tempest.lib.common.utils import data_utils
|
from tempest.lib.common.utils import data_utils
|
||||||
|
|
||||||
from openstackclient.tests.functional.identity.v3 import common
|
from openstackclient.tests.functional.identity.v3 import common
|
||||||
|
|
||||||
|
SYSTEM_CLOUD = os.environ.get('OS_SYSTEM_CLOUD', 'devstack-system-admin')
|
||||||
|
|
||||||
|
|
||||||
class RegisteredLimitTestCase(common.IdentityTests):
|
class RegisteredLimitTestCase(common.IdentityTests):
|
||||||
|
|
||||||
@ -37,7 +41,8 @@ class RegisteredLimitTestCase(common.IdentityTests):
|
|||||||
'service_id': service_id,
|
'service_id': service_id,
|
||||||
'default_limit': 10,
|
'default_limit': 10,
|
||||||
'resource_name': 'cores'
|
'resource_name': 'cores'
|
||||||
}
|
},
|
||||||
|
cloud=SYSTEM_CLOUD
|
||||||
)
|
)
|
||||||
items = self.parse_show(raw_output)
|
items = self.parse_show(raw_output)
|
||||||
registered_limit_id = self._extract_value_from_items('id', items)
|
registered_limit_id = self._extract_value_from_items('id', items)
|
||||||
@ -46,7 +51,8 @@ class RegisteredLimitTestCase(common.IdentityTests):
|
|||||||
'registered limit delete'
|
'registered limit delete'
|
||||||
' %(registered_limit_id)s' % {
|
' %(registered_limit_id)s' % {
|
||||||
'registered_limit_id': registered_limit_id
|
'registered_limit_id': registered_limit_id
|
||||||
}
|
},
|
||||||
|
cloud=SYSTEM_CLOUD
|
||||||
)
|
)
|
||||||
|
|
||||||
self.assert_show_fields(items, self.REGISTERED_LIMIT_FIELDS)
|
self.assert_show_fields(items, self.REGISTERED_LIMIT_FIELDS)
|
||||||
@ -68,7 +74,8 @@ class RegisteredLimitTestCase(common.IdentityTests):
|
|||||||
' --region %(region_id)s'
|
' --region %(region_id)s'
|
||||||
' --service %(service_name)s'
|
' --service %(service_name)s'
|
||||||
' --default-limit %(default_limit)s'
|
' --default-limit %(default_limit)s'
|
||||||
' %(resource_name)s' % params
|
' %(resource_name)s' % params,
|
||||||
|
cloud=SYSTEM_CLOUD
|
||||||
)
|
)
|
||||||
items = self.parse_show(raw_output)
|
items = self.parse_show(raw_output)
|
||||||
registered_limit_id = self._extract_value_from_items('id', items)
|
registered_limit_id = self._extract_value_from_items('id', items)
|
||||||
@ -76,7 +83,8 @@ class RegisteredLimitTestCase(common.IdentityTests):
|
|||||||
self.openstack,
|
self.openstack,
|
||||||
'registered limit delete %(registered_limit_id)s' % {
|
'registered limit delete %(registered_limit_id)s' % {
|
||||||
'registered_limit_id': registered_limit_id
|
'registered_limit_id': registered_limit_id
|
||||||
}
|
},
|
||||||
|
cloud=SYSTEM_CLOUD
|
||||||
)
|
)
|
||||||
|
|
||||||
self.assert_show_fields(items, self.REGISTERED_LIMIT_FIELDS)
|
self.assert_show_fields(items, self.REGISTERED_LIMIT_FIELDS)
|
||||||
@ -102,7 +110,8 @@ class RegisteredLimitTestCase(common.IdentityTests):
|
|||||||
raw_output = self.openstack(
|
raw_output = self.openstack(
|
||||||
'registered limit set'
|
'registered limit set'
|
||||||
' %(registered_limit_id)s'
|
' %(registered_limit_id)s'
|
||||||
' --region %(region_id)s' % params
|
' --region %(region_id)s' % params,
|
||||||
|
cloud=SYSTEM_CLOUD
|
||||||
)
|
)
|
||||||
items = self.parse_show(raw_output)
|
items = self.parse_show(raw_output)
|
||||||
self.assert_show_fields(items, self.REGISTERED_LIMIT_FIELDS)
|
self.assert_show_fields(items, self.REGISTERED_LIMIT_FIELDS)
|
||||||
@ -116,7 +125,8 @@ class RegisteredLimitTestCase(common.IdentityTests):
|
|||||||
raw_output = self.openstack(
|
raw_output = self.openstack(
|
||||||
'registered limit set'
|
'registered limit set'
|
||||||
' %(registered_limit_id)s'
|
' %(registered_limit_id)s'
|
||||||
' --description \'%(description)s\'' % params
|
' --description \'%(description)s\'' % params,
|
||||||
|
cloud=SYSTEM_CLOUD
|
||||||
)
|
)
|
||||||
items = self.parse_show(raw_output)
|
items = self.parse_show(raw_output)
|
||||||
self.assert_show_fields(items, self.REGISTERED_LIMIT_FIELDS)
|
self.assert_show_fields(items, self.REGISTERED_LIMIT_FIELDS)
|
||||||
@ -131,7 +141,8 @@ class RegisteredLimitTestCase(common.IdentityTests):
|
|||||||
raw_output = self.openstack(
|
raw_output = self.openstack(
|
||||||
'registered limit set'
|
'registered limit set'
|
||||||
' %(registered_limit_id)s'
|
' %(registered_limit_id)s'
|
||||||
' --service %(service)s' % params
|
' --service %(service)s' % params,
|
||||||
|
cloud=SYSTEM_CLOUD
|
||||||
)
|
)
|
||||||
items = self.parse_show(raw_output)
|
items = self.parse_show(raw_output)
|
||||||
self.assert_show_fields(items, self.REGISTERED_LIMIT_FIELDS)
|
self.assert_show_fields(items, self.REGISTERED_LIMIT_FIELDS)
|
||||||
@ -145,7 +156,8 @@ class RegisteredLimitTestCase(common.IdentityTests):
|
|||||||
raw_output = self.openstack(
|
raw_output = self.openstack(
|
||||||
'registered limit set'
|
'registered limit set'
|
||||||
' %(registered_limit_id)s'
|
' %(registered_limit_id)s'
|
||||||
' --default-limit %(default_limit)s' % params
|
' --default-limit %(default_limit)s' % params,
|
||||||
|
cloud=SYSTEM_CLOUD
|
||||||
)
|
)
|
||||||
items = self.parse_show(raw_output)
|
items = self.parse_show(raw_output)
|
||||||
self.assert_show_fields(items, self.REGISTERED_LIMIT_FIELDS)
|
self.assert_show_fields(items, self.REGISTERED_LIMIT_FIELDS)
|
||||||
@ -160,7 +172,8 @@ class RegisteredLimitTestCase(common.IdentityTests):
|
|||||||
raw_output = self.openstack(
|
raw_output = self.openstack(
|
||||||
'registered limit set'
|
'registered limit set'
|
||||||
' %(registered_limit_id)s'
|
' %(registered_limit_id)s'
|
||||||
' --resource-name %(resource_name)s' % params
|
' --resource-name %(resource_name)s' % params,
|
||||||
|
cloud=SYSTEM_CLOUD
|
||||||
)
|
)
|
||||||
items = self.parse_show(raw_output)
|
items = self.parse_show(raw_output)
|
||||||
self.assert_show_fields(items, self.REGISTERED_LIMIT_FIELDS)
|
self.assert_show_fields(items, self.REGISTERED_LIMIT_FIELDS)
|
||||||
@ -179,6 +192,7 @@ class RegisteredLimitTestCase(common.IdentityTests):
|
|||||||
'registered limit delete'
|
'registered limit delete'
|
||||||
' %(registered_limit_id)s' % {
|
' %(registered_limit_id)s' % {
|
||||||
'registered_limit_id': registered_limit_id
|
'registered_limit_id': registered_limit_id
|
||||||
}
|
},
|
||||||
|
cloud=SYSTEM_CLOUD
|
||||||
)
|
)
|
||||||
self.assertEqual(0, len(raw_output))
|
self.assertEqual(0, len(raw_output))
|
||||||
|
@ -1,16 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# This is a script that runs ostestr with the openrc OS_ variables sourced.
|
|
||||||
# Do not run this script unless you know what you're doing.
|
|
||||||
# For more information refer to:
|
|
||||||
# https://docs.openstack.org/python-openstackclient/latest/
|
|
||||||
|
|
||||||
# Source environment variables to kick things off
|
|
||||||
if [ -f ~stack/devstack/openrc ] ; then
|
|
||||||
source ~stack/devstack/openrc admin admin
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo 'Running tests with:'
|
|
||||||
env | grep OS
|
|
||||||
|
|
||||||
stestr run $*
|
|
6
tox.ini
6
tox.ini
@ -70,14 +70,12 @@ whitelist_externals = stestr
|
|||||||
[testenv:functional]
|
[testenv:functional]
|
||||||
setenv = OS_TEST_PATH=./openstackclient/tests/functional
|
setenv = OS_TEST_PATH=./openstackclient/tests/functional
|
||||||
passenv = OS_*
|
passenv = OS_*
|
||||||
whitelist_externals = openstackclient/tests/functional/run_stestr.sh
|
|
||||||
commands =
|
commands =
|
||||||
{toxinidir}/openstackclient/tests/functional/run_stestr.sh {posargs}
|
stestr run {posargs}
|
||||||
|
|
||||||
[testenv:functional-tips]
|
[testenv:functional-tips]
|
||||||
setenv = OS_TEST_PATH=./openstackclient/tests/functional
|
setenv = OS_TEST_PATH=./openstackclient/tests/functional
|
||||||
passenv = OS_*
|
passenv = OS_*
|
||||||
whitelist_externals = openstackclient/tests/functional/run_stestr.sh
|
|
||||||
commands =
|
commands =
|
||||||
pip install -q -U -e "git+file://{toxinidir}/../cliff#egg=cliff"
|
pip install -q -U -e "git+file://{toxinidir}/../cliff#egg=cliff"
|
||||||
pip install -q -U -e "git+file://{toxinidir}/../keystoneauth#egg=keystoneauth"
|
pip install -q -U -e "git+file://{toxinidir}/../keystoneauth#egg=keystoneauth"
|
||||||
@ -85,7 +83,7 @@ commands =
|
|||||||
pip install -q -U -e "git+file://{toxinidir}/../os-client-config#egg=os_client_config"
|
pip install -q -U -e "git+file://{toxinidir}/../os-client-config#egg=os_client_config"
|
||||||
pip install -q -U -e "git+file://{toxinidir}/../openstacksdk#egg=openstacksdk"
|
pip install -q -U -e "git+file://{toxinidir}/../openstacksdk#egg=openstacksdk"
|
||||||
pip freeze
|
pip freeze
|
||||||
{toxinidir}/openstackclient/tests/functional/run_stestr.sh {posargs}
|
stestr run {posargs}
|
||||||
|
|
||||||
[testenv:venv]
|
[testenv:venv]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user