Architecture evolution skeleton 69/24469/2
authorYujun Zhang <zhang.yujunz@zte.com.cn>
Thu, 17 Nov 2016 05:52:03 +0000 (13:52 +0800)
committerYujun Zhang <zhang.yujunz@zte.com.cn>
Mon, 21 Nov 2016 02:36:52 +0000 (10:36 +0800)
- 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 <zhang.yujunz@zte.com.cn>
31 files changed:
qtip/runner/__init__.py [new file with mode: 0644]
qtip/runner/perftest.py [new file with mode: 0644]
qtip/runner/suite.py [new file with mode: 0644]
qtip/runner/test_plan.py [new file with mode: 0644]
tests/__init__.py [new file with mode: 0644]
tests/data/output/hosts [moved from tests/output/hosts with 100% similarity]
tests/data/schema/test_bm_schema.yaml [moved from tests/schema/test_bm_schema.yaml with 100% similarity]
tests/data/schema/test_vm_schema.yaml [moved from tests/schema/test_vm_schema.yaml with 100% similarity]
tests/data/test_plan/bm_ping.yaml [moved from tests/test_case/bm_ping.yaml with 100% similarity]
tests/data/test_plan/bm_with_proxy.yaml [moved from tests/test_case/bm_with_proxy.yaml with 100% similarity]
tests/data/test_plan/bm_without_proxy.yaml [moved from tests/test_case/bm_without_proxy.yaml with 100% similarity]
tests/data/test_plan/vm.yaml [moved from tests/test_case/vm.yaml with 100% similarity]
tests/data/test_plan/vm_error.yaml [moved from tests/test_case/vm_error.yaml with 100% similarity]
tests/functional/__init__.py [new file with mode: 0644]
tests/functional/yaml_schema_test.py [moved from tests/yaml_schema_test.py with 100% similarity]
tests/unit/__init__.py [new file with mode: 0644]
tests/unit/api/__init__.py [new file with mode: 0644]
tests/unit/api/qtip_server_test.py [moved from tests/qtip_server_test.py with 100% similarity]
tests/unit/cli/__init__.py [new file with mode: 0644]
tests/unit/runner/__init__.py [new file with mode: 0644]
tests/unit/runner/perftest_test.py [new file with mode: 0644]
tests/unit/runner/suite_test.py [new file with mode: 0644]
tests/unit/runner/test_plan_test.py [new file with mode: 0644]
tests/unit/utils/__init__.py [new file with mode: 0644]
tests/unit/utils/ansible_api_test.py [moved from tests/ansible_api_test.py with 100% similarity]
tests/unit/utils/args_handler_test.py [moved from tests/args_handler_test.py with 100% similarity]
tests/unit/utils/cli_test.py [moved from tests/cli_test.py with 100% similarity]
tests/unit/utils/create_zones_test.py [moved from tests/create_zones_test.py with 100% similarity]
tests/unit/utils/driver_test.py [moved from tests/driver_test.py with 100% similarity]
tests/unit/utils/env_setup_test.py [moved from tests/env_setup_test.py with 100% similarity]
tests/unit/utils/spawn_vm_test.py [moved from tests/spawn_vm_test.py with 100% similarity]

diff --git a/qtip/runner/__init__.py b/qtip/runner/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/qtip/runner/perftest.py b/qtip/runner/perftest.py
new file mode 100644 (file)
index 0000000..835f2a8
--- /dev/null
@@ -0,0 +1,27 @@
+##############################################################################
+# 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
+##############################################################################
+
+
+class PerfTest:
+    """A perf test collects raw performance metrics by running test tools"""
+
+    def __init__(self):
+        pass
+
+    @staticmethod
+    def list_all():
+        """list all available perf tests"""
+        pass
+
+    def desc(self):
+        """description of the perf test"""
+        pass
+
+    def run(self):
+        pass
diff --git a/qtip/runner/suite.py b/qtip/runner/suite.py
new file mode 100644 (file)
index 0000000..f0f2f63
--- /dev/null
@@ -0,0 +1,28 @@
+##############################################################################
+# 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
+##############################################################################
+
+
+class Suite:
+    """A suite is consist of one or several perf tests and produces one QPI"""
+
+    def __init__(self):
+        pass
+
+    @staticmethod
+    def list_all():
+        """list all available suites"""
+        pass
+
+    def desc(self):
+        """description of the suite"""
+        pass
+
+    def run(self):
+        """run included perftests in the suite"""
+        pass
diff --git a/qtip/runner/test_plan.py b/qtip/runner/test_plan.py
new file mode 100644 (file)
index 0000000..d20221d
--- /dev/null
@@ -0,0 +1,28 @@
+##############################################################################
+# 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
+##############################################################################
+
+
+class TestPlan:
+    """A test plan is consist of test configuration and selected test suites"""
+
+    def __init__(self):
+        pass
+
+    @staticmethod
+    def list_all():
+        """list all available test plans"""
+        pass
+
+    def desc(self):
+        """description of the test plan"""
+        pass
+
+    def run(self):
+        """run included suites"""
+        pass
diff --git a/tests/__init__.py b/tests/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
similarity index 100%
rename from tests/output/hosts
rename to tests/data/output/hosts
diff --git a/tests/functional/__init__.py b/tests/functional/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/unit/api/__init__.py b/tests/unit/api/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/unit/cli/__init__.py b/tests/unit/cli/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/unit/runner/__init__.py b/tests/unit/runner/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/tests/unit/runner/perftest_test.py b/tests/unit/runner/perftest_test.py
new file mode 100644 (file)
index 0000000..798afad
--- /dev/null
@@ -0,0 +1,13 @@
+##############################################################################
+# 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
+##############################################################################
+
+
+class TestPerfTest:
+    def test_list(self):
+        assert True
diff --git a/tests/unit/runner/suite_test.py b/tests/unit/runner/suite_test.py
new file mode 100644 (file)
index 0000000..a2023cf
--- /dev/null
@@ -0,0 +1,13 @@
+##############################################################################
+# 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
+##############################################################################
+
+
+class TestSuite:
+    def test_list(self):
+        assert True
diff --git a/tests/unit/runner/test_plan_test.py b/tests/unit/runner/test_plan_test.py
new file mode 100644 (file)
index 0000000..81f618c
--- /dev/null
@@ -0,0 +1,13 @@
+##############################################################################
+# 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
+##############################################################################
+
+
+class TestTestPlan:
+    def test_list(self):
+        assert True
diff --git a/tests/unit/utils/__init__.py b/tests/unit/utils/__init__.py
new file mode 100644 (file)
index 0000000..e69de29