diff --git a/kuryr_tempest_plugin/plugin.py b/kuryr_tempest_plugin/plugin.py index e17d58ad..eb461f11 100644 --- a/kuryr_tempest_plugin/plugin.py +++ b/kuryr_tempest_plugin/plugin.py @@ -34,4 +34,4 @@ class KuryrTempestPlugin(plugins.TempestPlugin): group='service_available') def get_opt_lists(self): - return [('service_available', [project_config.__service_option])] + return [('service_available', [project_config.service_option])] diff --git a/kuryr_tempest_plugin/tests/base.py b/kuryr_tempest_plugin/tests/base.py new file mode 100644 index 00000000..08af6166 --- /dev/null +++ b/kuryr_tempest_plugin/tests/base.py @@ -0,0 +1,32 @@ +# Copyright 2017 Red Hat, Inc. +# +# 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 config +from tempest.lib import excpetions +import tempest.test + +CONF = config.CONF + + +class BaseKuryrTest(tempest.test.BaseTestCase): + + credentials = ['primary'] + + client_manager = clients.Manager + + @classmethod + def skip_checks(cls): + super(BaseKuryrTest, cls).skip_checks() + if not CONF.service_available.kuryr: + raise cls.skipException('Kuryr support is required') diff --git a/kuryr_tempest_plugin/tests/test_kuryr_tempest_plugin.py b/kuryr_tempest_plugin/tests/test_kuryr_tempest_plugin.py new file mode 100644 index 00000000..12baca97 --- /dev/null +++ b/kuryr_tempest_plugin/tests/test_kuryr_tempest_plugin.py @@ -0,0 +1,32 @@ +# Copyright 2017 Red Hat, Inc. +# +# 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. + + +""" +test_kuryr_tempest_plugin +---------------------------------- + +Tests for `kuryr_tempest_plugin` module. +""" + +from tempest.lib import decorators + +from kuryr_tempest_plugin.tests import base + + +class TestKuryr_tempest_plugin(base.TestCase): + + @decorators.idempotent_id('8abf6dec-37b9-43ca-95cf-b8ebecda3c8d') + def test_something(self): + pass diff --git a/requirements.txt b/requirements.txt index adff9a5d..787bd6af 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,3 +10,4 @@ six>=1.9.0 # MIT tempest>=12.2.0 # Apache-2.0 testrepository>=0.0.18 # Apache-2.0/BSD testtools>=1.4.0 # MIT +kubernetes==2.0.0 # Apache-2.0