From Yaniv Bronhaim <ybronhei(a)redhat.com>:
Yaniv Bronhaim has uploaded a new change for review.
Change subject: Adding libvirt_sasl_isconfigured test
......................................................................
Adding libvirt_sasl_isconfigured test
This test checks if isconfigured works as expected. for latest libvirt
configure, the isconfigured should check for specific string in the
sasl2 conf file. The test validates that.
Change-Id: Ifb7aa1dfd579e2e0bf6493c06c164b6a42626d3f
Signed-off-by: Yaniv Bronhaim <ybronhei(a)redhat.com>
---
M tests/tool_test.py
1 file changed, 17 insertions(+), 0 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/06/77506/1
diff --git a/tests/tool_test.py b/tests/tool_test.py
index 901b17b..a9ce0ef 100644
--- a/tests/tool_test.py
+++ b/tests/tool_test.py
@@ -23,6 +23,7 @@
from vdsm.tool.configfile import ConfigFile, ParserWrapper
from vdsm.tool.configurators import abrt
from vdsm.tool.configurators import libvirt
+from vdsm.tool.configurators import passwd
from vdsm.tool import UsageError
from vdsm.tool import upgrade
import monkeypatch
@@ -95,6 +96,22 @@
dict((m.name, m) for m in mockConfigurers))
+class PasswdConfiguratorTest(VdsmTestCase):
+ def testCheckIsConfigured(self):
+ first = tempfile.mktemp()
+ second = tempfile.mktemp()
+ with open(first, 'w') as f:
+ f.write("\n")
+ f.write("\n")
+ f.write("mech_list: gssapi\n")
+ with open(second, 'w') as f:
+ f.write("\n")
+ passwd._SASL2_CONF = first
+ self.assertEqual(passwd.libvirt_sasl_isconfigured(), NO)
+ passwd._SASL2_CONF = second
+ self.assertEqual(passwd.libvirt_sasl_isconfigured(), MAYBE)
+
+
@expandPermutations
class PatchConfiguratorsTests(VdsmTestCase):
--
To view, visit
https://gerrit.ovirt.org/77506
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifb7aa1dfd579e2e0bf6493c06c164b6a42626d3f
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <ybronhei(a)redhat.com>