You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by br...@apache.org on 2016/01/15 19:49:02 UTC

[8/8] allura git commit: [#8039] always fail if validation is on and fails

[#8039] always fail if validation is on and fails


Project: http://git-wip-us.apache.org/repos/asf/allura/repo
Commit: http://git-wip-us.apache.org/repos/asf/allura/commit/db13668d
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/db13668d
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/db13668d

Branch: refs/heads/db/8039
Commit: db13668d549df3b4d6f541db3e82ba3bbc0531c7
Parents: 9dd662c
Author: Dave Brondsema <da...@brondsema.net>
Authored: Thu Jan 14 22:06:38 2016 -0500
Committer: Dave Brondsema <da...@brondsema.net>
Committed: Fri Jan 15 13:41:11 2016 -0500

----------------------------------------------------------------------
 AlluraTest/alluratest/validation.py | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/allura/blob/db13668d/AlluraTest/alluratest/validation.py
----------------------------------------------------------------------
diff --git a/AlluraTest/alluratest/validation.py b/AlluraTest/alluratest/validation.py
index 803f489..95479bd 100644
--- a/AlluraTest/alluratest/validation.py
+++ b/AlluraTest/alluratest/validation.py
@@ -78,23 +78,13 @@ class Config(object):
         elif env_var is not None:
             return val_type in env_var.split(',')
 
-        enabled = self.test_ini.getboolean(
-            'validation', 'validate_' + val_type)
+        enabled = self.test_ini.getboolean('validation', 'validate_' + val_type)
         return enabled
 
-    def fail_on_validation(self, val_type):
-        env_var = os.getenv('ALLURA_VALIDATION')
-        if env_var == 'all':
-            return True
-        return False
-
 
 def report_validation_error(val_name, filename, message):
     message = '%s Validation errors (%s):\n%s\n' % (val_name, filename, message)
-    if Config.instance().fail_on_validation(val_name):
-        ok_(False, message)
-    else:
-        sys.stderr.write('=' * 40 + '\n' + message)
+    ok_(False, message)
 
 
 def dump_to_file(prefix, contents, suffix=''):