summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Scheuring <andreas.scheuring@de.ibm.com>2017-01-17 09:53:22 +0100
committerAndreas Scheuring <andreas.scheuring@de.ibm.com>2017-01-17 15:02:39 +0100
commit345b2cd6014790f20f5c9cb35da94cf9dc814333 (patch)
tree334556f2ed933c37e44a4eb32846e9cf78d11f07
parent320a2e9cf32bbe88a2aea43985fb24ddcdcec9bb (diff)
Tests for testing config
Notes
Notes (review): Code-Review+2: Andreas Scheuring <andreas.scheuring@de.ibm.com> Workflow+1: Andreas Scheuring <andreas.scheuring@de.ibm.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Tue, 17 Jan 2017 14:29:49 +0000 Reviewed-on: https://review.openstack.org/421146 Project: openstack/os-dpm Branch: refs/heads/master
-rw-r--r--os_dpm/tests/unit/__init__.py0
-rw-r--r--os_dpm/tests/unit/config/__init__.py0
-rw-r--r--os_dpm/tests/unit/config/test_config.py36
-rw-r--r--test-requirements.txt1
4 files changed, 37 insertions, 0 deletions
diff --git a/os_dpm/tests/unit/__init__.py b/os_dpm/tests/unit/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/os_dpm/tests/unit/__init__.py
diff --git a/os_dpm/tests/unit/config/__init__.py b/os_dpm/tests/unit/config/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/os_dpm/tests/unit/config/__init__.py
diff --git a/os_dpm/tests/unit/config/test_config.py b/os_dpm/tests/unit/config/test_config.py
new file mode 100644
index 0000000..a214ef6
--- /dev/null
+++ b/os_dpm/tests/unit/config/test_config.py
@@ -0,0 +1,36 @@
1# Copyright 2017 IBM Corp. All Rights Reserved.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15
16from oslo_config import cfg
17from oslo_config.fixture import Config
18
19from os_dpm.config import config
20from os_dpm.tests import base
21
22
23class TestNetworkingDpm(base.TestCase):
24
25 def test_register_opts(self):
26 conf = Config()
27 conf.load_raw_values(group="dpm", hmc='host')
28 conf.load_raw_values(group="dpm", hmc_username='username')
29 conf.load_raw_values(group="dpm", hmc_password='password')
30 conf.load_raw_values(group="dpm", cpc_uuid='uuid')
31
32 config.register_opts()
33 self.assertEqual('host', cfg.CONF.dpm.hmc)
34 self.assertEqual('username', cfg.CONF.dpm.hmc_username)
35 self.assertEqual('password', cfg.CONF.dpm.hmc_password)
36 self.assertEqual('uuid', cfg.CONF.dpm.cpc_uuid)
diff --git a/test-requirements.txt b/test-requirements.txt
index 0977822..6fdbfce 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -7,6 +7,7 @@ hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
7coverage>=4.0 # Apache-2.0 7coverage>=4.0 # Apache-2.0
8python-subunit>=0.0.18 # Apache-2.0/BSD 8python-subunit>=0.0.18 # Apache-2.0/BSD
9sphinx!=1.3b1,<1.4,>=1.2.1 # BSD 9sphinx!=1.3b1,<1.4,>=1.2.1 # BSD
10oslo.config!=3.18.0,>=3.14.0 # Apache-2.0
10oslosphinx>=4.7.0 # Apache-2.0 11oslosphinx>=4.7.0 # Apache-2.0
11oslotest>=1.10.0 # Apache-2.0 12oslotest>=1.10.0 # Apache-2.0
12testrepository>=0.0.18 # Apache-2.0/BSD 13testrepository>=0.0.18 # Apache-2.0/BSD