|
19 | 19 | package org.apache.plc4x.test.generator |
20 | 20 |
|
21 | 21 | import org.opentest4j.TestAbortedException |
22 | | -import spock.lang.Ignore |
23 | 22 |
|
24 | 23 | import java.nio.file.FileSystems |
25 | 24 | import org.apache.commons.io.FileUtils |
26 | 25 |
|
27 | 26 | import static org.xmlunit.matchers.CompareMatcher.isIdenticalTo |
28 | | -import static spock.util.matcher.HamcrestSupport.* |
29 | | -import spock.lang.Specification |
30 | | - |
31 | 27 |
|
32 | 28 | import java.nio.file.Files |
33 | 29 |
|
34 | | -// TODO: Fix this test, so it can also run on M-Macs. |
35 | | -@Ignore |
36 | 30 | // TODO: find out how to access surefire groups... |
37 | 31 | //@IgnoreIf({ env["ENABLE_ALL_TESTS"] == null || env["ENABLE_ALL_TESTS"] == "false" }) |
38 | | -class ParserSerializerTestsuiteGeneratorSpec extends Specification { |
| 32 | +class ParserSerializerTestsuiteGeneratorTest { |
39 | 33 | def "Test main with an example pcap"() { |
40 | 34 | given: |
41 | 35 | try { |
@@ -79,14 +73,14 @@ class ParserSerializerTestsuiteGeneratorSpec extends Specification { |
79 | 73 | then: |
80 | 74 | assert Files.exists(testSuitePath) |
81 | 75 | expect: |
82 | | - def expected = ParserSerializerTestsuiteGeneratorSpec.getResource("/ParserSerializerTestSuite.xml").text |
| 76 | + def expected = ParserSerializerTestsuiteGeneratorTest.getResource("/ParserSerializerTestSuite.xml").text |
83 | 77 | def actual = testSuitePath.toFile().text |
84 | 78 | that actual, isIdenticalTo(expected).ignoreComments().ignoreWhitespace() |
85 | 79 | } |
86 | 80 |
|
87 | 81 | private String DownloadAndCache(String file) throws IOException { |
88 | 82 | def tempDirectory = FileUtils.getTempDirectoryPath() |
89 | | - def pcapFile = FileSystems.getDefault().getPath(tempDirectory, ParserSerializerTestsuiteGeneratorSpec.class.getSimpleName(), file).toFile() |
| 83 | + def pcapFile = FileSystems.getDefault().getPath(tempDirectory, ParserSerializerTestsuiteGeneratorTest.class.getSimpleName(), file).toFile() |
90 | 84 | FileUtils.createParentDirectories(pcapFile); |
91 | 85 | if (!pcapFile.exists()) { |
92 | 86 | URL source = new URL("https://kargs.net/captures/" + file) |
|
0 commit comments