diff --git a/0001-Disable-tests-requiring-network-access.patch b/0001-Disable-tests-requiring-network-access.patch index 83c06da..d6772dd 100644 --- a/0001-Disable-tests-requiring-network-access.patch +++ b/0001-Disable-tests-requiring-network-access.patch @@ -1,17 +1,21 @@ -From 73abcb06636217e52a9d56b4dc3c69bd37141d44 Mon Sep 17 00:00:00 2001 +From 81808e548ddc6cf0a3cc12285f48caa2bd517a07 Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Mon, 4 Mar 2019 14:52:59 +0100 -Subject: [PATCH 1/4] Disable tests requiring network access +Subject: [PATCH 1/3] Disable tests requiring network access --- - .../java/org/xmlunit/assertj3/XmlAssertNodesByXPathTest.java | 2 ++ - .../java/org/xmlunit/assertj3/XmlAssertValidationTest.java | 6 ++++++ - .../java/org/xmlunit/assertj3/XmlAssertValueByXPathTest.java | 2 ++ + .../org/xmlunit/assertj3/XmlAssertNodesByXPathTest.java | 2 ++ + .../java/org/xmlunit/assertj3/XmlAssertValidationTest.java | 6 ++++++ + .../org/xmlunit/assertj3/XmlAssertValueByXPathTest.java | 2 ++ + .../org/custommonkey/xmlunit/test_AbstractNodeTester.java | 2 +- + .../org/custommonkey/xmlunit/test_DifferenceEngine.java | 2 +- + .../org/custommonkey/xmlunit/test_NewDifferenceEngine.java | 2 +- + .../test/java/org/custommonkey/xmlunit/test_Validator.java | 2 +- .../java/org/xmlunit/matchers/ValidationMatcherTest.java | 2 ++ - 4 files changed, 12 insertions(+) + 8 files changed, 16 insertions(+), 4 deletions(-) diff --git a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertNodesByXPathTest.java b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertNodesByXPathTest.java -index 6499f67..c465a51 100644 +index 166633e..926c647 100644 --- a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertNodesByXPathTest.java +++ b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertNodesByXPathTest.java @@ -13,6 +13,7 @@ @@ -22,7 +26,7 @@ index 6499f67..c465a51 100644 import org.junit.Rule; import org.junit.Test; -@@ -43,6 +44,7 @@ public class XmlAssertNodesByXPathTest { +@@ -43,6 +44,7 @@ public void testAssertThat_withNull_shouldFailed() { } @Test @@ -31,7 +35,7 @@ index 6499f67..c465a51 100644 thrown.expectAssertionError(format("%nExpecting not blank but was:")); diff --git a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValidationTest.java b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValidationTest.java -index 7e2dc0e..f743cc4 100644 +index d4f1e82..027e7e9 100644 --- a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValidationTest.java +++ b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValidationTest.java @@ -14,6 +14,7 @@ @@ -42,7 +46,7 @@ index 7e2dc0e..f743cc4 100644 import org.junit.Rule; import org.junit.Test; import org.xmlunit.TestResources; -@@ -91,6 +92,7 @@ public class XmlAssertValidationTest { +@@ -91,6 +92,7 @@ public void testIsValidAgainst_withBrokenXml_shouldFailed() { } @Test @@ -50,7 +54,7 @@ index 7e2dc0e..f743cc4 100644 public void testIsValidAgainst_withEmptySourcesArray_shouldPass() { StreamSource xml = new StreamSource(new File(TestResources.TEST_RESOURCE_DIR + "BookXsdGenerated.xml")); -@@ -100,6 +102,7 @@ public class XmlAssertValidationTest { +@@ -100,6 +102,7 @@ public void testIsValidAgainst_withEmptySourcesArray_shouldPass() { } @Test @@ -58,7 +62,7 @@ index 7e2dc0e..f743cc4 100644 public void testIsValidAgainst_withBrokenXmlAndEmptySourcesArray_shouldFailed() { thrown.expectAssertionError("1. line=9; column=8; type=ERROR;" + -@@ -112,6 +115,7 @@ public class XmlAssertValidationTest { +@@ -112,6 +115,7 @@ public void testIsValidAgainst_withBrokenXmlAndEmptySourcesArray_shouldFailed() } @Test @@ -66,7 +70,7 @@ index 7e2dc0e..f743cc4 100644 public void testIsValid_shouldPass() { StreamSource xml = new StreamSource(new File(TestResources.TEST_RESOURCE_DIR + "BookXsdGenerated.xml")); -@@ -120,6 +124,7 @@ public class XmlAssertValidationTest { +@@ -120,6 +124,7 @@ public void testIsValid_shouldPass() { } @Test @@ -74,7 +78,7 @@ index 7e2dc0e..f743cc4 100644 public void testIsValid_withBrokenXml_shouldPass() { thrown.expectAssertionError("1. line=9; column=8; type=ERROR;" + -@@ -140,6 +145,7 @@ public class XmlAssertValidationTest { +@@ -140,6 +145,7 @@ public void testIsInvalid_withBrokenXml_shouldPass() { } @Test @@ -83,7 +87,7 @@ index 7e2dc0e..f743cc4 100644 thrown.expectAssertionErrorPattern("^\\nExpecting:\\n <.*" diff --git a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValueByXPathTest.java b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValueByXPathTest.java -index 3ce5284..63c3db0 100644 +index 7ac9a3f..3cb825b 100644 --- a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValueByXPathTest.java +++ b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValueByXPathTest.java @@ -14,6 +14,7 @@ @@ -102,6 +106,58 @@ index 3ce5284..63c3db0 100644 public void testValueByXPath_withNull_shouldFailed() { thrown.expectAssertionError(format("%nExpecting not blank but was:")); +diff --git a/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_AbstractNodeTester.java b/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_AbstractNodeTester.java +index 3a8ac80..df02659 100644 +--- a/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_AbstractNodeTester.java ++++ b/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_AbstractNodeTester.java +@@ -176,7 +176,7 @@ public void testTextNode() { + } + + // never called as NodeTest directly jumps to the document element +- public void testDocumentType() throws Exception { ++ public void no_testDocumentType() throws Exception { + AbstractNodeTester t = new AbstractNodeTester() { }; + DocumentType n = XMLUnit + .buildControlDocument("" +diff --git a/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_DifferenceEngine.java b/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_DifferenceEngine.java +index 344d66c..35220b8 100644 +--- a/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_DifferenceEngine.java ++++ b/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_DifferenceEngine.java +@@ -1020,7 +1020,7 @@ public void testIgnoresDifferencesBetweenDocAndRootElement() + listener.different); + } + +- public void testDoctypeDifferences() throws Exception { ++ public void no_testDoctypeDifferences() throws Exception { + String control = "" + + "" + + ""; +diff --git a/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_NewDifferenceEngine.java b/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_NewDifferenceEngine.java +index 0e23767..526be89 100644 +--- a/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_NewDifferenceEngine.java ++++ b/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_NewDifferenceEngine.java +@@ -567,7 +567,7 @@ public void testIgnoresDifferencesBetweenDocAndRootElement() + listener.different); + } + +- public void testDoctypeDifferences() throws Exception { ++ public void no_testDoctypeDifferences() throws Exception { + String control = "" + + "" + + ""; +diff --git a/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_Validator.java b/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_Validator.java +index ad63592..cfcc5e2 100644 +--- a/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_Validator.java ++++ b/xmlunit-legacy/src/test/java/org/custommonkey/xmlunit/test_Validator.java +@@ -57,7 +57,7 @@ public class test_Validator extends XMLTestCase { + private Validator validator; + private File tempDTDFile; + +- public void testXSchema() throws Exception{ ++ public void no_testXSchema() throws Exception{ + File xsdFile = new File(test_Constants.TEST_RESOURCE_DIR + "Book.xsd"); + assertTrue("xsdFile " + xsdFile.getAbsolutePath() + " exists", + xsdFile.exists()); diff --git a/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java b/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java index 6f26927..bf9a153 100644 --- a/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java @@ -114,7 +170,7 @@ index 6f26927..bf9a153 100644 import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; -@@ -79,6 +80,7 @@ public class ValidationMatcherTest { +@@ -79,6 +80,7 @@ public void shouldThrowOnBrokenInstance() { } @Test @@ -123,5 +179,5 @@ index 6f26927..bf9a153 100644 try { Class.forName("java.nio.file.FileSystem"); -- -2.25.4 +2.35.1 diff --git a/0002-Port-to-hamcrest-2.1.patch b/0002-Port-to-hamcrest-2.1.patch index 70336f6..57e500d 100644 --- a/0002-Port-to-hamcrest-2.1.patch +++ b/0002-Port-to-hamcrest-2.1.patch @@ -1,7 +1,7 @@ -From c81eb91d7b9aa9728dfc83d68a881b4e2a0fa8d2 Mon Sep 17 00:00:00 2001 +From 8d7373f5feef927514339fe42919873836c0f710 Mon Sep 17 00:00:00 2001 From: Marian Koncek Date: Thu, 29 Aug 2019 13:58:24 +0200 -Subject: [PATCH 2/4] Port to hamcrest 2.1 +Subject: [PATCH 2/3] Port to hamcrest 2.1 --- .../src/main/java/org/xmlunit/matchers/CompareMatcher.java | 3 --- @@ -15,7 +15,7 @@ diff --git a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/CompareMatcher. index 6452081..226399c 100644 --- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/CompareMatcher.java +++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/CompareMatcher.java -@@ -33,7 +33,6 @@ import org.xmlunit.util.Predicate; +@@ -33,7 +33,6 @@ import org.hamcrest.BaseMatcher; import org.hamcrest.Description; @@ -23,7 +23,7 @@ index 6452081..226399c 100644 import org.hamcrest.Matcher; import java.lang.reflect.Constructor; -@@ -112,7 +111,6 @@ public final class CompareMatcher extends BaseMatcher +@@ -112,7 +111,6 @@ private CompareMatcher(Object control) { *

* As input all types are supported which are supported by {@link Input#from(Object)}. */ @@ -31,7 +31,7 @@ index 6452081..226399c 100644 public static CompareMatcher isIdenticalTo(final Object control) { return new CompareMatcher(control).checkForIdentical(); } -@@ -128,7 +126,6 @@ public final class CompareMatcher extends BaseMatcher +@@ -128,7 +126,6 @@ public static CompareMatcher isIdenticalTo(final Object control) { *

* As input all types are supported which are supported by {@link Input#from(Object)}. */ @@ -43,7 +43,7 @@ diff --git a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/EvaluateXPathMa index 6eb23e5..1e9b8b5 100644 --- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/EvaluateXPathMatcher.java +++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/EvaluateXPathMatcher.java -@@ -16,7 +16,6 @@ package org.xmlunit.matchers; +@@ -16,7 +16,6 @@ import org.hamcrest.BaseMatcher; import org.hamcrest.Description; @@ -51,7 +51,7 @@ index 6eb23e5..1e9b8b5 100644 import org.hamcrest.Matcher; import org.w3c.dom.Node; import org.xmlunit.builder.Input; -@@ -93,7 +92,6 @@ public class EvaluateXPathMatcher extends BaseMatcher { +@@ -93,7 +92,6 @@ public EvaluateXPathMatcher(String xPath, Matcher valueMatcher) { * @param valueMatcher matcher for the value at the specified xpath * @return the xpath matcher */ @@ -63,7 +63,7 @@ diff --git a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/HasXPathMatcher index 08325cd..6fbf0ac 100644 --- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/HasXPathMatcher.java +++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/HasXPathMatcher.java -@@ -16,7 +16,6 @@ package org.xmlunit.matchers; +@@ -16,7 +16,6 @@ import org.hamcrest.BaseMatcher; import org.hamcrest.Description; @@ -71,7 +71,7 @@ index 08325cd..6fbf0ac 100644 import org.hamcrest.Matcher; import org.w3c.dom.Node; import org.xmlunit.builder.Input; -@@ -135,7 +134,6 @@ public class HasXPathMatcher extends BaseMatcher { +@@ -135,7 +134,6 @@ public void describeMismatch(Object item, Description mismatchDescription) { * @param xPath the target xpath * @return the xpath matcher */ @@ -91,7 +91,7 @@ index b9002a1..7cd6843 100644 import org.hamcrest.Matcher; import org.hamcrest.TypeSafeMatcher; -@@ -128,7 +127,6 @@ public abstract class TypeMatcher extends TypeSafeMatcher { +@@ -128,7 +127,6 @@ private T nullSafeConvert(String item) { * @param valueMatcher valueMatcher for the converted value * @return the BigDecimal matcher */ @@ -99,7 +99,7 @@ index b9002a1..7cd6843 100644 public static TypeMatcher asBigDecimal(Matcher valueMatcher) { return new BigDecimalTypeMatcher(valueMatcher); } -@@ -146,7 +144,6 @@ public abstract class TypeMatcher extends TypeSafeMatcher { +@@ -146,7 +144,6 @@ public static TypeMatcher asBigDecimal(Matcher * @param valueMatcher valueMatcher for the converted value * @return the Double matcher */ @@ -107,7 +107,7 @@ index b9002a1..7cd6843 100644 public static TypeMatcher asDouble(Matcher valueMatcher) { return new DoubleTypeMatcher(valueMatcher); } -@@ -164,7 +161,6 @@ public abstract class TypeMatcher extends TypeSafeMatcher { +@@ -164,7 +161,6 @@ public static TypeMatcher asDouble(Matcher valueMatche * @param valueMatcher valueMatcher for the converted value * @return the Integer matcher */ @@ -115,7 +115,7 @@ index b9002a1..7cd6843 100644 public static TypeMatcher asInt(Matcher valueMatcher) { return new IntegerTypeMatcher(valueMatcher); } -@@ -182,7 +178,6 @@ public abstract class TypeMatcher extends TypeSafeMatcher { +@@ -182,7 +178,6 @@ public static TypeMatcher asInt(Matcher valueMatcher * @param valueMatcher valueMatcher for the converted value * @return the Boolean matcher */ @@ -127,7 +127,7 @@ diff --git a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/ValidationMatch index 3126349..51f58ec 100644 --- a/xmlunit-matchers/src/main/java/org/xmlunit/matchers/ValidationMatcher.java +++ b/xmlunit-matchers/src/main/java/org/xmlunit/matchers/ValidationMatcher.java -@@ -27,7 +27,6 @@ import org.xmlunit.validation.ValidationProblem; +@@ -27,7 +27,6 @@ import org.xmlunit.validation.ValidationResult; import org.hamcrest.BaseMatcher; import org.hamcrest.Description; @@ -135,7 +135,7 @@ index 3126349..51f58ec 100644 import javax.xml.transform.Source; import javax.xml.validation.Schema; -@@ -121,7 +120,6 @@ public class ValidationMatcher extends BaseMatcher { +@@ -121,7 +120,6 @@ public void describeMismatch(final Object item, final Description mismatchDescri } } @@ -143,7 +143,7 @@ index 3126349..51f58ec 100644 public static ValidationMatcher valid(final Object schemaSource) { return new ValidationMatcher(schemaSource); } -@@ -129,7 +127,6 @@ public class ValidationMatcher extends BaseMatcher { +@@ -129,7 +127,6 @@ public static ValidationMatcher valid(final Object schemaSource) { /** * @since XMLUnit 2.3.0 */ @@ -152,5 +152,5 @@ index 3126349..51f58ec 100644 return new ValidationMatcher(schema); } -- -2.21.0 +2.35.1 diff --git a/0003-Drop-support-for-JAXB.patch b/0003-Drop-support-for-JAXB.patch index 923eb35..6ec390e 100644 --- a/0003-Drop-support-for-JAXB.patch +++ b/0003-Drop-support-for-JAXB.patch @@ -1,7 +1,7 @@ -From 9866f331db726db0ac6af64649c308b01b34ea56 Mon Sep 17 00:00:00 2001 +From 4b30dd33332f79c71697c8a9bdbf39d74fb06c4a Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Tue, 5 Nov 2019 12:14:08 +0100 -Subject: [PATCH 4/4] Drop support for JAXB +Subject: [PATCH 3/3] Drop support for JAXB --- xmlunit-core/src/main/java/org/xmlunit/builder/Input.java | 4 ++-- @@ -12,7 +12,7 @@ diff --git a/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java b/xmlunit index 27d9c5a..81165cc 100644 --- a/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java +++ b/xmlunit-core/src/main/java/org/xmlunit/builder/Input.java -@@ -153,8 +153,8 @@ public class Input { +@@ -153,8 +153,8 @@ public static Builder from(Object object) { /** * Build a Source from a Jaxb-Object. */ @@ -27,7 +27,7 @@ diff --git a/xmlunit-core/src/test/java/org/xmlunit/builder/InputTest.java b/xml index e767f38..98e3fe7 100644 --- a/xmlunit-core/src/test/java/org/xmlunit/builder/InputTest.java +++ b/xmlunit-core/src/test/java/org/xmlunit/builder/InputTest.java -@@ -31,7 +31,6 @@ import org.w3c.dom.Document; +@@ -31,7 +31,6 @@ import org.xmlunit.NullNode; import org.xmlunit.TestResources; import org.xmlunit.XMLUnitException; @@ -35,7 +35,7 @@ index e767f38..98e3fe7 100644 import org.xmlunit.util.Convert; import org.xmlunit.xpath.JAXPXPathEngine; -@@ -132,10 +131,6 @@ public class InputTest { +@@ -132,10 +131,6 @@ private static Document parse(Source s) throws Exception { allIsWellFor(s, "furry"); } @@ -46,7 +46,7 @@ index e767f38..98e3fe7 100644 @Test public void shouldParseUnknownToSource() throws Exception { // from Source allIsWellFor(Input.from(Input.fromByteArray(readTestFile()).build()).build()); -@@ -153,8 +148,6 @@ public class InputTest { +@@ -153,8 +148,6 @@ private static Document parse(Source s) throws Exception { allIsWellFor(Input.from(new URI("file:" + TestResources.ANIMAL_FILE)).build()); // from URL allIsWellFor(Input.from(new URL("file:" + TestResources.ANIMAL_FILE)).build()); @@ -56,5 +56,5 @@ index e767f38..98e3fe7 100644 try (FileInputStream is = new FileInputStream(TestResources.ANIMAL_FILE)) { allIsWellFor(Input.from(is).build()); -- -2.29.2 +2.35.1 diff --git a/xmlunit.spec b/xmlunit.spec index be7b094..5ef162c 100644 --- a/xmlunit.spec +++ b/xmlunit.spec @@ -2,7 +2,7 @@ Name: xmlunit Version: 2.8.2 -Release: 6%{?dist} +Release: 7%{?dist} Summary: Provides classes to do asserts on xml # The whole package is ASL 2.0 except for xmlunit-legacy which is BSD License: ASL 2.0 and BSD @@ -116,6 +116,9 @@ rm -rf xmlunit-core/src/{main,test}/java/org/xmlunit/builder/{jaxb/,JaxbBuilder. %files placeholders -f .mfiles-xmlunit-placeholders %changelog +* Fri Apr 22 2022 Mikolaj Izdebski - 2.8.2-7 +- Disable more tests that require network access + * Sat Feb 05 2022 Jiri Vanek - 2.8.2-6 - Rebuilt for java-17-openjdk as system jdk