summaryrefslogtreecommitdiffstats
path: root/testcases/OpenStack
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2016-08-23 14:27:51 +0800
committerMorgan Richomme <morgan.richomme@orange.com>2016-08-23 12:24:06 +0000
commit777ea60355095a13bbad23ee33197b2815957969 (patch)
treef7ab1aac20bed93d550f786ef82195c740151683 /testcases/OpenStack
parente85b75eb3b9cba6b63dba2c17dfdbbdd25026102 (diff)
when create/get/update failed return None rather than False
In openstack_util.py, when create/get/update network or other resources failed, False is returned, which is incompatible with success return value such as id, network_nic. JIRA: FUNCTEST-427 Change-Id: Id2f55d8524e5aff150ba6bfb799085377a63baa4 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn> (cherry picked from commit 3e95a1cd0721924e89e2cfd2960d4736bc6c5588)
Diffstat (limited to 'testcases/OpenStack')
-rwxr-xr-xtestcases/OpenStack/tempest/run_tempest.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/testcases/OpenStack/tempest/run_tempest.py b/testcases/OpenStack/tempest/run_tempest.py
index 7d023f5df..64a5ed778 100755
--- a/testcases/OpenStack/tempest/run_tempest.py
+++ b/testcases/OpenStack/tempest/run_tempest.py
@@ -132,12 +132,12 @@ def create_tempest_resources():
tenant_id = os_utils.create_tenant(keystone_client,
TENANT_NAME,
TENANT_DESCRIPTION)
- if tenant_id == '':
+ if not tenant_id:
logger.error("Error : Failed to create %s tenant" % TENANT_NAME)
user_id = os_utils.create_user(keystone_client, USER_NAME, USER_PASSWORD,
None, tenant_id)
- if user_id == '':
+ if not user_id:
logger.error("Error : Failed to create %s user" % USER_NAME)
logger.debug("Creating private network for Tempest suite")