Skip to content

Commit 0e9dde4

Browse files
authored
Fix Cobertura unit test (#510)
1 parent 3816790 commit 0e9dde4

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

Diff for: reporter/src/main/scala/scoverage/reporter/CoberturaXmlWriter.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class CoberturaXmlWriter(
2626
val file = new File(outputDir, "cobertura.xml")
2727
IOUtils.writeToFile(
2828
file,
29-
"<?xml version=\"1.0\"?>\n<!DOCTYPE coverage SYSTEM \"http://cobertura.sourceforge.net/xml/coverage-04.dtd\">\n" +
29+
"<?xml version=\"1.0\"?>\n<!DOCTYPE coverage SYSTEM \"https://cobertura.sourceforge.net/xml/coverage-04.dtd\">\n" +
3030
new PrettyPrinter(120, 4).format(xml(coverage)),
3131
sourceEncoding
3232
)

Diff for: reporter/src/test/resources/scoverage/reporter/cobertura.sample.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd">
2+
<!DOCTYPE coverage SYSTEM "https://cobertura.sourceforge.net/xml/coverage-04.dtd">
33

44
<coverage line-rate="0.9" branch-rate="0.75" version="1.9" timestamp="1187350905008">
55
<sources>

Diff for: reporter/src/test/scala/scoverage/reporter/CoberturaXmlWriterTest.scala

+1-3
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class CoberturaXmlWriterTest extends FunSuite {
112112
)
113113
}
114114

115-
test("cobertura output validates".ignore) {
115+
test("cobertura output validates") {
116116

117117
val dir = tempDir()
118118

@@ -298,8 +298,6 @@ class CoberturaXmlWriterTest extends FunSuite {
298298
writer.write(coverage)
299299

300300
val domFactory = DocumentBuilderFactory.newInstance()
301-
// TODO set validating here is no longer working as of 2.13.10. Not fully sure why but I don't use
302-
// cobertura, so if someone wants to fix this, please do. I'll move forward with this not to block the release.
303301
domFactory.setValidating(true)
304302
val builder = domFactory.newDocumentBuilder()
305303
builder.setErrorHandler(new ErrorHandler() {

0 commit comments

Comments
 (0)