xmlunit/0001-Disable-tests-requiring-network-access.patch

128 lines
4.7 KiB
Diff
Raw Normal View History

2019-11-05 11:15:57 +00:00
From 73abcb06636217e52a9d56b4dc3c69bd37141d44 Mon Sep 17 00:00:00 2001
2019-04-15 12:37:10 +00:00
From: Marian Koncek <mkoncek@redhat.com>
Date: Mon, 4 Mar 2019 14:52:59 +0100
2019-11-05 11:15:57 +00:00
Subject: [PATCH 1/4] Disable tests requiring network access
2019-04-15 12:37:10 +00:00
---
2021-01-28 14:00:57 +00:00
.../java/org/xmlunit/assertj3/XmlAssertNodesByXPathTest.java | 2 ++
.../java/org/xmlunit/assertj3/XmlAssertValidationTest.java | 6 ++++++
.../java/org/xmlunit/assertj3/XmlAssertValueByXPathTest.java | 2 ++
2020-07-29 07:54:23 +00:00
.../java/org/xmlunit/matchers/ValidationMatcherTest.java | 2 ++
4 files changed, 12 insertions(+)
2019-04-15 12:37:10 +00:00
2021-01-28 14:00:57 +00:00
diff --git a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertNodesByXPathTest.java b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertNodesByXPathTest.java
2020-07-29 07:54:23 +00:00
index 6499f67..c465a51 100644
2021-01-28 14:00:57 +00:00
--- a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertNodesByXPathTest.java
+++ b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertNodesByXPathTest.java
2020-07-29 07:54:23 +00:00
@@ -13,6 +13,7 @@
*/
2021-01-28 14:00:57 +00:00
package org.xmlunit.assertj3;
2020-07-29 07:54:23 +00:00
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
@@ -43,6 +44,7 @@ public class XmlAssertNodesByXPathTest {
2019-04-15 12:37:10 +00:00
}
@Test
2020-07-29 07:54:23 +00:00
+ @Ignore
public void testNodesByXPath_withNull_shouldFailed() {
2019-04-15 12:37:10 +00:00
2020-07-29 07:54:23 +00:00
thrown.expectAssertionError(format("%nExpecting not blank but was:<null>"));
2021-01-28 14:00:57 +00:00
diff --git a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValidationTest.java b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValidationTest.java
2020-07-29 07:54:23 +00:00
index 7e2dc0e..f743cc4 100644
2021-01-28 14:00:57 +00:00
--- a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValidationTest.java
+++ b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValidationTest.java
2020-07-29 07:54:23 +00:00
@@ -14,6 +14,7 @@
2021-01-28 14:00:57 +00:00
package org.xmlunit.assertj3;
2020-07-29 07:54:23 +00:00
import org.junit.ClassRule;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.xmlunit.TestResources;
@@ -91,6 +92,7 @@ public class XmlAssertValidationTest {
}
@Test
+ @Ignore
public void testIsValidAgainst_withEmptySourcesArray_shouldPass() {
StreamSource xml = new StreamSource(new File(TestResources.TEST_RESOURCE_DIR + "BookXsdGenerated.xml"));
@@ -100,6 +102,7 @@ public class XmlAssertValidationTest {
2019-04-15 12:37:10 +00:00
}
@Test
2020-07-29 07:54:23 +00:00
+ @Ignore
public void testIsValidAgainst_withBrokenXmlAndEmptySourcesArray_shouldFailed() {
2019-04-15 12:37:10 +00:00
2020-07-29 07:54:23 +00:00
thrown.expectAssertionError("1. line=9; column=8; type=ERROR;" +
@@ -112,6 +115,7 @@ public class XmlAssertValidationTest {
2019-04-15 12:37:10 +00:00
}
@Test
2020-07-29 07:54:23 +00:00
+ @Ignore
public void testIsValid_shouldPass() {
2019-04-15 12:37:10 +00:00
2020-07-29 07:54:23 +00:00
StreamSource xml = new StreamSource(new File(TestResources.TEST_RESOURCE_DIR + "BookXsdGenerated.xml"));
@@ -120,6 +124,7 @@ public class XmlAssertValidationTest {
}
@Test
+ @Ignore
public void testIsValid_withBrokenXml_shouldPass() {
thrown.expectAssertionError("1. line=9; column=8; type=ERROR;" +
@@ -140,6 +145,7 @@ public class XmlAssertValidationTest {
}
@Test
+ @Ignore
public void testIsInvalid_shouldField() {
thrown.expectAssertionErrorPattern("^\\nExpecting:\\n <.*"
2021-01-28 14:00:57 +00:00
diff --git a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValueByXPathTest.java b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValueByXPathTest.java
2020-07-29 07:54:23 +00:00
index 3ce5284..63c3db0 100644
2021-01-28 14:00:57 +00:00
--- a/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValueByXPathTest.java
+++ b/xmlunit-assertj3/src/test/java/org/xmlunit/assertj3/XmlAssertValueByXPathTest.java
2020-07-29 07:54:23 +00:00
@@ -14,6 +14,7 @@
2021-01-28 14:00:57 +00:00
package org.xmlunit.assertj3;
2020-07-29 07:54:23 +00:00
import org.junit.ClassRule;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
2021-01-28 14:00:57 +00:00
import org.xmlunit.assertj3.util.SetEnglishLocaleRule;
2020-07-29 07:54:23 +00:00
@@ -31,6 +32,7 @@ public class XmlAssertValueByXPathTest {
public static SetEnglishLocaleRule locale = new SetEnglishLocaleRule();
2019-04-15 12:37:10 +00:00
@Test
2020-07-29 07:54:23 +00:00
+ @Ignore
public void testValueByXPath_withNull_shouldFailed() {
2019-04-15 12:37:10 +00:00
2020-07-29 07:54:23 +00:00
thrown.expectAssertionError(format("%nExpecting not blank but was:<null>"));
2019-04-15 12:37:10 +00:00
diff --git a/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java b/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java
2020-07-29 07:54:23 +00:00
index 6f26927..bf9a153 100644
2019-04-15 12:37:10 +00:00
--- a/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java
+++ b/xmlunit-matchers/src/test/java/org/xmlunit/matchers/ValidationMatcherTest.java
2020-07-29 07:54:23 +00:00
@@ -13,6 +13,7 @@
*/
package org.xmlunit.matchers;
+import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
@@ -79,6 +80,7 @@ public class ValidationMatcherTest {
2019-04-15 12:37:10 +00:00
}
2020-07-29 07:54:23 +00:00
@Test
+ @Ignore
public void shouldSuccessfullyValidateInstanceWithoutExplicitSchemaSource() {
try {
Class.forName("java.nio.file.FileSystem");
2019-04-15 12:37:10 +00:00
--
2020-07-29 07:54:23 +00:00
2.25.4
2019-04-15 12:37:10 +00:00