summaryrefslogtreecommitdiffstats
path: root/tests/args_handler_test.py
diff options
context:
space:
mode:
authorzhifeng.jiang <jiang.zhifeng@zte.com.cn>2016-09-04 10:03:03 +0800
committerzhifeng jiang <jiang.zhifeng@zte.com.cn>2016-09-08 11:23:35 +0000
commit6612d7c20e329cd5b133a41a6b35c67539f3369b (patch)
tree9d977adb46d347b980b0f49756e5607907d346fe /tests/args_handler_test.py
parentcf0b4338abd0dc4f8a835440db7c662a37e92911 (diff)
Remove os environment in driver.py so that it can be called by restful server
modification: Change os environments to parameters in driver.py Pass the parameters in cli.py and arg_handler.py JIRA:QTIP-97 Change-Id: Id67acb7e0ac46fa9e0e32481e947055b6d37dd95 Signed-off-by: zhifeng.jiang <jiang.zhifeng@zte.com.cn>
Diffstat (limited to 'tests/args_handler_test.py')
-rw-r--r--tests/args_handler_test.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/args_handler_test.py b/tests/args_handler_test.py
index 7f977f21..ebf500f3 100644
--- a/tests/args_handler_test.py
+++ b/tests/args_handler_test.py
@@ -13,8 +13,8 @@ import func.args_handler
class TestClass:
@pytest.mark.parametrize("test_input, expected", [
- ('./test_cases/zte-pod1/network/iperf_bm.yaml',
- ["iperf",
+ (['fuel', '/home', './test_cases/zte-pod1/network/iperf_bm.yaml'],
+ ['fuel', '/home', "iperf",
[('1-server', ['10.20.0.23']), ('2-host', ['10.20.0.24'])],
"iperf_bm.yaml",
[('duration', 20), ('protocol', 'tcp'), ('bandwidthGbps', 10)],
@@ -29,7 +29,7 @@ class TestClass:
mock_env_setup_ssh, mock_update_ansible, test_input, expected):
mock_ips = mock.Mock(return_value=["10.20.0.23", "10.20.0.24"])
func.args_handler.Env_setup.fetch_compute_ips = mock_ips
- func.args_handler.prepare_and_run_benchmark(test_input)
+ func.args_handler.prepare_and_run_benchmark(test_input[0], test_input[1], test_input[2])
call = mock_driver.call_args
call_args, call_kwargs = call
assert sorted(map(sorted, call_args)) == sorted(map(sorted, expected))