Skip to content

Commit 7068f20

Browse files
author
Ronald Holshausen
committedJan 26, 2020
fix: Fix codenarc #994
1 parent 28931c4 commit 7068f20

File tree

3 files changed

+12
-13
lines changed

3 files changed

+12
-13
lines changed
 

‎build.gradle

-6
Original file line numberDiff line numberDiff line change
@@ -216,16 +216,10 @@ subprojects {
216216

217217
codenarcMain {
218218
configFile = rootProject.file('config/codenarc/ruleset.groovy')
219-
reports {
220-
console { enabled = true }
221-
}
222219
}
223220

224221
codenarcTest {
225222
configFile = rootProject.file('config/codenarc/rulesetTest.groovy')
226-
reports {
227-
console { enabled = true }
228-
}
229223
}
230224

231225
check.dependsOn << 'jacocoTestReport'

‎provider/pact-jvm-provider-gradle/src/test/groovy/au/com/dius/pact/provider/gradle/PactCanIDeployTaskSpec.groovy

+6-4
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ class PactCanIDeployTaskSpec extends Specification {
1313
private PactCanIDeployTask task
1414
private PactPlugin plugin
1515
private Project project
16-
private PactBrokerClient brokerClient
1716

1817
def setup() {
1918
project = ProjectBuilder.builder().build()
@@ -83,7 +82,8 @@ class PactCanIDeployTaskSpec extends Specification {
8382

8483
then:
8584
notThrown(GradleScriptException)
86-
1 * task.brokerClient.canIDeploy('pacticipant', '1.0.0', _, _) >> new CanIDeployResult(true, '', '')
85+
1 * task.brokerClient.canIDeploy('pacticipant', '1.0.0', _, _) >>
86+
new CanIDeployResult(true, '', '')
8787
}
8888

8989
def 'passes optional parameters to the pact broker client'() {
@@ -106,7 +106,8 @@ class PactCanIDeployTaskSpec extends Specification {
106106

107107
then:
108108
notThrown(GradleScriptException)
109-
1 * task.brokerClient.canIDeploy('pacticipant', '1.0.0', new Latest.UseLatest(true), 'prod') >> new CanIDeployResult(true, '', '')
109+
1 * task.brokerClient.canIDeploy('pacticipant', '1.0.0',
110+
new Latest.UseLatest(true), 'prod') >> new CanIDeployResult(true, '', '')
110111
}
111112

112113
def 'throws an exception if the pact broker client says no'() {
@@ -126,7 +127,8 @@ class PactCanIDeployTaskSpec extends Specification {
126127
task.canIDeploy()
127128

128129
then:
129-
1 * task.brokerClient.canIDeploy('pacticipant', '1.0.0', _, _) >> new CanIDeployResult(false, 'Bad version', 'Bad version')
130+
1 * task.brokerClient.canIDeploy('pacticipant', '1.0.0', _, _) >>
131+
new CanIDeployResult(false, 'Bad version', 'Bad version')
130132
def ex = thrown(GradleScriptException)
131133
ex.message == 'Can you deploy? Computer says no ¯\\_(ツ)_/¯ Bad version'
132134
}

‎provider/pact-jvm-provider-maven/src/test/groovy/au/com/dius/pact/provider/maven/PactCanIDeployMojoSpec.groovy

+6-3
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,8 @@ class PactCanIDeployMojoSpec extends Specification {
6262

6363
then:
6464
notThrown(MojoExecutionException)
65-
1 * mojo.brokerClient.canIDeploy('test', '1234', _, _) >> new CanIDeployResult(true, '', '')
65+
1 * mojo.brokerClient.canIDeploy('test', '1234', _, _) >>
66+
new CanIDeployResult(true, '', '')
6667
}
6768

6869
def 'passes optional parameters to the pact broker client'() {
@@ -76,7 +77,8 @@ class PactCanIDeployMojoSpec extends Specification {
7677

7778
then:
7879
notThrown(MojoExecutionException)
79-
1 * mojo.brokerClient.canIDeploy('test', '1234', new Latest.UseLatest(true), 'prod') >> new CanIDeployResult(true, '', '')
80+
1 * mojo.brokerClient.canIDeploy('test', '1234',
81+
new Latest.UseLatest(true), 'prod') >> new CanIDeployResult(true, '', '')
8082
}
8183

8284
def 'throws an exception if the pact broker client says no'() {
@@ -87,7 +89,8 @@ class PactCanIDeployMojoSpec extends Specification {
8789
mojo.execute()
8890

8991
then:
90-
1 * mojo.brokerClient.canIDeploy('test', '1234', _, _) >> new CanIDeployResult(false, 'Bad version', 'Bad version')
92+
1 * mojo.brokerClient.canIDeploy('test', '1234', _, _) >>
93+
new CanIDeployResult(false, 'Bad version', 'Bad version')
9194
def ex = thrown(MojoExecutionException)
9295
ex.message == 'Can you deploy? Computer says no ¯\\_(ツ)_/¯ Bad version'
9396
}

0 commit comments

Comments
 (0)