blob: 56aae1e97d880f0e26bd4ed2e5800ac97c842d5c [file] [log] [blame]
Marc Koderer173fc062015-08-27 14:01:42 +02001# Copyright (c) 2015 Deutsche Telekom AG
2# All Rights Reserved.
3#
4# Licensed under the Apache License, Version 2.0 (the "License"); you may
5# not use this file except in compliance with the License. You may obtain
6# a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13# License for the specific language governing permissions and limitations
14# under the License.
15
16from tempest.test_discover import plugins
17
18
19class FakePlugin(plugins.TempestPlugin):
20 expected_load_test = ["my/test/path", "/home/dir"]
Andrea Frittoli (andreaf)6d4d85a2016-06-21 17:20:31 +010021 expected_service_clients = [{'foo': 'bar'}]
Marc Koderer173fc062015-08-27 14:01:42 +020022
23 def load_tests(self):
24 return self.expected_load_test
25
26 def register_opts(self, conf):
27 return
28
29 def get_opt_lists(self):
30 return []
31
Andrea Frittoli (andreaf)6d4d85a2016-06-21 17:20:31 +010032 def get_service_clients(self):
33 return self.expected_service_clients
34
Marc Koderer173fc062015-08-27 14:01:42 +020035
36class FakeStevedoreObj(object):
37 obj = FakePlugin()
38
39 @property
40 def name(self):
41 return self._name
42
43 def __init__(self, name='Test1'):
44 self._name = name
Andrea Frittoli (andreaf)6d4d85a2016-06-21 17:20:31 +010045
46
47class FakePluginNoServiceClients(plugins.TempestPlugin):
48
49 def load_tests(self):
50 return []
51
52 def register_opts(self, conf):
53 return
54
55 def get_opt_lists(self):
56 return []
57
58
59class FakeStevedoreObjNoServiceClients(object):
60 obj = FakePluginNoServiceClients()
61
62 @property
63 def name(self):
64 return self._name
65
66 def __init__(self, name='Test2'):
67 self._name = name