Hi all, My .net code for provider is on gitlab at ...
# pact-net
p
Hi all, My .net code for provider is on gitlab at the moment. (NOTE : Consumer pacts are already published on pact broker and are in unverified state) The piece of code (as shown in screenshot) is doing its job correctly when I run it from local. (i.e. pact getting verified) But when I am running it via my git cicd job, the job is successful, but my pact on the broker is not getting verified. All I am doing in that job is running the tests present in provider side for verification. (See git yaml script for job in ss below) Can someone help me find what I may be missing here?
y
the pact url should be a url of a pact to verify, not the endpoint of the latests pacts for a consumer/provider, that will be terribly undeterministic. there should be two types of provider build, one that runs everytime a provider build runs, and verifies any pacts via consumer version selectors. the uri source is for webhooks, where a single pact requiring verification triggers a provider verification task to verify that specific pact
👀 1
you version numbers should not be hard-coded either, they should be set to a variable that describes your point in code, ideally a git commit but it may be some other identifier in your org. It would help if you provided context for others as your setup for publishing and what state the pending pact is in, does it have a version/branch/tag.
p
Hey Yousaf, this is more like in demo phase right now. Will look into the hard coded values. Update on the above issue. Figured out the issue. At least now, the gitlab provider job is verifying and publishing on the pact broker. But it is failing right now. The test is failing with the following error. "Request Failed - One or more of the setup state change handlers has failed" But the same is working when running test cases from local (visual studio). (Please refer to above screenshot of test case and the logs attached to this message)
y
Hey no worries, that explains it 🙂 do you have a provider state url in your test? it will be trying to hit an endpoint on your service to set the state but your service is returning a 407
p
The build is going through the same piece of code as when we build in local, right? Why is it working from local and not from git? Is there anything we can do on the CICD job to overcome this issue, @Yousaf Nabi (pactflow.io)?
We are using proxy to access the external pact broker. (Shown in job screenshot) Then we are getting 407: Proxy Authentication Required Are we missing something here?