From 6f6d3ee3610a49d91de3b04da575b72cbc010160 Mon Sep 17 00:00:00 2001 From: Masayuki Igawa Date: Fri, 17 May 2019 08:13:53 +0900 Subject: [PATCH] Enable plugin list feature and add gate job to merge patches This commit enables to run `tempest list-plugins` and `tox -e py37` successfully. This makes the tempest plugin sanity job pass, too. And this commit also fixes README.rst tiny errors to pass the gate check. Also add the gate job, this can make merge patches. Co-Authored-By: zhurong Change-Id: I116c662f1a6f5489fe06841b6a3c7a7ecccfc848 --- .stestr.conf | 2 +- .zuul.yaml | 6 ++++++ README.rst | 5 ++++- cyborg_tempest_plugin/config.py | 1 + cyborg_tempest_plugin/plugin.py | 5 +---- cyborg_tempest_plugin/tests/test_dummy.py | 22 ++++++++++++++++++++++ setup.cfg | 4 ++-- tox.ini | 2 +- 8 files changed, 38 insertions(+), 9 deletions(-) create mode 100644 .zuul.yaml create mode 100644 cyborg_tempest_plugin/tests/test_dummy.py diff --git a/.stestr.conf b/.stestr.conf index c63e547..b6b034e 100644 --- a/.stestr.conf +++ b/.stestr.conf @@ -1,3 +1,3 @@ [DEFAULT] -test_path=./cyborg-tempest-plugin/tests +test_path=./cyborg_tempest_plugin/tests top_dir=./ diff --git a/.zuul.yaml b/.zuul.yaml new file mode 100644 index 0000000..63e23fa --- /dev/null +++ b/.zuul.yaml @@ -0,0 +1,6 @@ +- project: + templates: + - check-requirements + - tempest-plugin-jobs + gate: + queue: cyborg diff --git a/README.rst b/README.rst index be42da1..d4eb11a 100644 --- a/README.rst +++ b/README.rst @@ -11,7 +11,10 @@ Note that this is a hard requirement. * Free software: Apache license * Documentation: https://docs.openstack.org/cyborg-tempest-plugin/latest -* Source: https://git.openstack.org/cgit/cyborg/cyborg-tempest-plugin* Bugs: https://storyboard.openstack.org/#!/project/968Features +* Source: https://git.openstack.org/cgit/cyborg/cyborg-tempest-plugin +* Bugs: https://storyboard.openstack.org/#!/project/968 + +Features -------- * TODO diff --git a/cyborg_tempest_plugin/config.py b/cyborg_tempest_plugin/config.py index 4dd6d05..c8954d5 100644 --- a/cyborg_tempest_plugin/config.py +++ b/cyborg_tempest_plugin/config.py @@ -13,3 +13,4 @@ # License for the specific language governing permissions and limitations # under the License. +pass diff --git a/cyborg_tempest_plugin/plugin.py b/cyborg_tempest_plugin/plugin.py index e22d963..4b2c74c 100644 --- a/cyborg_tempest_plugin/plugin.py +++ b/cyborg_tempest_plugin/plugin.py @@ -16,17 +16,14 @@ import os -from tempest import config from tempest.test_discover import plugins -from cyborg-tempest-plugin_tempest_plugin import config as project_config - class CyborgTempestPlugin(plugins.TempestPlugin): def load_tests(self): base_path = os.path.split(os.path.dirname( os.path.abspath(__file__)))[0] - test_dir = "cyborg-tempest-plugin_tempest_plugin/tests" + test_dir = "cyborg_tempest_plugin/tests" full_test_dir = os.path.join(base_path, test_dir) return full_test_dir, base_path diff --git a/cyborg_tempest_plugin/tests/test_dummy.py b/cyborg_tempest_plugin/tests/test_dummy.py new file mode 100644 index 0000000..b9b79ac --- /dev/null +++ b/cyborg_tempest_plugin/tests/test_dummy.py @@ -0,0 +1,22 @@ +# Copyright 2018 Rackspace US Inc. 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. + +from tempest import test + + +class DummyTest(test.BaseTestCase): + """Dummy tests.""" + + def test_dummy(self): + pass diff --git a/setup.cfg b/setup.cfg index 32cfa12..701da16 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = cyborg-tempest-plugin -summary = OpenStack Acceleration Tempest Plugin +summary = OpenStack Acceleration Tempest Plugin description-file = README.rst author = OpenStack @@ -28,7 +28,7 @@ packages = [entry_points] tempest.test_plugins = - plugin_name = cyborg_tempest_plugin.plugin:CyborgTempestPlugin + cyborg_tempest_plugin = cyborg_tempest_plugin.plugin:CyborgTempestPlugin [global] setup-hooks = diff --git a/tox.ini b/tox.ini index 2d29457..efdb0b5 100644 --- a/tox.ini +++ b/tox.ini @@ -5,7 +5,7 @@ skipsdist = True [testenv] usedevelop = True -install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/plain/upper-constraints.txt} {opts} {packages} +install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt} {opts} {packages} setenv = VIRTUAL_ENV={envdir} PYTHONWARNINGS=default::DeprecationWarning