You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@allura.apache.org by he...@apache.org on 2016/01/18 21:31:45 UTC

[09/11] 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/788d8919
Tree: http://git-wip-us.apache.org/repos/asf/allura/tree/788d8919
Diff: http://git-wip-us.apache.org/repos/asf/allura/diff/788d8919

Branch: refs/heads/master
Commit: 788d89199b06acc76f43bb2ece5da64ab4e58af2
Parents: c8b8ee6
Author: Dave Brondsema <da...@brondsema.net>
Authored: Thu Jan 14 22:06:38 2016 -0500
Committer: Heith Seewald <he...@gmail.com>
Committed: Mon Jan 18 14:43:56 2016 -0500

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


http://git-wip-us.apache.org/repos/asf/allura/blob/788d8919/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=''):