File obs-server-2.9-0041-ci-Make-validator-unit-test-more-flexible.patch of Package obs-server

From 09017e7f63310861d570bad960931a475d77bc68 Mon Sep 17 00:00:00 2001
From: Oleg Girko <ol@infoserver.lv>
Date: Wed, 12 Feb 2020 00:41:51 +0000
Subject: [PATCH] [ci] Make validator unit test more flexible

In some cases it makes no sense to require specific error message
because different versions of libxml2 may produce different messages.

Signed-off-by: Oleg Girko <ol@infoserver.lv>
---
 src/api/test/unit/validator_test.rb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/api/test/unit/validator_test.rb b/src/api/test/unit/validator_test.rb
index ed270942e0..883e9d9fcf 100644
--- a/src/api/test/unit/validator_test.rb
+++ b/src/api/test/unit/validator_test.rb
@@ -40,10 +40,9 @@ class ValidatorTest < ActiveSupport::TestCase
     assert_match(/Extra content at the end of the document/, exception.message)
 
     request.env['RAW_POST_DATA'] = '<link test="invalid">'
-    exception = assert_raise Suse::ValidationError do
+    assert_raise Suse::ValidationError do
       Suse::Validator.validate 'link', request.raw_post.to_s
     end
-    assert_match(/Premature end of data in tag link/, exception.message)
 
     request.env['RAW_POST_DATA'] = '<link test="invalid"></ink>'
     exception = assert_raise Suse::ValidationError do
-- 
2.24.1