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 <aaronzhu1121@gmail.com>
Change-Id: I116c662f1a6f5489fe06841b6a3c7a7ecccfc848
This commit is contained in:
Masayuki Igawa 2019-05-17 08:13:53 +09:00 committed by zhurong
parent d64f64fa09
commit 6f6d3ee361
8 changed files with 38 additions and 9 deletions

View File

@ -1,3 +1,3 @@
[DEFAULT] [DEFAULT]
test_path=./cyborg-tempest-plugin/tests test_path=./cyborg_tempest_plugin/tests
top_dir=./ top_dir=./

6
.zuul.yaml Normal file
View File

@ -0,0 +1,6 @@
- project:
templates:
- check-requirements
- tempest-plugin-jobs
gate:
queue: cyborg

View File

@ -11,7 +11,10 @@ Note that this is a hard requirement.
* Free software: Apache license * Free software: Apache license
* Documentation: https://docs.openstack.org/cyborg-tempest-plugin/latest * 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 * TODO

View File

@ -13,3 +13,4 @@
# License for the specific language governing permissions and limitations # License for the specific language governing permissions and limitations
# under the License. # under the License.
pass

View File

@ -16,17 +16,14 @@
import os import os
from tempest import config
from tempest.test_discover import plugins from tempest.test_discover import plugins
from cyborg-tempest-plugin_tempest_plugin import config as project_config
class CyborgTempestPlugin(plugins.TempestPlugin): class CyborgTempestPlugin(plugins.TempestPlugin):
def load_tests(self): def load_tests(self):
base_path = os.path.split(os.path.dirname( base_path = os.path.split(os.path.dirname(
os.path.abspath(__file__)))[0] 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) full_test_dir = os.path.join(base_path, test_dir)
return full_test_dir, base_path return full_test_dir, base_path

View File

@ -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

View File

@ -1,6 +1,6 @@
[metadata] [metadata]
name = cyborg-tempest-plugin name = cyborg-tempest-plugin
summary = OpenStack Acceleration Tempest Plugin summary = OpenStack Acceleration Tempest Plugin
description-file = description-file =
README.rst README.rst
author = OpenStack author = OpenStack
@ -28,7 +28,7 @@ packages =
[entry_points] [entry_points]
tempest.test_plugins = tempest.test_plugins =
plugin_name = cyborg_tempest_plugin.plugin:CyborgTempestPlugin cyborg_tempest_plugin = cyborg_tempest_plugin.plugin:CyborgTempestPlugin
[global] [global]
setup-hooks = setup-hooks =

View File

@ -5,7 +5,7 @@ skipsdist = True
[testenv] [testenv]
usedevelop = True 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 = setenv =
VIRTUAL_ENV={envdir} VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning PYTHONWARNINGS=default::DeprecationWarning