:wave: Do we have any provider or consumer impleme...
# general
d
👋 Do we have any provider or consumer implementation examples for
pact-clojure
?
y
https://github.com/pact-foundation/pact-jvm?tab=readme-ov-file#use-clojure-i for the consumer side, we don’t have a provider verification test written in clojure as an example https://github.com/pact-foundation/pact-jvm/issues/1179 unless you are using Leiningen (of which there is a specific lein plugin for pact jvm provider) https://docs.pact.io/implementation_guides/jvm/provider/lein
d
@Yousaf Nabi (pactflow.io) we are using
lein
, the above documentation for provider verification it is basically asking us to add the plugin, thats it? What about the tests? We just need to define in project, thats it?
Can someone confirm what is the version for
<http://au.com|au.com>.dius/pact-jvm-provider-clojure
? I tried to add this into my dependency, i get the error below
Copy code
lein test insights.contract.provider-state-verification-search-test
Could not find artifact au.com.dius:pact-jvm-provider-clojure:jar:4.2.10 in central (<https://repo1.maven.org/maven2/>)
Could not find artifact au.com.dius:pact-jvm-provider-clojure:jar:4.2.10 in clojars (<https://repo.clojars.org/>)
Could not transfer artifact au.com.dius:pact-jvm-provider-clojure:jar:4.2.10 from/to github (<https://maven.pkg.github.com/UserTestingEnterprise/utools-clj>): authentication failed for <https://maven.pkg.github.com/UserTestingEnterprise/utools-clj/au/com/dius/pact-jvm-provider-clojure/4.2.10/pact-jvm-provider-clojure-4.2.10.jar>, status: 401 Unauthorized
Failed to read artifact descriptor for au.com.dius:pact-jvm-provider-clojure:jar:4.2.10
This could be due to a typo in :dependencies, file system permissions, or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.
y
I’ve never used leiningen or clojure, so I am just going by the docs
d
My question is do we still need to write a spec for the provider or just a plugin?
d
It looks like it’s the example for http requests only! Wondering how can we implement for message pacts
@Yousaf Nabi (pactflow.io) It turns out that it won't be easy to use the leiningen plugin, because i can't find examples for testing kafka messages, all the examples i can find are for REST calls.
Can someone help on this please 👆
y
d
@Yousaf Nabi (pactflow.io) is anyone can help me with the issues im facing for the clojure message verification, the above one doesnt have any proper example, it didnt work for mw
I commented here for the issue i'm facing, would some one have a look and help us please? @uglyog FYI
Can someone help here please? thanks
y
Hey @Dilip Punna I’ve replied in the GH issue. Going to try and take a bit of a look at getting a project setup today but I am new to Clojure so would appreciate your help in getting an example that we can use. We can start with the codebase first and then try and apply the tests, and work out what we need from there 👍
d
Any update on this @Yousaf Nabi (pactflow.io)?
y
d
Thanks, so the recommendation is using the Java runner instead the lein plugin, correct?
y
It seems like the path of least resistance without forking the codebase and working on the lein plugin. Once you have a working test, you can probably work out how you would need to modify the lein plugin in order to have a nicer lein experience, with all the features you require
d
The question is how can we run junit in the clojure leing project?