Hello,
As I'm consolidating test job configuration, I learned that the line
    no_dns: False
in WebUI test config has the same effect as `no_dns: True`. This is confusing, and it complicates generating the config.

Patch is untested because I don't have the WebUI test environment set up locally. Petr, could you check if it works?

--
PetrĀ³
From ff7581fd58701d3effb02dd5cc18f1f43491f17b Mon Sep 17 00:00:00 2001
From: Petr Viktorin <pvikt...@redhat.com>
Date: Fri, 6 Dec 2013 16:39:06 +0100
Subject: [PATCH] test_webui: Allow False values in configuration for no_ca,
 no_dns, has_trusts

The driver only checked if the corresponding value was in the config, so
    no_dns: False
had the same effect as
    no_dns: True

Change the check to take the value into consideration.

This makes false-y values like False (from YAML) and empty string
(from environment) work as if the value was not specified.
---
 ipatests/test_webui/ui_driver.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ipatests/test_webui/ui_driver.py b/ipatests/test_webui/ui_driver.py
index 1c396b6d389f2672b1d36f8c71361a3c84afcce7..cf95a8cdf6a9012cf194487b7cb5eaf7e4676f92 100644
--- a/ipatests/test_webui/ui_driver.py
+++ b/ipatests/test_webui/ui_driver.py
@@ -241,19 +241,19 @@ def has_ca(self):
         """
         FreeIPA server was installed with CA.
         """
-        return 'no_ca' not in self.config
+        return not self.config.get('no_ca')
 
     def has_dns(self):
         """
         FreeIPA server was installed with DNS.
         """
-        return 'no_dns' not in self.config
+        return not self.config.get('no_dns')
 
     def has_trusts(self):
         """
         FreeIPA server was installed with Trusts.
         """
-        return 'has_trusts' in self.config
+        return self.config.get('has_trusts')
 
     def has_active_request(self):
         """
-- 
1.8.3.1

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to