From cd51adfb23da75a20e81064f6303f303069f7e48 Mon Sep 17 00:00:00 2001 From: "Joe H. Rahme" Date: Mon, 18 Jul 2016 16:39:08 +0200 Subject: [PATCH] Initial commit --- rhostest_tempest_plugin/README.rst | 6 +++ rhostest_tempest_plugin/__init__.py | 0 rhostest_tempest_plugin/config.py | 15 ++++++++ rhostest_tempest_plugin/plugin.py | 37 +++++++++++++++++++ rhostest_tempest_plugin/services/__init__.py | 0 rhostest_tempest_plugin/tests/__init__.py | 0 rhostest_tempest_plugin/tests/api/__init__.py | 0 .../tests/api/test_sample.py | 10 +++++ .../tests/scenario/__init__.py | 0 setup.cfg | 29 +++++++++++++++ setup.py | 28 ++++++++++++++ 11 files changed, 125 insertions(+) create mode 100644 rhostest_tempest_plugin/README.rst create mode 100644 rhostest_tempest_plugin/__init__.py create mode 100644 rhostest_tempest_plugin/config.py create mode 100644 rhostest_tempest_plugin/plugin.py create mode 100644 rhostest_tempest_plugin/services/__init__.py create mode 100644 rhostest_tempest_plugin/tests/__init__.py create mode 100644 rhostest_tempest_plugin/tests/api/__init__.py create mode 100644 rhostest_tempest_plugin/tests/api/test_sample.py create mode 100644 rhostest_tempest_plugin/tests/scenario/__init__.py create mode 100644 setup.cfg create mode 100644 setup.py diff --git a/rhostest_tempest_plugin/README.rst b/rhostest_tempest_plugin/README.rst new file mode 100644 index 00000000..f2c48831 --- /dev/null +++ b/rhostest_tempest_plugin/README.rst @@ -0,0 +1,6 @@ +=============================================== +Tempest Integration of RHOSTest +=============================================== + +This directory contains Tempest tests to cover the RHOSTest project. + diff --git a/rhostest_tempest_plugin/__init__.py b/rhostest_tempest_plugin/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/rhostest_tempest_plugin/config.py b/rhostest_tempest_plugin/config.py new file mode 100644 index 00000000..4dd6d055 --- /dev/null +++ b/rhostest_tempest_plugin/config.py @@ -0,0 +1,15 @@ +# Copyright 2015 +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + diff --git a/rhostest_tempest_plugin/plugin.py b/rhostest_tempest_plugin/plugin.py new file mode 100644 index 00000000..46e3b783 --- /dev/null +++ b/rhostest_tempest_plugin/plugin.py @@ -0,0 +1,37 @@ +# Copyright 2015 +# All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + + +import os + +from tempest import config +from tempest.test_discover import plugins + +from rhostest_tempest_plugin import config as project_config + + +class RHOSTempestPlugin(plugins.TempestPlugin): + def load_tests(self): + base_path = os.path.split(os.path.dirname( + os.path.abspath(__file__)))[0] + test_dir = "rhostest_tempest_plugin/tests" + full_test_dir = os.path.join(base_path, test_dir) + return full_test_dir, base_path + + def register_opts(self, conf): + pass + + def get_opt_lists(self): + pass diff --git a/rhostest_tempest_plugin/services/__init__.py b/rhostest_tempest_plugin/services/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/rhostest_tempest_plugin/tests/__init__.py b/rhostest_tempest_plugin/tests/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/rhostest_tempest_plugin/tests/api/__init__.py b/rhostest_tempest_plugin/tests/api/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/rhostest_tempest_plugin/tests/api/test_sample.py b/rhostest_tempest_plugin/tests/api/test_sample.py new file mode 100644 index 00000000..fcab2ecc --- /dev/null +++ b/rhostest_tempest_plugin/tests/api/test_sample.py @@ -0,0 +1,10 @@ +import unittest + + +class SampleTest(unittest.TestCase): + + def test_success(self): + self.assertTrue(True) + + def test_fail(self): + self.assertTrue(False) diff --git a/rhostest_tempest_plugin/tests/scenario/__init__.py b/rhostest_tempest_plugin/tests/scenario/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..3cb50e7b --- /dev/null +++ b/setup.cfg @@ -0,0 +1,29 @@ +[metadata] +name = RHOS test Plugin +summary = RHOS specific blackbox test suite +description-file = + README.rst +author = Joe Hakim Rahme +author-email = jhakimra@redhat.com +home-page = http://github.com/joehakimrahme/rhostest-plugin/ +classifier = + Environment :: OpenStack + Intended Audience :: Information Technology + Intended Audience :: System Administrators + License :: OSI Approved :: Apache Software License + Operating System :: POSIX :: Linux + Programming Language :: Python + Programming Language :: Python :: 2 + Programming Language :: Python :: 2.7 + +[global] +setup-hooks = + pbr.hooks.setup_hook + +[files] +packages = + rhos_tempest_plugin + +[entry_points] +tempest.test_plugins = + plugin_name = rhostest_tempest_plugin.plugin:RHOSTempestPlugin diff --git a/setup.py b/setup.py new file mode 100644 index 00000000..7c19e454 --- /dev/null +++ b/setup.py @@ -0,0 +1,28 @@ +# Copyright (c) 2016 Red Hat +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or +# implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import setuptools + +# In python < 2.7.4, a lazy loading of package `pbr` will break +# setuptools if some other modules registered functions in `atexit`. +# solution from: http://bugs.python.org/issue15881#msg170215 +try: + import multiprocessing # noqa +except ImportError: + pass + +setuptools.setup( + setup_requires=['pbr>=1.8'], + pbr=True)