Skip to content

Commit

Permalink
Remove jackson from tests since it is now only runtime dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
chali committed Jun 9, 2021
1 parent 7c7ab90 commit 0a1adf7
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 19 deletions.
2 changes: 0 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ dependencies {
testImplementation 'com.netflix.nebula:gradle-resolution-rules-plugin:latest.release'
testImplementation 'com.netflix.nebula:nebula-test:latest.release'

testImplementation platform("com.fasterxml.jackson:jackson-bom:2.10.+")

testImplementation 'org.apache.maven.indexer:indexer-core:6.0.0'
testImplementation 'org.eclipse.sisu:org.eclipse.sisu.plexus:0.3.3'
testImplementation 'org.sonatype.sisu:sisu-guice:3.2.6'
Expand Down
1 change: 0 additions & 1 deletion gradle/dependency-locks/integTestCompileClasspath.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# This file is expected to be part of source control.
aopalliance:aopalliance:1.0
com.damnhandy:handy-uri-templates:2.1.6
com.fasterxml.jackson:jackson-bom:2.10.5.20201202
com.github.everit-org.json-schema:org.everit.json.schema:1.8.0
com.google.code.findbugs:jsr305:3.0.2
com.google.errorprone:error_prone_annotations:2.0.18
Expand Down
9 changes: 4 additions & 5 deletions gradle/dependency-locks/integTestRuntimeClasspath.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
aopalliance:aopalliance:1.0
cglib:cglib-nodep:3.2.2
com.damnhandy:handy-uri-templates:2.1.6
com.fasterxml.jackson.core:jackson-annotations:2.10.5
com.fasterxml.jackson.core:jackson-core:2.10.5
com.fasterxml.jackson.core:jackson-databind:2.10.5.1
com.fasterxml.jackson.module:jackson-module-kotlin:2.10.5
com.fasterxml.jackson:jackson-bom:2.10.5.20201202
com.fasterxml.jackson.core:jackson-annotations:2.9.10
com.fasterxml.jackson.core:jackson-core:2.9.10
com.fasterxml.jackson.core:jackson-databind:2.9.10
com.fasterxml.jackson.module:jackson-module-kotlin:2.9.10
com.github.everit-org.json-schema:org.everit.json.schema:1.8.0
com.google.code.findbugs:jsr305:3.0.2
com.google.errorprone:error_prone_annotations:2.0.18
Expand Down
1 change: 0 additions & 1 deletion gradle/dependency-locks/testCompileClasspath.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# This file is expected to be part of source control.
aopalliance:aopalliance:1.0
com.damnhandy:handy-uri-templates:2.1.6
com.fasterxml.jackson:jackson-bom:2.10.5.20201202
com.github.everit-org.json-schema:org.everit.json.schema:1.8.0
com.google.code.findbugs:jsr305:3.0.2
com.google.errorprone:error_prone_annotations:2.0.18
Expand Down
9 changes: 4 additions & 5 deletions gradle/dependency-locks/testRuntimeClasspath.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
aopalliance:aopalliance:1.0
cglib:cglib-nodep:3.2.2
com.damnhandy:handy-uri-templates:2.1.6
com.fasterxml.jackson.core:jackson-annotations:2.10.5
com.fasterxml.jackson.core:jackson-core:2.10.5
com.fasterxml.jackson.core:jackson-databind:2.10.5.1
com.fasterxml.jackson.module:jackson-module-kotlin:2.10.5
com.fasterxml.jackson:jackson-bom:2.10.5.20201202
com.fasterxml.jackson.core:jackson-annotations:2.9.10
com.fasterxml.jackson.core:jackson-core:2.9.10
com.fasterxml.jackson.core:jackson-databind:2.9.10
com.fasterxml.jackson.module:jackson-module-kotlin:2.9.10
com.github.everit-org.json-schema:org.everit.json.schema:1.8.0
com.google.code.findbugs:jsr305:3.0.2
com.google.errorprone:error_prone_annotations:2.0.18
Expand Down
11 changes: 6 additions & 5 deletions src/test/groovy/ResourceValidatorSpec.groovy
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import com.fasterxml.jackson.databind.ObjectMapper

import groovy.json.JsonSlurper
import spock.lang.Shared
import spock.lang.Specification
import spock.lang.Unroll
Expand All @@ -18,16 +19,16 @@ class ResourceValidatorSpec extends Specification {
@Unroll
def 'verifies resource \'#resourceName\' is valid json'() {
when:
final ObjectMapper mapper = new ObjectMapper();

then:
try {
def file = new File(RESOURCES_PATH + resourceName)
mapper.readTree(file)
new JsonSlurper().parse(file)
} catch (Exception e) {
throw new RuntimeException("resource '${resourceName}' should be valid json", e)
}

then:
noExceptionThrown()

where:
resourceName << resourceNames
}
Expand Down

0 comments on commit 0a1adf7

Please sign in to comment.