summaryrefslogtreecommitdiff
path: root/functional
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-07-30 20:39:04 +0000
committerGerrit Code Review <review@openstack.org>2015-07-30 20:39:04 +0000
commit3a6cb4920036895edd4aaf001c74ebe48b6c1914 (patch)
treed243fc221da05add15286c22b00871224f2fb0b6 /functional
parent811ed669ad45f72d5c0973fa84b5b8f9876c4905 (diff)
parent235cd227bd3d7e47f4e0b5743c5cee4f8f70de08 (diff)
downloadpython-openstackclient-3a6cb4920036895edd4aaf001c74ebe48b6c1914.tar.gz
Merge "New test for configuration show --mask"
Diffstat (limited to 'functional')
-rw-r--r--functional/tests/common/test_configuration.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/functional/tests/common/test_configuration.py b/functional/tests/common/test_configuration.py
index 94a624d2..f4a02099 100644
--- a/functional/tests/common/test_configuration.py
+++ b/functional/tests/common/test_configuration.py
@@ -13,19 +13,26 @@
import os
from functional.common import test
+from openstackclient.common import configuration
+
BASIC_CONFIG_HEADERS = ['Field', 'Value']
class ConfigurationTests(test.TestCase):
+ opts = "-f value -c auth.password"
+
def test_configuration_show(self):
raw_output = self.openstack('configuration show')
items = self.parse_listing(raw_output)
self.assert_table_structure(items, BASIC_CONFIG_HEADERS)
def test_configuration_show_unmask(self):
- opts = "-f value -c auth.password"
- raw_output = self.openstack('configuration show --unmask ' + opts)
+ raw_output = self.openstack('configuration show --unmask ' + self.opts)
passwd = os.environ['OS_PASSWORD']
self.assertOutput(passwd + '\n', raw_output)
+
+ def test_configuration_show_mask(self):
+ raw_output = self.openstack('configuration show --mask ' + self.opts)
+ self.assertOutput(configuration.REDACTED + '\n', raw_output)