summaryrefslogtreecommitdiffstats
path: root/tests/prepare/test_execute.py
diff options
context:
space:
mode:
authorzhongjun <zhong.jun@zte.com.cn>2017-08-30 14:30:26 +0800
committerzhongjun <zhong.jun@zte.com.cn>2017-08-30 16:06:52 +0800
commit91b18eadfb2ca83d9291281210342dfefa7694b2 (patch)
tree41b2563e1c6e925b10ac3fffeda9d05b46bfb895 /tests/prepare/test_execute.py
parent1cf9f49c5167d7bbf4969ed9146599c73a73fbcc (diff)
Add some test case in test_post_execute.py
1.add some test case in test_post_execute.py. 2.rename test_execute.py to test_prepare_execute.py and add clearup handle in test function. Change-Id: I1ed27ce6f0a5ba8bbd56544ae8d53e14f7daa9ea Signed-off-by: zhongjun <zhong.jun@zte.com.cn>
Diffstat (limited to 'tests/prepare/test_execute.py')
-rw-r--r--tests/prepare/test_execute.py55
1 files changed, 0 insertions, 55 deletions
diff --git a/tests/prepare/test_execute.py b/tests/prepare/test_execute.py
deleted file mode 100644
index 6eb27025..00000000
--- a/tests/prepare/test_execute.py
+++ /dev/null
@@ -1,55 +0,0 @@
-##############################################################################
-# Copyright (c) 2017 ZTE Corp and others.
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-##############################################################################
-
-import os
-import pytest
-
-import deploy.prepare.execute
-from deploy.prepare.execute import (
- _set_qemu_compute,
- _set_default_floating_pool,
- _set_trusts_auth
-)
-
-deploy.prepare.execute.KOLLA_CONF_PATH = '/tmp'
-
-
-@pytest.fixture(scope="module")
-def kolla_conf_file_nov_path():
- return os.path.join(deploy.prepare.execute.KOLLA_CONF_PATH, 'nova')
-
-
-@pytest.fixture(scope="module")
-def kolla_conf_file_heat_dir():
- return os.path.join(deploy.prepare.execute.KOLLA_CONF_PATH, 'heat')
-
-
-@pytest.fixture(scope="module")
-def conf_file_dir(data_root):
- return os.path.join(data_root, 'lab_conf')
-
-
-def test__set_qemu_compute(kolla_conf_file_nov_path):
- _set_qemu_compute()
- exp_conf_file = os.path.join(kolla_conf_file_nov_path, 'nova-compute.conf')
- assert os.path.isfile(exp_conf_file)
-
-
-def test__set_default_floating_pool(kolla_conf_file_nov_path, conf_file_dir):
- network_conf_file = os.path.join(conf_file_dir, 'network_virtual1.yml')
- _set_default_floating_pool(network_conf_file)
- exp_conf_file = os.path.join(kolla_conf_file_nov_path, 'nova-api.conf')
- assert os.path.isfile(exp_conf_file)
-
-
-def test__set_trusts_auth(kolla_conf_file_heat_dir):
- _set_trusts_auth()
- exp_conf_file_1 = os.path.join(kolla_conf_file_heat_dir, 'heat-api.conf')
- exp_conf_file_2 = os.path.join(kolla_conf_file_heat_dir, 'heat-engine.conf')
- assert (os.path.isfile(exp_conf_file_1) and os.path.isfile(exp_conf_file_2))