Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradle provider verification from pact file #1587

Open
coco1979ka opened this issue Jul 28, 2022 · 0 comments
Open

Gradle provider verification from pact file #1587

coco1979ka opened this issue Jul 28, 2022 · 0 comments
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@coco1979ka
Copy link

Hi,

I'm currently struggling with setting up a provider verification with the gradle plugin. My configuration in build.gradle.kts looks like this:

pact {
    serviceProviders {
        create("my-provider") {
            verificationType = au.com.dius.pact.provider.PactVerification.ANNOTATED_METHOD
            packagesToScan = listOf("bar.foo.backend")

            hasPactWith("my-consumer", closureOf<GradleConsumerInfo>{
                pactSource = file("path/to/my/pactfile")
            } as Closure<GradleConsumerInfo>)
        }
    }
}

When I try to run the task pactVerify it throws an error: Cannot invoke "au.com.dius.pact.provider.gradle.Broker.getPactBrokerUsername()" because the return value of "au.com.dius.pact.provider.gradle.PactPluginExtension.getBroker()" is null

Same happens when I do the same configuration with grade DSL. I wonder why the broker object is required to be present, if I'm using hasPactWith and providing a file path.

@rholshausen rholshausen added the bug Indicates an unexpected problem or unintended behavior label Jul 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants