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

@IgnoreNoPactsToVerify passes verification tests when a connection to the pact-broker can't be established #1322

Closed
jarmy opened this issue Mar 10, 2021 · 2 comments

Comments

@jarmy
Copy link

jarmy commented Mar 10, 2021

If running a Pact verification SpringBootTest with @IgnoreNoPactsToVerify and there's no SSL/TLS certificates installed allowing a connection to the pact-broker, the test will pass with No pacts found to verify. After enabling debugging on the test side, I was able to find this event (full log
pact_SSLHandshakeException.log):

09:53:46.187 [DEBUG] [TestEventLogger]     2021-03-10T09:53:46.154-0800 [Test worker] WARN  a.c.d.pact.core.pactbroker.HalClient - Could not fetch the root HAL document
09:53:46.187 [DEBUG] [TestEventLogger]     javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

I'd like to think that if no connection can be made to the broker, the test would fail.

Here's the pact libraries we're using:

    testImplementation "au.com.dius.pact.provider:junit5:4.1.7"
    testImplementation "au.com.dius.pact.provider:junit5spring:4.1.7"
@uglyog
Copy link
Member

uglyog commented Mar 13, 2021

@jarmy could you try with the latest versions (4.1.17)? The error handling was changed.

@jarmy
Copy link
Author

jarmy commented Mar 15, 2021

@uglyog After upgrading, the test fails with au.com.dius.pact.core.pactbroker.InvalidNavigationRequest: Failed to fetch the root HAL document. This is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants