From 539405270b57a5ee7409a164a38b9fdb0b3624e7 Mon Sep 17 00:00:00 2001 From: Yujun Zhang Date: Thu, 17 Nov 2016 13:52:03 +0800 Subject: Architecture evolution skeleton - benchmarks will be driven by qtip.runner - qtip.runner is used by both qtip.cli and qtip.api - unit test for each module will be placed under tests/unit - functional tests will be moved to tests/functional - data as testing sample will be moved to tests/data NOTE: this patch moves files only, it may fails many tests. To be followed up in next step. JIRA: QTIP-148 Change-Id: I27e8169a74783970a1f7818456eb76a7311fb60c Signed-off-by: Yujun Zhang --- tests/unit/utils/ansible_api_test.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/unit/utils/ansible_api_test.py (limited to 'tests/unit/utils/ansible_api_test.py') diff --git a/tests/unit/utils/ansible_api_test.py b/tests/unit/utils/ansible_api_test.py new file mode 100644 index 00000000..6b1afb44 --- /dev/null +++ b/tests/unit/utils/ansible_api_test.py @@ -0,0 +1,19 @@ +############################################################################## +# Copyright (c) 2016 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 +############################################################################## +from qtip.utils.ansible_api import AnsibleApi + + +class TestClass: + def test_call_ansible_api_success(self): + ansible_api = AnsibleApi() + ret = ansible_api.execute_playbook('tests/data/hosts', + 'tests/data/test.yml', + 'config/QtipKey', + {'keys': 'test'}) + assert ret == 3 -- cgit 1.2.3-korg