diff options
author | Adrian Likins <alikins@redhat.com> | 2008-10-24 14:11:08 -0400 |
---|---|---|
committer | Adrian Likins <alikins@redhat.com> | 2008-10-24 14:11:08 -0400 |
commit | 89981413977258a3f4b28df5208a9474b5112e4d (patch) | |
tree | 292793f0dd49ad5cba88f954a4fc943b0777d72a /test/unittest | |
parent | e22199a3c8d1cb9e54d8179ffd0e9ad4a34f8947 (diff) | |
download | func-89981413977258a3f4b28df5208a9474b5112e4d.tar.gz func-89981413977258a3f4b28df5208a9474b5112e4d.tar.xz func-89981413977258a3f4b28df5208a9474b5112e4d.zip |
Fix minion module config examples. Add local "Config" class to module.
Add in all the approriate types and defaults to Config class
Update etc/Test.conf example to include everything in main. For now
we only support one stanza config files for modules.
updated test cases to test that proper values are fetched from the
config file for the "test" module
Diffstat (limited to 'test/unittest')
-rw-r--r-- | test/unittest/test_client.py | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/test/unittest/test_client.py b/test/unittest/test_client.py index 15813fb..6e6a4a1 100644 --- a/test/unittest/test_client.py +++ b/test/unittest/test_client.py @@ -154,36 +154,52 @@ class TestTest(BaseTest): def test_config(self): result = self.overlord.test.configfoo() config = result[self.th] - print config self.assert_on_fault(result) def test_config_write(self): result = self.overlord.test.config_save() config = result[self.th] - print config self.assert_on_fault(result) def test_config_set(self): result = self.overlord.test.config_set("example", 5000) config = result[self.th] - print config self.assert_on_fault(result) def test_config_get_example(self): result = self.overlord.test.config_get("example") config = result[self.th] - print config self.assert_on_fault(result) - def test_config_get(self): - result = self.overlord.test.config_get("anothersection.string") - print result + def test_config_get_string(self): + result = self.overlord.test.config_get("string_option") + option = result[self.th] + print option + assert(type(option) == type("foo")) self.assert_on_fault(result) + def test_config_get_int(self): + result = self.overlord.test.config_get("int_option") + option = result[self.th] + assert(type(option) == type(1)) + self.assert_on_fault(result) + + def test_config_get_bool(self): + result = self.overlord.test.config_get("bool_option") + option = result[self.th] + assert(type(option) == type(True)) + self.assert_on_fault(result) + + def test_config_get_float(self): + result = self.overlord.test.config_get("float_option") + option = result[self.th] + assert(type(option) == type(2.71828183)) + self.assert_on_fault(result) + def test_config_get_test(self): result = self.overlord.test.config_get_test() - print result - self.assert_on_fault(result) + self.assert_on_fault(result) + |