Skip to content

Commit

Permalink
avoid false diffs
Browse files Browse the repository at this point in the history
  • Loading branch information
BalduinLandolt committed Mar 18, 2024
1 parent f9f696f commit 79d3a52
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import org.knora.webapi.e2e.TestDataFilePath
import org.knora.webapi.messages.OntologyConstants.KnoraApiV2Complex
import org.knora.webapi.messages.OntologyConstants.KnoraApiV2Simple
import org.knora.webapi.messages.store.triplestoremessages.RdfDataObject
import org.knora.webapi.messages.util.rdf.*
import org.knora.webapi.sharedtestdata.SharedTestDataADM
import org.knora.webapi.util.*

Expand Down Expand Up @@ -298,9 +297,11 @@ class OntologyFormatsE2ESpec extends E2ESpec {
private def checkTurleTestCase(httpGetTest: HttpGetTest) = {
val mediaType = RdfMediaTypes.`text/turtle`
val responseStr = getResponse(httpGetTest.urlPath, mediaType)
if (writeTestDataFiles) httpGetTest.writeFile(responseStr, mediaType)
if (writeTestDataFiles && parseTurtle(responseStr) != parseTurtle(httpGetTest.readFile(mediaType)))
httpGetTest.writeFile(responseStr, mediaType)
else assert(parseTurtle(responseStr) == parseTurtle(httpGetTest.readFile(mediaType)))
}
// LATER: use jena directly, with `isIsomorphicWith`

private def checkRdfXmlTestCase(httpGetTest: HttpGetTest) = {
val mediaType = RdfMediaTypes.`application/rdf+xml`
Expand Down

0 comments on commit 79d3a52

Please sign in to comment.