Skip to content

Commit

Permalink
chore: fix test after cherry pick commits
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronald Holshausen committed Nov 12, 2021
1 parent 78c5af5 commit dfcd67f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,10 @@ interface IProviderVerifier {
fun generateErrorStringFromVerificationResult(result: List<VerificationResult.Failed>): String

fun reportStateChangeFailed(providerState: ProviderState, error: Exception, isSetup: Boolean)

fun initialiseReporters(provider: IProviderInfo)

fun reportVerificationForConsumer(consumer: IConsumerInfo, provider: IProviderInfo, pactSource: PactSource?)
}

/**
Expand Down Expand Up @@ -770,7 +774,7 @@ open class ProviderVerifier @JvmOverloads constructor (
}
}

fun initialiseReporters(provider: IProviderInfo) {
override fun initialiseReporters(provider: IProviderInfo) {
reporters.forEach {
if (it.hasProperty("displayFullDiff")) {
(it.property("displayFullDiff") as KMutableProperty1<VerifierReporter, Boolean>)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class DefaultVerificationReporterSpec extends Specification {
], [:], new BrokerUrlSource('', ''))
def testResult = new TestResult.Ok()
def brokerClient = Mock(PactBrokerClient)
def branch = "main"
def branch = 'main'

when:
def result = DefaultVerificationReporter.INSTANCE.reportResults(pact, testResult, '', brokerClient, [], branch)
Expand All @@ -115,7 +115,7 @@ class DefaultVerificationReporterSpec extends Specification {
def testResult = new TestResult.Ok()
def brokerClient = Mock(PactBrokerClient)
def tags = ['tag1', 'tag2', 'tag3']
def branch = "main"
def branch = 'main'

when:
def result = DefaultVerificationReporter.INSTANCE.reportResults(pact, testResult, '', brokerClient, tags, branch)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ class ProviderVerifierSpec extends Specification {
}

@Unroll
@SuppressWarnings('UnnecessaryGetter')
@SuppressWarnings(['UnnecessaryGetter', 'LineLength'])
@RestoreSystemProperties
def 'after verifying a pact, the results are reported back using branch and reportVerificationResults'() {
given:
Expand All @@ -481,7 +481,7 @@ class ProviderVerifierSpec extends Specification {
verifier.pactReader.loadPact(_) >> mockPact
mockPact.interactions >> [interaction1, interaction2]

def branch = "master"
def branch = 'master'
System.setProperty(ProviderVerifier.PACT_PROVIDER_BRANCH, branch)

when:
Expand Down

0 comments on commit dfcd67f

Please sign in to comment.