bethskurrie
2018-03-24 03:38
has joined #pact-ruby

bethskurrie
2018-04-05 04:09
/github subscribe pact-foundation/pact-ruby

bethskurrie
2018-05-02 05:00
/github unsubscribe pact-foundation/pact-ruby deployments public commits

bethskurrie
2018-05-21 03:26
/github subscribe pact-foundation/pact-mock_service

bethskurrie
2018-05-21 03:26
/github unsubscribe pact-foundation/pact-mock_service commits

bethskurrie
2018-05-21 03:26
/github unsubscribe pact-foundation/pact-mock_service public

bethskurrie
2018-05-21 03:26
/github unsubscribe pact-foundation/pact-mock_service deployments

bethskurrie
2018-05-21 03:27
/github subscribe pact-foundation/pact-support issues pulls releases statuses

bethskurrie
2018-05-21 03:27
/github unsubscribe pact-foundation/pact-support public

bethskurrie
2018-05-21 03:27
/github unsubscribe pact-foundation/pact-support commits

bethskurrie
2018-05-21 03:27
/github unsubscribe pact-foundation/pact-support deployments

bethskurrie
2018-05-21 03:28
/github unsubscribe pact-foundation/pact-support statuses

bethskurrie
2018-05-21 03:28
/github unsubscribe pact-foundation/pact-mock_service statuses

mboudreau
2018-05-31 02:32
has joined #pact-ruby

gonzalogarcia243
2018-06-08 14:59
has joined #pact-ruby

matt
2018-06-11 01:40
has joined #pact-ruby

gbeckmann
2018-06-12 20:43
has joined #pact-ruby

ragarwal
2018-06-22 03:49
has joined #pact-ruby

jim
2018-07-23 18:01
has joined #pact-ruby

nabrosimova
2018-07-31 20:39
has joined #pact-ruby

nabrosimova
2018-07-31 20:40
Hi, I am trying to figure out how to do file_upload in ruby. Both provider and consumer are written in ruby. I did see pact-jvm examples with scala. But really need examples of how i can set it up in ruby

bethskurrie
2018-07-31 22:12
Hi @nabrosimova. What content type are you using?

nabrosimova
2018-07-31 22:14
hi, i have a file upload call that in place of body has payload something like this `multipart: true, file: file, name: name`

nabrosimova
2018-07-31 22:16
the whole problem is.. it first doesnt see the payload. second of all i need to pass in file for the call and i dont know how to do that in ruby. i saw this https://github.com/DiUS/pact-jvm/commit/3f9a03ef66d97f411d2b959527a693f2c2cd188a but couldnt find an example of how to use it in ruby

nabrosimova
2018-07-31 22:22
when i check how the call actually looks like it looks something like "headers": { "Content-Type": "multipart/form-data; boundary=----WebKitFormBoundary1bvPHrYmtx0UNv2e" }, "body": "------WebKitFormBoundary1bvPHrYmtx0UNv2e\r\nContent-Disposition: form-data; name=\"file\"; filename=\"476.csv\"\r\nContent-Type: text/csv\r\n\r\ndata\r\n------WebKitFormBoundary1bvPHrYmtx0UNv2e--\r\n" }

nabrosimova
2018-07-31 22:24
but RubyFormBoundaryPs4ifEBhAkIzfpNe is autogenerated and is always different... so i cannot just make it up

nabrosimova
2018-07-31 23:24
@bethskurrie is there any way i can test upload file without having to worry about rubyForm boundary changing

bethskurrie
2018-08-01 00:11
@uglyog I'm sure I've seen an example for pact-jvm with this. How did you get around it?

bethskurrie
2018-08-01 00:14
It wouldn't be too hard to write a diff for multipart form, but I want to keep the functionality as similar as possible.

bethskurrie
2018-08-01 00:16
Oh, right, just read the groovy link. I'll see if I can work it out when I'm at my computer.

uglyog
2018-08-01 00:20
has joined #pact-ruby


bethskurrie
2018-08-01 01:02
So, parse the body and do the matching ignoring the boundary.

bethskurrie
2018-08-01 01:03
Exact matching for the non boundary fields?

nabrosimova
2018-08-01 17:23
yeah i tried to do this manually

nabrosimova
2018-08-01 17:23
body: Pact.like('------RubyFormBoundary2AQPyCUtPGtlPQKQ\r\nContent-Disposition: form-data; name=\"file\"\r\n\r\n\r\n------RubyFormBoundary2AQPyCUtPGtlPQKQ\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nFish in a Pond!\r\n------RubyFormBoundary2AQPyCUtPGtlPQKQ--\r\n')

nabrosimova
2018-08-01 17:23
but the problem is it doesnt see it as file, it sees it as string

nabrosimova
2018-08-01 17:24
and i am not sure how to use groovy with ruby

nabrosimova
2018-08-01 17:37
"headers": { "Content-Type": "multipart/form-data; boundary=----RubyFormBoundary2AQPyCUtPGtlPQKQ", "Content-Length": "235", "Accept": "*/*", "Accept-Encoding": "gzip, deflate", "User-Agent": "rest-client/2.0.2 (linux-gnu x86_64) ruby/2.4.4p296", "Authorization": "pact_notorious_secret", "HOST": "localhost:2345" }, "body": "------RubyFormBoundary2AQPyCUtPGtlPQKQ\\r\\nContent-Disposition: form-data; name=\\\"file\\\"\\r\\n\\r\\n\\r\\n------RubyFormBoundary2AQPyCUtPGtlPQKQ\\r\\nContent-Disposition: form-data; name=\\\"name\\\"\\r\\n\\r\\nFish in a Pond!\\r\\n------RubyFormBoundary2AQPyCUtPGtlPQKQ--\\r\\n",

bethskurrie
2018-08-02 07:12
@nabrosimova you won't be able to do it until I write a new feature for pact ruby.

bethskurrie
2018-08-02 07:12
Can you raise an issue in the pact-ruby repository please?

nabrosimova
2018-08-02 17:19
i did raise an issue but also i got it to almost work.. though it gives me `Encoding::UndefinedConversionError - "\x9F" from ASCII-8BIT to UTF-8` error

nabrosimova
2018-08-02 17:20
when i try to make pact with real non-empty file

nabrosimova
2018-08-02 17:34
also, i can try to make pact with empty mov file but it fails on returning me the wrong response, by saying that transcoding process failed

nabrosimova
2018-08-02 17:45
Also, i am just an intern and my time ends soon, so I was wondering if that feature will be added, how long it will take?

bethskurrie
2018-08-03 09:18
It shouldn't take too long, but my time is limited. I'll see if I can get it done this week. Is that fast enough?

nabrosimova
2018-08-03 14:49
0.0 that fast wow!

nabrosimova
2018-08-03 14:50
i will try to help you as much as I can, just let me know what you needf

rcheeniyil
2018-08-03 20:03
has joined #pact-ruby

mbudde
2018-08-09 08:47
has joined #pact-ruby

lkingsley
2018-08-09 20:20
has joined #pact-ruby

lkingsley
2018-08-09 20:27
Is it possible to have a pact spec that tests multiple requests?

bethskurrie
2018-08-09 21:53
That is a very ambiguous question @lkingsley!

bethskurrie
2018-08-09 21:54
Do you mean, can you set up multiple interactions on the mock service at the same time? Yes.

bethskurrie
2018-08-09 21:54
Do you mean, can you chain together a group of requests to replay together? No.

bethskurrie
2018-08-09 21:55
Do you mean, can you mock multiple requests to different providers at the same time? Yes.

lkingsley
2018-08-09 22:12
More specifically I want to upload a file but first need to send a post request telling the server about the size and file type so it can be ready for it. It will then return a unique key, a new url for me to send another post request to but Im unsure how to set up the test if I do not know the url or key value until the first test has run. Does this sound at all possible? @bethskurrie

bethskurrie
2018-08-09 22:13
No. You need to test each request separately

bethskurrie
2018-08-09 22:14
Use provider states to set up the correct data so that when you do the file upload, it matches the file.

lkingsley
2018-08-09 22:14
Okay thanks. Sorry for the confusion.

bethskurrie
2018-08-09 22:14
Np

bethskurrie
2018-08-09 22:15
There is a section on provider states in http://docs.pact.io if you're unfamiliar with them.

lkingsley
2018-08-10 16:21
Yea the only issue is when setting this up in a provider state it doesn?t give me the necessary information to make the request.

simon.nizov
2018-08-12 09:05
has joined #pact-ruby

nabrosimova
2018-08-24 18:04
hey, i am running into weird error trying to implement verification in jenkins...

nabrosimova
2018-08-24 18:04
it looks like gem cannot find spec_helper?

tom397
2018-09-26 13:45
has joined #pact-ruby

tom397
2018-09-26 13:50
Hello! Quick question! Is there a way to consume `params` from a provider state listed in a pactfile while implementing the `provider_state` on the provider? _Example:_ Pact file: ``` "interactions": [ { "description": "/api/v3/animals/:id", "providerStates": [ { "name": "an animal named Spot", "params": { "name": "Spot" } } ], ``` Provider state: ``` provider_state "an animal named Spot", params do Dog.new(params.name) end ``` Apologies if any of this is unclear, I'm happy to clarify just let me know! Thanks!!

bethskurrie
2018-10-01 09:22
Not yet @tom397 because I haven't yet implemented v3 pact specification in Ruby.

bethskurrie
2018-10-01 09:23
If you're using param, your provider is v3, and ruby only implements v2 so far (just because I haven't had time to do it)

bethskurrie
2018-10-03 23:21
@tom397 I've added provider state params support to the ruby impl. ``` set_up do | params | do Alligator.new(name: params.fetch('name')).save! end ```

bethskurrie
2018-10-03 23:22
You'll need version 1.36.0 of the pact gem

bethskurrie
2018-10-03 23:23
if you're verifying v3 pacts, you can now access the provider state params in the set up and tear down blocks. You'll need version 1.36.0 of the pact gem. ``` set_up do | params | do Alligator.new(name: params.fetch('name')).save! end ```

paulswilliams
2018-10-04 06:52
has joined #pact-ruby

tom397
2018-10-09 18:25
Amazing!! Thanks @bethskurrie!

louiseavelar
2018-10-11 16:49
has joined #pact-ruby

marco.dellolio
2018-10-28 01:28
has joined #pact-ruby

hansrd_98
2018-11-02 01:42
has joined #pact-ruby

marco.dellolio
2018-11-05 19:40
@bethskurrie I found an old discussion https://github.com/pact-foundation/pact-ruby/issues/49, do we have any system in place generate a valid JWT:Token in the `Provider::Verify`? I have a `before_action :ensure_signed_jwt!` in my controller with a JWT valid for 10 minutes.

brian.smith.keith
2018-11-05 21:25
has joined #pact-ruby

marco.dellolio
2018-11-06 02:15
As a general question, how the provider proxy relates to the the actual provider?

marco.dellolio
2018-11-06 02:16
Do I have to use a brand new application as Pact Provider proxy?

bethskurrie
2018-11-06 02:26
Not yet, but you can use middleware to modify the request with a live token. Which language are you using @marco.dellolio?

marco.dellolio
2018-11-06 02:27
For the moment ruby, but I will have the same issue with Elixir

marco.dellolio
2018-11-06 02:27
and potentially a Node application

bethskurrie
2018-11-06 02:27
Do you mean in the ruby? It's for performing verifications against a running provider, rather than a rack app.

marco.dellolio
2018-11-06 02:28
I was looking into the https://github.com/pact-foundation/pact-provider-verifier is it a standalone application? And more specifically how it relates to the real provider? I?m not quite sure about the workflow

bethskurrie
2018-11-06 02:28
With native ruby, make some rack middleware and wrap it around your app when you configure it on the provider side.

bethskurrie
2018-11-06 02:29
You'll find an example in the "verifying pacts" documentation on the Pact ruby wiki.

bethskurrie
2018-11-06 02:29
With the other languages, it's the same middleware, but you'll configure it differently. Look at the docs for the pact provider verifier cli.

bethskurrie
2018-11-06 02:31
Pact provider verifier is for use against running apps of any language. It's packaged as a cli, but if you're using ruby, you'd just use the native gem. It's much more elegant.

bethskurrie
2018-11-06 02:31
It's deprecated now, in favour of the pact provider verifier

marco.dellolio
2018-11-06 02:32
Yeah I?ve been reading those today. If I understand correctly the flow is the following. I put my pact files in the proxy provider (locally or broker), the proxy provider is a standalone app (a docker container e.g) which hits the real provider end-point and verify the pact file?

bethskurrie
2018-11-06 02:35
There is no proxy.

bethskurrie
2018-11-06 02:35
The pacts go in the broker.

bethskurrie
2018-11-06 02:36
The broker does not proxy, and it does not run any tests. It is a repository for pacts and verification results.

bethskurrie
2018-11-06 02:36
The consumer tests run with a mock service and generate the pacts

bethskurrie
2018-11-06 02:37
The pact is verified against a rack app, if you're using native ruby, or a running application if not.

bethskurrie
2018-11-06 02:39
The pact can be exchanged via a broker, or if you're just playing around, you can just point to the local file on your file system.

bethskurrie
2018-11-06 02:41
The pact provider verifier takes the pact, and behaves like a mock consumer, replaying the request against the provider, and checking the response matches the expected response.

marco.dellolio
2018-11-06 02:41
until this point it?s all clear. What I still not fully understand is : Where https://github.com/pact-foundation/pact-provider-proxy/ this should live? In my provider or it is an independent application?

bethskurrie
2018-11-06 02:41
Ignore that. You don't need it.

marco.dellolio
2018-11-06 02:41
ok

bethskurrie
2018-11-06 02:41
We don't use that any more.

bethskurrie
2018-11-06 02:42
It's been replaced with the pact-provider-verifier

bethskurrie
2018-11-06 02:42
But if you're verifying a ruby rack app, you just need the pact gem, nothing else.

marco.dellolio
2018-11-06 02:43
In a ruby app are you actually suggesting this option? ``` class ProxyApp def initialize real_app @real_app = real_app end def call env @real_app.call(env.merge('HTTP_AUTHORIZATION' => '12345')) end end Pact.service_provider "Some Provider" do app do ProxyApp.new(RealApp) end honours_pact_with "Some Consumer" do #... end end ```

bethskurrie
2018-11-06 04:18
Yup

marco.dellolio
2018-11-06 04:23
I?m making my way through it! The problem is the new application doesn?t recognize my models. When I run this in the provider state ``` set_up do raw_email = File.read("spec/fixtures/emails/email.eml") RawEmail.create( tenant_id: 1, message_id: "CAAWRWJD5Dvw64zAzYurfsfDB22UGakRBd=P0ZCmjV7_UZPuxDg@mail.gmail.com", raw_email: raw_email ) end ``` it errors out `NameError:uninitialized constant RawEmail`

marco.dellolio
2018-11-06 04:24
Should I manually import my models?

bethskurrie
2018-11-06 04:28
Is this a rails app?

marco.dellolio
2018-11-06 04:28
yes

bethskurrie
2018-11-06 04:29
What is the main entry point of your app if you were running it? The thing that requires all the other files? You'll need to require that in the pact helper.

marco.dellolio
2018-11-06 04:31
I?m already requiring `'config/application'` which already requires `require "rails/all"` and `config.autoload_paths += [Rails.root.join("app")]` which includes the models

bethskurrie
2018-11-06 04:32
I'm afraid I can't help you without seeing your code then. It sounds like it should work.

bethskurrie
2018-11-06 04:32
It runs OK when you use the real endpoint?

marco.dellolio
2018-11-06 04:33
yep

nic
2018-11-06 13:09
has joined #pact-ruby

a.carpe
2018-11-06 13:19
has joined #pact-ruby

a.carpe
2018-11-06 15:02
where should I start to look into to start implementing V3 matchers?


uglyog
2018-11-07 21:38
Then have a look at the existing implementations in Pact-JVM and in the Rust implementation

a.carpe
2018-11-08 09:40
Ok, thank you

marco.dellolio
2018-11-08 14:01
Hey all, I?m having hard time parsing my provider verifier query params in a rails app

marco.dellolio
2018-11-08 14:01
this is how the request looks like in the controller ``` request => #<ActionDispatch::Request:0x00007fbb11d3cb50 @env= {"rack.version"=>[1, 3], "rack.input"=>#<StringIO:0x00007fbb133b93d8>, "rack.errors"=>#<StringIO:0x00007fbb133b9568>, "rack.multithread"=>true, "rack.multiprocess"=>true, "rack.run_once"=>false, "REQUEST_METHOD"=>"GET", "SERVER_NAME"=>"http://example.org", "SERVER_PORT"=>"80", "QUERY_STRING"=>"%7B%22tenant_id%22%3A1%2C%22message_id%22%3A%22CAAWRWJD5Dvw64zAzYurfsfDB22UGakRBd=P0ZCmjV7_UZPuxDg%40mail.gmail.com%22%7D", ```

marco.dellolio
2018-11-08 14:02
this is how params get parsed `<ActionController::Parameters {"{\"tenant_id\":1,\"message_id\":\"CAAWRWJD5Dvw64zAzYurfsfDB22UGakRBd"=>"\"}", "format"=>"json",`

marco.dellolio
2018-11-08 17:59
So the problem is PACT is building the query string out ``` "body": { "tenant_id": 1, "message_id": "" } ```

marco.dellolio
2018-11-08 18:00
parsing the object and not the key values resulting in this ``` "%7B%22tenant_id%22%3A1%2C%22message_id%22%3A%22CAAWRWJD5Dvw64zAzYurfsfDB22UGakRBd=P0ZCmjV7_UZPuxDg%40mail.gmail.com%22%7D" ``` instead of ``` tenant_id=1&message_id=22CAAWRWJD5Dvw64zAzYurfsfDB22UGakRBd=http://P0ZCmjV7_UZPuxDg%40mail.gmail.com ```

jani.jegoroff
2018-11-10 19:54
has joined #pact-ruby

kurst03
2018-11-18 00:52
has joined #pact-ruby

simon.nizov
2018-11-26 11:58
Hey, I just stumbled upon the following scenario: I started implementing pact on an existing project that currently uses VCR. I was getting errors from VCR about unrecorded cassettes for requests that pact was trying to make to the mock service. Obviously I don?t want to record those. The solution was to add the following configuration to VCR to ignore requests made to the mock service: ``` VCR.configure do |c| config.ignore_request do |request| URI(request.uri).port == 1234 # Ignore requests to Pact mock service end end ``` I would like to add this little piece of information to the docs somewhere, to save some research time for future users. Where would be the best place for this? Is there a ?gotchas? section I can put this under?

rahul.neotech
2018-11-27 21:02
has joined #pact-ruby

rahul.neotech
2018-11-27 21:05
Has anyone here tried using pact with protobufs?

simon.nizov
2018-11-29 14:59
@bethskurrie?

rahul.neotech
2018-11-29 18:50
Hi :wave: I?m using pact-ruby to write a contract test for our consumer and provider service. Our services communicate via protos and the protos are encoded when sent over the wire. When the protos are encoded, they contain certain characters that are not JSON serializable (pact throws; an error I received looks like this - "\xC8" from ASCII-8BIT to UTF-8). I was able to overcome this by Base64 encoding the request and response - in the pact gem - before it is JSON serialized in the consumer - and then Base64 decoding it in the provider before it is used for verification. I?m wondering if there?s a better solution for what I?m doing. Can someone help?

ravbaker
2018-12-09 20:55
has joined #pact-ruby

bitsapien
2018-12-31 07:58
has joined #pact-ruby

jdesouza
2019-01-03 13:08
has joined #pact-ruby

simon.nizov
2019-01-06 14:42
Hey guys, quick question, should I push the automatically created pact json file to the git repository?

pravera
2019-01-23 14:00
has joined #pact-ruby

simon.nizov
2019-03-03 09:39
While debugging my unit test on the consumer, is there a way to list all the interactions currently registered on the mock service?

krzysztof.stepniak
2019-03-07 14:34
has joined #pact-ruby

krzysztof.stepniak
2019-03-07 14:37
Hey guys, are you going to resolve problem with encoding https://stackoverflow.com/questions/51604866/pact-verifier-is-failing-with-encodingundefinedconversionerror-xe2-from-as https://github.com/pact-foundation/pact-python/issues/97 and https://github.com/pact-foundation/pact-ruby-standalone/issues/27 I have the same problem with encoding on pact js when im trying to post request to my mock. Returned ruby error stack with ` Error ocurred in mock service: Encoding::UndefinedConversionError - "\x89" from ASCII-8BIT to UTF-8`

bockus
2019-03-08 04:44
has joined #pact-ruby

thomas.koppensteiner
2019-03-11 15:00
has joined #pact-ruby

zach.powell
2019-03-18 11:04
has joined #pact-ruby

mmarcottulio
2019-03-25 18:22
has joined #pact-ruby

qatrera
2019-04-02 13:55
has joined #pact-ruby

bheemreddy181
2019-04-02 15:37
has joined #pact-ruby

000sps97
2019-04-03 12:18
has joined #pact-ruby

000sps97
2019-04-03 12:31
Hey, I am currently working on a project that requires a lot of key values to be compared in response where response is a hash, i want to use something like `Pact.like(responseHash)` instead of `Pact.like(key1: "value1", Key2: "value2" ,...)`, but the finally created json `"matchingRules": { "$.body": { "match": "type" } }`

000sps97
2019-04-03 12:32
instead of matching each key value pair

000sps97
2019-04-03 12:33
GOLang version of has something like dsl.match which can take in a struct

000sps97
2019-04-03 12:34
do we have a similar thing in pact-ruby as well?

000sps97
2019-04-03 12:35
can someone share the tentative date of v3 release?

simon.nizov
2019-04-03 12:43
@000sps97 both snippets of code you mentioned will work the same. The resulting matching rule will match each key value pair in the `responseHash` you provide as you want it to

000sps97
2019-04-03 12:53
@simon.nizov does ` matchingRules": { "$.body": { "match": "type" } } ` match to every key value in the response ? shouldn't it be something like ` matchingRules": { "$.body.key1":{"match":"type"} "$.body.key2":{"match":"type"} }

simon.nizov
2019-04-03 14:05
@000sps97 yup. You can test it easily by verifying the pact against your provider

bheemreddy181
2019-04-05 20:15
Is there a way i can use TEST_DB on provider side than using Development DB ?

bheemreddy181
2019-04-07 12:16
If you run rspec on test dB you can just do ?require rails_spec.rb? which fixes this

bheemreddy181
2019-04-07 12:16
This can be ignored

jon.pascoe
2019-04-09 11:17
has joined #pact-ruby

jon.pascoe
2019-04-09 11:20
Hello! I've looked online and can't find anybody mentioning this use-case, so was wondering if anybody here had any suggestions. I'm building a collection of rails apps, which each have an internal API provided by a Rails Engine (gem) that I'm building. That API is both a consumer and provider, and is tested using Pact. I've got the consumer tests working fine, and verified on the provider (another rails app). However, I'm struggling to get the provider verification working in the Rails Engine.

jon.pascoe
2019-04-09 11:20
because it's not a full Rails app, there is no `http://config.ru` in the root of the project

jon.pascoe
2019-04-09 11:21
I get this when trying to verify the pacts: ```Failure/Error: raise "Could not find http://config.ru file at #{Pact.configuration.config_ru_path} Please configure the service provider app or create a http://config.ru file in the root directory of the project. See https://github.com/pact-foundation/pact-ruby/wiki/Verifying-pacts for more information." ```

bethskurrie
2019-04-09 11:21
Is there a rack app?

jon.pascoe
2019-04-09 11:21
Well, there's the dummy app in the `spec` folder used for testing

jon.pascoe
2019-04-09 11:21
I tried setting up the verify task in the Rakefile for the dummy app, but that wasn't happy either

bethskurrie
2019-04-09 11:22
I don't know what a rails engine is, but if there is a rack interface, you can just set the app { RailsEngine.new } in the top level of the provider config.

bethskurrie
2019-04-09 11:23
Sorry, on phone.

jon.pascoe
2019-04-09 11:23
Rails Engine is basically a mini rails app that you can mount inside another rails app

jon.pascoe
2019-04-09 11:23
definitely rack based

bethskurrie
2019-04-09 11:23
Right.

jon.pascoe
2019-04-09 11:23
i'll give that a try

bethskurrie
2019-04-09 11:24
So, set the app. You should find docs in the Verifying Pacts page.

bethskurrie
2019-04-09 11:24
Of the wiki.

jon.pascoe
2019-04-09 11:26
Ah ... fixed it

jon.pascoe
2019-04-09 11:27
I had to add this in my pact_helper:

jon.pascoe
2019-04-09 11:27
```Pact.configuration.config_ru_path = "spec/sample_app/config.ru" ```

bethskurrie
2019-04-09 11:27
:+1:

jon.pascoe
2019-04-09 11:27
thank you!

bethskurrie
2019-04-09 11:27
NP.

bethskurrie
2019-04-09 11:40
BTW, @jon.pascoe I thought I'd fixed the interpolation in that error message you got. What version of the pact gem are you using?

jon.pascoe
2019-04-09 12:21
`pact (1.40.0)`

jon.pascoe
2019-04-09 12:21
`pact_broker-client (1.18.0)`

jon.pascoe
2019-04-09 12:23
I think they?re the most recent versions @bethskurrie

jon.pascoe
2019-04-09 12:49
On the topic of `webmock` ? I have an issue with it interfering with uploading pact verification results ? and I can?t see where to hook in the command to disable webmock

jon.pascoe
2019-04-09 12:49
```WebMock::NetConnectNotAllowedError: Real HTTP connections are disabled. Unregistered request: GET https://site.pact.dius.com.au/pacts/provider/.../diff/previous-distinct with headers {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'User-Agent'=>'Ruby'}```

jon.pascoe
2019-04-09 12:51
this is using the `publish_verification_results` setting in the `Pact.service_provider` declaration to trigger uploading the results

qatrera
2019-04-09 13:09
I have it in my pact_helper.rb file

jon.pascoe
2019-04-09 13:32
I tried that and couldn?t get it working

jon.pascoe
2019-04-09 13:32
Instead I added this to my `rails_helper.rb`: ```WebMock.disable_net_connect!(allow_localhost: true, allow: "http://site.pact.dius.com.au")```

jon.pascoe
2019-04-09 13:34
How have you set it up @qatrera?

qatrera
2019-04-09 14:13
Well I use and old version of `Typhoeus` instead of `WebMock` so maybe what works for me it's not transferable to you. And we also have the pact broker hosted in house

bethskurrie
2019-04-11 04:46
I would have disabled WebMock for that domain the same way.

slack1949
2019-04-13 17:36
has joined #pact-ruby

bheemreddy181
2019-04-18 20:32
@bethskurrie @matt.fellows https://github.com/pact-foundation/pact-ruby-standalone this is to replace all the gems and use one for everything both on provider and consumer side

matt.fellows
2019-04-18 20:32
has joined #pact-ruby

bheemreddy181
2019-04-20 03:59
Ruby folks here Do you people use Semantic versioning to version pacts or pass commit hash as input for pacts ?



bheemreddy181
2019-04-20 04:24
I got this but the problem comes here is ho do we do it through the code like our semantic versioning only sits in the releases

matt.fellows
2019-04-20 04:51
@bethskurrie any ideas?

bethskurrie
2019-04-20 04:53
Sits?

bethskurrie
2019-04-20 05:57
If you know or can work out your sha at release time, I'd recommend using a git sha. If you use your semantic version, you'll tend to have multiple commits, and hence, builds and pacts per minor or patch version, and that means you're overwriting the previous pact version with that semantic version. You can do it, but things tend to work better when your data is immutable (ie one pact version per consumer version number).

bethskurrie
2019-04-20 05:58
You eliminate race conditions, and you get a more fine grained "matrix" of test results.

matt.fellows
2019-04-20 06:38
@bheemreddy181 when you say "sits in the release" do you mean you don't version things until you release? What's the process you use to version now?

bheemreddy181
2019-04-20 12:38
Ya that?s true we don?t tag the app until we plan to release

matt.fellows
2019-04-20 12:46
You don?t have to give your published app version the exact tag you push to the broker (although it probably is more convenient).


bethskurrie
2019-04-21 00:22
They're two different ways of doing the same thing.

bethskurrie
2019-04-21 00:23
Typically, you would do it the first way.

bethskurrie
2019-04-21 00:23
You can add extra verification tasks if you want to do custom verifications (eg verify a pact on your local machine)

bethskurrie
2019-04-21 00:24
You should give the pact helper configuration the broker details though, and it will fetch all the pacts from the broker. You don't have to use the specific urls.

bheemreddy181
2019-04-21 17:59
Little confused, can you please elaborate

bheemreddy181
2019-04-21 17:59
For the last point

bheemreddy181
2019-04-22 14:57
@bethskurrie Here is another quick question - On this verification task, the version belongs to Consumer or Provider ? https://github.com/pact-foundation/pact-ruby-e2e-example/blob/c54dd9da813c58261b9a83e6249b1d62920fb72b/provider/Rakefile#L27

matt.fellows
2019-04-22 23:53
consumer

bethskurrie
2019-04-22 23:55
typically you'd use `pacts/provider/Bar/consumer/Foo/latest` though

bethskurrie
2019-04-22 23:55
you don't want to fix it to a particular version.


bheemreddy181
2019-04-23 01:01
when you say consumer how will the provider know which version he has to verify with @matt.fellows

bethskurrie
2019-04-23 01:01
the latest version should be used generally

bethskurrie
2019-04-23 01:02
you dont' fix it to a particular version. But, it is recommended that you fix it to a particular tag. eg "the latest dev pact" or "the latest prod pact"

matt.fellows
2019-04-23 01:02
Beth, is there a way in Ruby to just point at the broker with the provider details and get all of the consumers for a given provider?

bethskurrie
2019-04-23 01:02
the docs are in the link I sent above, or you can use `pacts/provider/Bar/consumer/Foo/latest/TAG_NAME`

bethskurrie
2019-04-23 01:03
yes

bethskurrie
2019-04-23 01:03
the docs in the link I posted above describe it

bethskurrie
2019-04-23 01:03
`#fetching-pacts-from-a-pact-broker`

matt.fellows
2019-04-23 01:03
oh sorry, skipped over that link

bheemreddy181
2019-04-23 01:04
what does this mean ? ``` But, it is recommended that you fix it to a particular tag. eg "the latest dev pact" or "the latest prod pact"```

matt.fellows
2019-04-23 01:04
@bheemreddy181 I?d 100% use the https://github.com/pact-foundation/pact-ruby/wiki/Verifying-pacts#fetching-pacts-from-a-pact-broker strategy. It?s by far the most straightforward way for anything but the most simplest pact setups

bethskurrie
2019-04-23 01:04
have you used tags yet?

bheemreddy181
2019-04-23 01:05
how will the provider know which version of my consumer is in

bethskurrie
2019-04-23 01:05
it uses the latest one

bethskurrie
2019-04-23 01:05
it doesn't care which version it is. it's just whatever the latest version of the pact is.

bheemreddy181
2019-04-23 01:06
what if I want to use the commit hash?

bethskurrie
2019-04-23 01:06
it still uses the most recently published version

bethskurrie
2019-04-23 01:06
it's time based, not semantic

bheemreddy181
2019-04-23 01:08
Does the above link still applies when i use commit hash ?

bethskurrie
2019-04-23 01:08
yes

bheemreddy181
2019-04-23 01:08
Sorry if i am bothering you , i am trying to understand

bethskurrie
2019-04-23 01:09
``` honours_pacts_from_pact_broker do pact_broker_base_url 'http://...' end ```

bheemreddy181
2019-04-23 01:11
How about as a rake task ? So that i can publish the results back

bethskurrie
2019-04-23 01:11
it publishes the results back automatically

bethskurrie
2019-04-23 01:12
actually, here are the docs


bethskurrie
2019-04-23 01:12
Please just read this page top to bottom, and then ask any questions you have.

bheemreddy181
2019-04-23 01:13
Sure

joelbyler
2019-04-25 18:54
has joined #pact-ruby

joelbyler
2019-04-25 19:45
Hello there! I?m wondering if anyone?s using the standalone mock server as explained here? # standalone true

joelbyler
2019-04-25 19:45
oops


matt.fellows
2019-04-26 07:59
:cricket:

matt.fellows
2019-04-26 07:59
This gets used a lot: https://github.com/pact-foundation/pact-ruby-standalone/releases but might not be what you?re after

jon.pascoe
2019-04-29 13:10
We just use the git commit sha

bheemreddy181
2019-05-02 20:13
is there a way i can use let blocks in pact provider states

bheemreddy181
2019-05-04 00:54
@bethskurrie any idea ^

bheemreddy181
2019-05-04 00:56
Here are few more questions : 1. Parma type validations on the API - does required or optional param should happen on the controller of the API - As we are mocking everything underlying logic of the controller what if if you param validations happens inside the some where with in the logic ?

bheemreddy181
2019-05-04 02:33
Parameters* type validations

bheemreddy181
2019-05-04 04:42
@matt.fellows ^

bethskurrie
2019-05-04 04:43
Oh, I had a link on that, went to look for it, got distracted.



bethskurrie
2019-05-05 01:23
No, but you can include helper methods

bheemreddy181
2019-05-05 01:26
which helper methods you mean ?

bheemreddy181
2019-05-05 01:27
```Q: I felt like PACT does give a provision of breaking contracts if none of your consumers is using few fields from your API or not bothered if the type is changed? yet all? Is that true? which might also lead to having just one version of the API unless needed? A: Exactly true, consumer contracts remove the need to version an API. API versioning is a "workaround" because you don't want to break backwards compatibility, and you don't know who is using your API. It's the best technique for a public API. When you know all your consumers, and you know exactly what they're using, you know the impact of change, and hence, you should be able to avoid versioning the API. Q: Can I do a functional test of my provider using PACT? A: You can, but you are not supposed to do that . Give a read from here: https://docs.pact.io/best_practices/consumer/contract_tests_not_functional_tests Q: Do I need to write contracts tests for the complete response of an API? A: No, That's a bad way of writing tests - From Consumer perspective you have to write tests for the fields only you worry about. Q: Why can't I generate a schema from Provider Side and use that as a reference for all future changes? A: Yes you can do that but when your API is public like PUBLIC API and you don't know how your consumers are using your API, else you are tightly coupling your changes to all the fields which are not generally required. Again, you are duplicating the functional tests with your contract tests from the provider side. which should always be consumer driven. Q: Can I generate contract file from Swagger? A: Give a read: https://docs.pact.io/faq#can-i-generate-my-pact-file-from-something-like-swagger Q: Oh Wow, Who will write the Contracts test - which will generate the contract files? A: Its the consumer duty to write the tests pretty much to specific to the fields what consumer bothers rather than writing for complete body validations. on the provider side just that you have to maintain the states of mocks - like Skip authentication so on. Q: Oh This looks like VCR recording, how is it different from that? A: Give a read: https://docs.pact.io/faq/convinceme#but-i-already-have-a-local-mock-server-e-g-vcr-mockserver Q: who will own it, like who will own the contract files? A: Consumer again, each provider can have n - number of consumers and each one might use a different one. So it's the consumer duty from what he uses to write the contract from a consumer perspective. Q: What is PACT_BROKER? Is this a hosted service which should live somewhere and someone should own it? A: Yes this is a hosted service and should be owned by someone. Currently, PACT developers provide a free hosted version of pact_borker with security attached if we want we use that. Else we can have a dedicated host where this service can live, they have a docker image which we can use to host this on our side and do upgrades. Sample free host here: https://pactflow.io/register/ Q: where will it run? A: Our Aim is to run this each Pull-request on Travis/ANY CI TOOL. Q: when will it run? A: On Each Pull Request Q: Do we have to write some code on the provider side? A: StuB the internal functionality of the provider, because of FUNCTIONAL TESTING is the job of the provider to test than tested using consumer driver contracts. Make sure, if you stub, that you don't stub the code that actually parses the request and pulls the expected data out because otherwise, the consumer could be sending absolute rubbish, and the pact:verify won't fail because that code won't get executed ```

bheemreddy181
2019-05-05 01:28
@bethskurrie @matt.fellows are you people inline with the above questions and relative answers , correct me if i am wrong.

bheemreddy181
2019-05-05 01:39
Typically on Consumer PR perspective

bheemreddy181
2019-05-05 01:40
On Provider PR

bheemreddy181
2019-05-05 01:40
Same as these too

bethskurrie
2019-05-05 02:26
Looks good to me. I would say a flat "no" to "can I use pact for functional tests" though.

bheemreddy181
2019-05-05 03:12
Perfect :+1::skin-tone-3:

bheemreddy181
2019-05-05 03:13
@luchillo17 little notes what I prepared would help you understand more ^

qatrera
2019-05-06 09:58
in the first diagram I would say the deploy arrow in the provider is not needed right? I also don't get the Skip section in the second diagram

qatrera
2019-05-06 10:00
Maybe it's worthy to extend the FAQ (https://docs.pact.io/faq) with these Q&As. I found some of them really valid and eye-opening for Pact newbies :slightly_smiling_face:

qatrera
2019-05-06 10:01
Really nice diagram btw :slightly_smiling_face: I still need to find time to dig into the webhooks part to finally integrate the first contract tests in our company :slightly_smiling_face:

bheemreddy181
2019-05-06 20:01
here is a question : i have a rake task in my rake file as this : ```Pact::VerificationTask.new(:portfolio_using_remote_broker) do | pact | pact.uri "#{REMOTE_PACT_BROKER_BASE_URL}/pacts/provider/PGS/consumer/Portfolio/latest", :pact_helper => 'spec/service_consumers/pact_helper.rb' end```

bheemreddy181
2019-05-06 20:02
whereas in my pact helper : ```require_relative './provider_states' Pact.configuration.reports_dir = "./provider/reports" Pact.configure do | config | config.diff_formatter = :embedded end Pact.service_provider "PGS" do app_version '1.0.0' publish_verification_results !!ENV['PUBLISH_VERIFICATIONS_RESULTS'] honours_pact_with 'Portfolio' do # This example points to a local file, however, on a real project with a continuous # integration box, you would use a [Pact Broker](https://github.com/bethesque/pact_broker) or publish your pacts as artifacts, # and point the pact_uri to the pact published by the last successful build. pact_uri 'https://remote:endpoint', {username: '...', password: '...'} end end```

bheemreddy181
2019-05-06 20:03
whenever i do run rake task ``` be rake pact:verify:portfolio_using_remote_broker ```

bheemreddy181
2019-05-06 20:03
i get 401 unauthorized

bheemreddy181
2019-05-06 20:03
i did pass the usernames and passwords as requested in the pact_helper

bheemreddy181
2019-05-06 20:09
it does work when i do append the pact_uri with /pacts/provider/PGS/consumer/Portfolio/latest on the pact help and just run the pact:verify task but that doesn't publish the results

bheemreddy181
2019-05-06 20:09
pact_helper*

bheemreddy181
2019-05-06 23:32
Skip section in the second diagram comes into picture when you publish the same contract every time

bheemreddy181
2019-05-06 23:32
You can post your questions here I will post my answers

bheemreddy181
2019-05-06 23:33
@bethskurrie ^ some help on the above stuff ?

bheemreddy181
2019-05-08 00:17
@bethskurrie Can i get some help on the above stuff

bethskurrie
2019-05-08 00:18
> i get 401 unauthorized

bethskurrie
2019-05-08 00:18
from what?

bethskurrie
2019-05-08 00:18
the broker? the application under verification?

bheemreddy181
2019-05-08 00:21
from broker

bethskurrie
2019-05-08 00:21
have you tried curling the URL and providing the basic auth username and password?

matt.fellows
2019-05-08 00:22
Is it a local broker you?re hosting or our hosted version?

bheemreddy181
2019-05-08 00:22
Hosted version

bethskurrie
2019-05-08 00:23
have you tried curling the URL and providing the basic auth username and password?

bethskurrie
2019-05-08 00:23
curl PACT_URL -u username:password

bheemreddy181
2019-05-08 00:26
that worked ```{"_links":{"self":{"href":"https://bheemreddy.pact.dius.com.au","title":"Index","templated":false},"pb:publish-pact":{"href":"https://bheemreddy.pact.dius.com.au/pacts/provider/{provider}/consumer/{consumer}/version/{consumerApplicationVersion}","title":"Publish a pact","templated":true},"pb:latest-pact-versions":{"href":"https://bheemreddy.pact.dius.com.au/pacts/latest","title":"Latest pact versions","templated":false},"pb:tagged-pact-versions":{"href":"https://bheemreddy.pact.dius.com.au/pacts/provider/{provider}/consumer/{consumer}/tag/{tag}","title":"All versions of a pact for a given consumer, provider and consumer version tag","templated":false},"pb:pacticipants":{"href":"https://bheemreddy.pact.dius.com.au/pacticipants","title":"Pacticipants","templated":false},"pb:latest-provider-pacts":{"href":"https://bheemreddy.pact.dius.com.au/pacts/provider/{provider}/latest","title":"Latest pacts by provider","templated":true},"pb:latest-provider-pacts-with-tag":{"href":"https://bheemreddy.pact.dius.com.au/pacts/provider/{provider}/latest/{tag}","title":"Latest pacts for provider with the specified tag","templated":true},"pb:provider-pacts-with-tag":{"href":"https://bheemreddy.pact.dius.com.au/pacts/provider/{provider}/tag/{tag}","title":"All pact versions for the provider with the specified consumer version tag","templated":true},"pb:provider-pacts":{"href":"https://bheemreddy.pact.dius.com.au/pacts/provider/{provider}","title":"All pact versions for the specified provider","templated":true},"pb:latest-version":{"href":"https://bheemreddy.pact.dius.com.au/pacticipants/{pacticipant}/latest-version","title":"Latest pacticipant version","templated":true},"pb:latest-tagged-version":{"href":"https://bheemreddy.pact.dius.com.au/pacticipants/{pacticipant}/latest-version/{tag}","title":"Latest pacticipant version with the specified tag","templated":true},"pb:webhooks":{"href":"https://bheemreddy.pact.dius.com.au/webhooks","title":"Webhooks","templated":false},"pb:integrations":{"href":"https://bheemreddy.pact.dius.com.au/integrations","title":"Integrations","templated":false},"beta:pending-provider-pacts":{"href":"https://bheemreddy.pact.dius.com.au/pacts/provider/{provider}/pending","title":"Pending pact versions for the specified provider","templated":true},"curies":[{"name":"pb","href":"https://bheemreddy.pact.dius.com.au/doc/{rel}?context=index","templated":true},{"name":"beta","href":"https://bheemreddy.pact.dius.com.au/doc/{rel}?context=index","templated":true}]}}```

bethskurrie
2019-05-08 00:26
well, now you know you have the right creds at least

bethskurrie
2019-05-08 00:26
you've either configured it incorrectly, or there's a bug in the ruby code.

bheemreddy181
2019-05-08 00:28
help me understand one thing here

bheemreddy181
2019-05-08 00:29
when i have my own rake task the credentails are shared from the pact helper ?

bheemreddy181
2019-05-08 00:30
this is my rake task

bheemreddy181
2019-05-08 00:30
```Pact::VerificationTask.new(:portfolio_using_remote_broker) do | pact | pact.uri "#{REMOTE_PACT_BROKER_BASE_URL}/pacts/provider/PGS/consumer/Portfolio/latest", :pact_helper => 'spec/service_consumers/pact_helper.rb' end```

bheemreddy181
2019-05-08 00:30
where i am not using any creds

bheemreddy181
2019-05-08 00:30
but i my pact helper i have these

bethskurrie
2019-05-08 00:30
the rake task is used when you want to override the default behaviour in the pact_helper.rb

bheemreddy181
2019-05-08 00:30
```require_relative './provider_states' Pact.configuration.reports_dir = "./provider/reports" Pact.configure do | config | config.diff_formatter = :embedded end Pact.service_provider "PGS" do app_version '1.0.0' publish_verification_results !!ENV['PUBLISH_VERIFICATIONS_RESULTS'] honours_pact_with 'Portfolio' do # This example points to a local file, however, on a real project with a continuous # integration box, you would use a [Pact Broker](https://github.com/bethesque/pact_broker) or publish your pacts as artifacts, # and point the pact_uri to the pact published by the last successful build. pact_uri 'https://remote:endpoint', {username: '...', password: '...'} end end```

bethskurrie
2019-05-08 00:31
you'll need to give the task the credentials, because you're overriding where the pact comes from

bheemreddy181
2019-05-08 00:31
how can i pass the credentials in my rake task then ?


bheemreddy181
2019-05-08 00:31
but in that cases does my pact helper still needs pact_uri and creds ?

bethskurrie
2019-05-08 00:31
`With basic auth, set the environment variables PACT_BROKER_USERNAME and PACT_BROKER_PASSWORD, or use the basic auth URL format, http://username:password@pactbroker.yourdomain/.... `

bethskurrie
2019-05-08 00:32
why are you making a custom verification task?

bheemreddy181
2019-05-08 00:34
So that I can add that to other rake task which I run as part of my CI build

bethskurrie
2019-05-08 00:34
why do they need to be different?

bheemreddy181
2019-05-08 00:35
When I run for pact helper the verification results aren?t published

bethskurrie
2019-05-08 00:35
you just configure that

bethskurrie
2019-05-08 00:35
`publish_verification_results !!ENV['PUBLISH_VERIFICATIONS_RESULTS']`

bethskurrie
2019-05-08 00:35
on your CI server, you set that env var to true

bethskurrie
2019-05-08 00:35
when you run it locally, it's not set, so the results dont' get published

bethskurrie
2019-05-08 00:35
you shouldn't run a different task.

bethskurrie
2019-05-08 00:35
it's the same task, just configurable.

bheemreddy181
2019-05-08 00:36
Makes sense

bethskurrie
2019-05-08 00:37
Is there something that needs improving in these docs, or did you just miss that bit?

bheemreddy181
2019-05-08 00:37
I felt they were not that clear for a new comer

bethskurrie
2019-05-08 00:38
Are you unfamiliar with Ruby itself?

bheemreddy181
2019-05-08 00:38
Not really but I am not a developer though

bethskurrie
2019-05-08 00:38
Ah, I see.

bheemreddy181
2019-05-08 00:39
Thanks for inputs


bheemreddy181
2019-05-08 00:52
Clear now

bheemreddy181
2019-05-08 00:52
Thanks

bethskurrie
2019-05-08 00:52
:thumbsup::skin-tone-3:

bheemreddy181
2019-05-08 00:53
One more thing when I say provider/consumer/latest does that verify all the pacts which say tags prod and Dev ?

bheemreddy181
2019-05-08 00:53
If I had provided that tags as prod , Dev

bethskurrie
2019-05-08 00:54
the latest pact for each of those tags

bethskurrie
2019-05-08 07:05
@bheemreddy181 if you make a module that has helper method for creating or stubbing your data, you can include that module directly into the provider states code. I think it's something like `Pact.configuration.include YourHelperModule`

bethskurrie
2019-05-08 07:06
You want to push as much logic into the helper code, otherwise your provider state set up code will get very bloated

bethskurrie
2019-05-08 07:07
I personally like a "builder" pattern. Here's the provider state code for the pact between the Pact Broker and the Pact Broker Client (meta!) https://github.com/pact-foundation/pact_broker/blob/master/spec/service_consumers/provider_states_for_pact_broker_client.rb

diandra
2019-05-28 19:22
has joined #pact-ruby

neonmd
2019-06-14 09:40
has joined #pact-ruby

bheemreddy181
2019-06-16 14:23
Can some one explain how can i do the similar setup in ruby

bheemreddy181
2019-06-16 14:23
```... parameters { string(name: 'pactConsumerTags', defaultValue: 'master') } stage ('Build') { ... sh "./mvnw clean verify ... -Dpactbroker.tags=${params.pactConsumerTags}" ... } }```

bheemreddy181
2019-06-16 15:00
Does the consumer - triggered provider verification job should be different from provider driven verification should be different from each other ?

bheemreddy181
2019-06-16 21:53
Same way inputs on this @bethskurrie ^

bheemreddy181
2019-06-16 22:32
@matt.fellows ^



bheemreddy181
2019-06-17 00:45
I don?t see a way to set a default value in there do I need to write my own helpers for the same

bethskurrie
2019-06-17 00:46
You need to know how to write ruby

bethskurrie
2019-06-17 00:46
I think you'll have to get some help from your own developers.

bheemreddy181
2019-06-17 00:47
I am getting confused a bit here

bethskurrie
2019-06-17 00:47
Yes, I can see that.

bheemreddy181
2019-06-17 00:48
Help me understand two use cases here

bethskurrie
2019-06-17 00:48
I think what you're asking me to help you with is beyond the scope of what I can achieve over slack.

bethskurrie
2019-06-17 00:49
Ok, I can help you with usecases, but you seemed to be asking for ruby coding help.

bheemreddy181
2019-06-17 00:49
Why does provider need to same branch name as consumer when sends the branch names as a tag

bethskurrie
2019-06-17 00:49
it doesn't

bethskurrie
2019-06-17 00:50
some people like to make a matching branch name in the provider to implement the required features, but it's not mandatory.

bheemreddy181
2019-06-17 00:51
In that case too when the branch_name is considered I should fallback to master when not present

bheemreddy181
2019-06-17 00:53
And when consumertagname is present then I should fetch that else always master

bethskurrie
2019-06-17 00:53
hm.

bethskurrie
2019-06-17 00:53
Yes

bheemreddy181
2019-06-17 00:55
Consumer_tag_versions {Consumertagname || master , travis[?branch_name]}

bethskurrie
2019-06-17 00:55
if you're not using provider branches for feature development, you can ignore that part though.

bheemreddy181
2019-06-17 00:55
This should be something like this

bethskurrie
2019-06-17 00:55
I'm pretty sure it states that that is an advanced use case

bheemreddy181
2019-06-17 00:56
Yes does above tags makes sense

bheemreddy181
2019-06-17 00:56
? The way it should be set like the same

bethskurrie
2019-06-17 00:57
I don't know where you're getting Consumertagname from

bheemreddy181
2019-06-17 00:58
As part of webhook Params

bheemreddy181
2019-06-17 00:58
When triggered by consumer job

bethskurrie
2019-06-17 00:58
yes, but how are you getting it into the ruby process?

bheemreddy181
2019-06-17 00:58
That I should figure it out don?t know as of now

bethskurrie
2019-06-17 00:58
I would use environment variables

bheemreddy181
2019-06-17 00:59
Cool that makes sense

bethskurrie
2019-06-17 00:59
``` consumer_version_tag = ENV['CONSUMER_VERSION_TAG'] || ENV['TRAVIS_BRANCH'] consumer_version_tags [{name: consumer_version_tag, fallback: 'master'}] ```

bheemreddy181
2019-06-17 00:59
Perfect cool :sunglasses: thanks Beth this is a great help

bethskurrie
2019-06-17 00:59
There. That will take the consumer tag name if it exists, or the travis branch, or fall back to master

bheemreddy181
2019-06-17 00:59
I am so dumb and eating up all your time

bheemreddy181
2019-06-17 01:00
:clap::skin-tone-3::clap::skin-tone-3::clap::skin-tone-3::clap::skin-tone-3: Appreciate your help

bethskurrie
2019-06-17 01:00
You're obviously trying to do something in a language with which you're not familiar. I admire your perseverance, but I think you need to find someone in your company to help you out with the ruby stuff.

bethskurrie
2019-06-17 01:00
I can't be a ruby help desk to everyone!

bheemreddy181
2019-06-17 02:55
I understand that makes sense. Appreciate your help on the same I think I am clear as of now

closenet.uk
2019-06-20 14:52
has joined #pact-ruby

aniela.cole
2019-06-20 17:09
has joined #pact-ruby

aniela.cole
2019-06-20 17:12
Hi everyone, I am not sure if this is correct channel to ask this question, I am trying to run some provider tests using docker compose -> image: dius/pact-provider-verifier-docker My docker compose file looks like this: ``` pactverifier: image: dius/pact-provider-verifier-docker links: - app:app environment: - pact_urls=https://myteamtbroker.pact.dius.com.au/pacts/provider/providername/consumer/consumername/latest - provider_base_url=http://app:8000``` However, I am getting this error: ```pactverifier_1 | /usr/local/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (2.0.1) required by your /app/Gemfile.lock. (Gem::GemNotFoundException) pactverifier_1 | To update to the latest version installed on your system, run `bundle update --bundler`. pactverifier_1 | To install the missing version, run `gem install bundler:2.0.1` pactverifier_1 | from /usr/local/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path' pactverifier_1 | from /usr/local/bundle/bin/bundle:23:in `<main>'``` I am not familiar with ruby, am I missing something?

matt.fellows
2019-06-20 21:20
Hmm that doesn?t look like it should happen.

matt.fellows
2019-06-20 21:21
What?s your provider code written in, Aniela?

aniela.cole
2019-06-20 22:39
Javascipt

matt.fellows
2019-06-20 22:40
Is there a reason you?re not using the JS based verification?

aniela.cole
2019-06-20 22:47
I tired, but I got issues running that inside a docker container

bethskurrie
2019-06-20 22:48
@aniela.cole there's a newer one, let me point you to it

matt.fellows
2019-06-20 22:52
What issues?

matt.fellows
2019-06-20 22:52
It should work just fine in Docker (that?s almost always how I run them)


bethskurrie
2019-06-20 23:13
Just seen Matt's chat though - yes the pact-js verifier should run on docker

aniela.cole
2019-06-20 23:14
yes, I am just running it now to get the issues to send to him. Thanks!

aniela.cole
2019-06-20 23:27
```/bin/sh: ./standalone/linux-x64-1.68.0/bin/pact-provider-verifier: not found at ChildProcess.<anonymous> (node_modules/@pact-foundation/pact-node/src/verifier.ts:161:55)```

matt.fellows
2019-06-20 23:29
Are you using Alpine?


aniela.cole
2019-06-20 23:31
yes, I have, I am already doing that

aniela.cole
2019-06-20 23:32
hang on, I did not have this `&& apk add glibc-2.29-r0.apk ` let me add it

matt.fellows
2019-06-20 23:44
:+1:

aniela.cole
2019-06-21 03:27
I am still getting the same error ```/bin/sh: ./standalone/linux-x64-1.68.0/bin/pact-provider-verifier: not found lerna ERR! lerna ERR! at ChildProcess.<anonymous> (node_modules/@pact-foundation/pact-node/src/verifier.ts:161:55)```

matt.fellows
2019-06-21 07:02
Can you run the example project linked in that issue? Something about the environment must be wrong

viktor
2019-06-21 11:53
has joined #pact-ruby

aniela.cole
2019-06-24 15:46
Matt, my issue was caused by having this volume on my docker-compose file ``` volumes: - ./:/app ``` and having the node_modules locally.

aniela.cole
2019-06-24 15:46
once we removed the volume, it worked fine

matt.fellows
2019-06-24 22:18
ah, because the node_modules were OS specific?

matt.fellows
2019-06-24 22:19
Thanks for taking the time to respond - most people never come back to provide that feedback :thumbsup:

aniela.cole
2019-06-24 22:21
yes, I believe it was causing the problem. Thank you guys for helping out!

sergiy
2019-07-02 09:56
has joined #pact-ruby

amber.houle3
2019-07-12 17:11
has joined #pact-ruby

krzysztof.stepniak
2019-07-15 14:36
@krzysztof.stepniak has left the channel

bqiu
2019-07-16 00:07
has joined #pact-ruby

niickkc2
2019-07-19 23:12
has joined #pact-ruby

simon.nizov
2019-07-21 15:23
Is there a way to use the mocking service without writing to the pact file? The idea is to use a feature flag in order to be able to write consumer code, test it and even merge it to master, but without changing the pact in the broker and breaking the provider build.

dan.schepers
2019-07-25 14:24
has joined #pact-ruby

enrique
2019-07-29 14:55
has joined #pact-ruby

enrique
2019-07-29 16:04
:wave: Hi! A question, how can I define the provider base url for contract verification from code (as opposed to the CLI). I know I can do it with `pact-js` in the Verifier options. Our use case: we have two contracts against different endpoints implemented in the same code base, but the endpoints for each contract are only available under different subdomains. So, contract `x` needs to be verified against `x.localhost` and contract `y` against `y.localhost`. Otherwise the endpoints will be reported as not found.

matt.fellows
2019-07-31 12:50
Does the Ruby DSL not support this? Given that the pact JS, Go and a number of others depend on it that would be surprising

beth
2019-08-06 09:31
has joined #pact-ruby

beth
2019-08-06 09:32
If you're using a native Ruby verification, then you're running the verification against a Rack app, and there is no base url.

beth
2019-08-06 09:33
What is your code for running the verification currently?

enrique
2019-08-06 09:45
It?s a rails API, a monolithic API. A single codebase/process runs multiple providers. Each provider runs in a different subdomain in production. There is a check in place inside the Rails app to expose some routes in one subdomain and other routes in another subdomain. Rails routing constraints are used for that. So, I thought we could configure the `Pact.service_provider` for each provider to attack a different domain `provider_a.localhost`, `provider_b.localhost`, etc.

enrique
2019-08-06 09:46
It seems that I can do that with `pact-js` using `providerBaseUrl` in the `Verifier` options

enrique
2019-08-06 10:01
An alternative approach I?m thinking of would be to run the `rake pact:verify` in a specific Rails environment `contract-verification` where we configure all the providers without subdomain

enrique
2019-08-06 10:02
Do you know if we can pass the rails environment to the `pact:verify` task?

bethskurrie
2019-08-27 07:22
@enrique you can use rack middleware to modify the request.

bethskurrie
2019-08-27 07:23
By default, with rack test, the domain is http://example.org


bethskurrie
2019-08-27 07:27
In Ruby, you don't use a running server. You test directly against the rack app @matt.fellows

matt.fellows
2019-08-27 07:32
Ah yes. I was just saying I'd like to be able to do this in JS and Go with Ron just today

bethskurrie
2019-08-27 07:32
Yup, that'll be a really nice feature.

bethskurrie
2019-08-27 07:33
Is there a Rack equiv for other languages though? I got the impression that Ruby was pretty unique in having such a standardised interface.

matt.fellows
2019-08-27 08:13
don?t feel so special Beth :slightly_smiling_face:

matt.fellows
2019-08-27 08:14
Yes, it?s common

matt.fellows
2019-08-27 08:14
This is very common in Go

matt.fellows
2019-08-27 08:14
Less so in JS, but the types are types and it works exactly as you?d expect

matt.fellows
2019-08-27 08:15
Node JS has an HTTP interface that most libraries (e.g. Express) use. Go has the same sort of thing, but goes one deeper and has an in-built HTTP testing package (i.e. you can do all of the things without pulling in a single external dependency)

bethskurrie
2019-08-27 08:54
Awesome sauce.

enrique
2019-08-27 09:20
Oh, yes that would work. We also finally come out with a different approach. But, now, as you mention, the domain is set to `http://example.org`.

enrique
2019-08-27 09:20
We can work around that, but it feels wrong. Guess we need to configure rack test somehow

enrique
2019-08-27 10:12
Does `pact-ruby` expose any configuration option to change the domain of `rack-test`? That would be the ideal solution. It seems that we cannot do it outside PACT because we need access to the app used by PACT.

bethskurrie
2019-08-27 10:59
It gets set by rack test

bethskurrie
2019-08-27 10:59
You can change it with middleware, as described above.

bethskurrie
2019-08-27 10:59
There's nothing wrong with that approach.

bethskurrie
2019-08-27 11:00
It's what I would do.

simon.nizov
2019-08-27 15:12
Hi! I?m trying to publish the verification results to the broker as described in the docs https://github.com/pact-foundation/pact-ruby/wiki/Verifying-pacts#publishing-verification-results-to-a-pact-broker but for some reason I keep getting the following error: ``` Error returned from verification results publication 400 {"errors"=>{"provider_version"=>["can't be blank", "Version number '' cannot be parsed to a version number. The expected format (unless this configuration has been overridden) is a semantic version. eg. 1.3.0 or 2.0.4.rc1"]}} (Pact::Provider::VerificationResults::PublicationError) ``` While debugging I see that the `provider_application_version` attribute of my `Pact::Provider::VerificationResults::VerificationResult` instance is not blank at all. Is it a naming thing? The broker expects `provider_version` but the Ruby library sends `provider_application_version` maybe? Any ideas?

joao
2019-08-29 13:35
has joined #pact-ruby

tanle.oz
2019-08-30 07:05
has joined #pact-ruby

simon.nizov
2019-09-06 12:36
Hey @bethskurrie, looks like the travis build of the pact ruby gem is broken? On every new PR it seems.


bethskurrie
2019-09-09 06:11
I've just reverted those gemfiles. I accidentally committed changes from my local testing.

simon.nizov
2019-09-09 08:13
Thanks! I rebased my PR on master and it looks good now.

ljnoble
2019-09-17 16:56
has joined #pact-ruby

tkimia
2019-09-24 00:59
has joined #pact-ruby

joseph.haig
2019-10-04 13:37
has joined #pact-ruby

joseph.haig
2019-10-04 13:45
I have a question that I suspect may have the answer (a) that is not what Pact is for or (b) that has already been answered ? (and possibly also (c) why would you want to do that?). Sorry if this is the the case. For an API (pact provider, I think is the correct terminology) I would like to have a wrapper library that deals with all the http calls. This wrapper library would then be used by the client application instead of making all the API calls explicitly. I know that I can create the contract between the wrapper library and the API but, in terms of checking the contract during deployment, I want to do this in the client application. Is there a correct way to set this up? Should I (and is it possible to) create a contract between the client application and the wrapper library? I have already done this (some time ago) and the solution I came up with is that the client application copies the contract from the wrapper library and submits that as its own, but this doesn?t feel right.

joseph.haig
2019-10-04 13:46
I?ve posted this in this channel because I?m mainly working in ruby & rails but it occurs to me that the question may be more general.

joseph.haig
2019-10-04 13:49
I?ve posted it again in #general but I don?t appear to have the option to delete. :disappointed:

tony.ibbs
2019-10-07 14:20
has joined #pact-ruby

tjones
2019-10-08 22:07
has joined #pact-ruby

c.metz
2019-10-22 14:20
has joined #pact-ruby

c.metz
2019-10-22 14:35
Does anybody have an idea what's going on with the assets on https://github.com/pact-foundation/pact-ruby-standalone/releases/? We cannot download them anymore. This also breaks our pip install pact-python, as that will try to download the binaries there.

matt.fellows
2019-10-22 21:44
What?s the issue you?re having? I can download them just fine (I?m on a train tethering with my wifi hotspot)

matt.fellows
2019-10-22 21:45
Just downloaded 1.70.2 for linux

matt.fellows
2019-10-22 21:45
Maybe it?s your corporate network / proxy / firewall?

aniela.cole
2019-10-23 22:41
@aniela.cole has left the channel

c.metz
2019-10-24 09:15
Issues seemed to be a DNS issue indeed. Using Google DNS servers it just works fine.

bheemreddy181
2019-11-21 00:02
@matt.fellows @bethskurrie are dB inserts bad as part of pact workflow on the provider side ?

bethskurrie
2019-11-21 00:02
Depends.

bethskurrie
2019-11-21 00:03
Personally, I've used mostly used pact for microservices, and for our pact verification tests, we usually use something like sqlite, so it's really easy just to use the DB.

bheemreddy181
2019-11-21 00:03
Typically I am talking more in regards to post endpoint which inserts data into dB I am mocking all the validations that end point does but directly inserting that data into dB because that what my presenter uses to render response back

bethskurrie
2019-11-21 00:03
If it's some heavy weight DB that it would be a pain to use in what should be a fast test, then mocking might be more convenient for you.

bheemreddy181
2019-11-21 00:04
My tests also does cleanup so it very light weight

bethskurrie
2019-11-21 00:04
Why would you mock all the validations?

bethskurrie
2019-11-21 00:04
wouldn't that make the endpoint behave differently to real life?

bheemreddy181
2019-11-21 00:05
I don?t mock validations on required fields but mock other validations which are supposed to be tested by the team who owns it

bheemreddy181
2019-11-21 00:05
If I don?t mock then isn?t that a functional test itself

bethskurrie
2019-11-21 00:05
I don't quite understand, but sounds dicey

bethskurrie
2019-11-21 00:05
functional isn't bad.

bethskurrie
2019-11-21 00:05
if it's just a side effect of testing the contract.

bethskurrie
2019-11-21 00:06
it's when you try and use a contract to do functional that it becomes a bad idea.


bethskurrie
2019-11-21 00:06
If the validation changes the way the endpoint behaves, then it's part of the contract.

bethskurrie
2019-11-21 00:07
Eg. if I was trying to test how the endpoint behaved when I put in invalid data, it would not be helpful to return a 200 OK!


bheemreddy181
2019-11-21 00:12
Let me read this and get back

bheemreddy181
2019-11-21 00:12
Thanks for sharing

bethskurrie
2019-11-21 00:13
Something that might help is to ask, if I stubbed out this component, what other tests do I have to make sure that it will all work together correctly (trying not to rely too much on e2e tests). What would be the consequence of stubbing something out and missing some coverage vs the consequences keeping it in?

bheemreddy181
2019-11-21 00:16
I mean I have enough functional tests on the provider side which tests these validations

bheemreddy181
2019-11-21 00:17
From my understanding I am making sure the return types on my presenter and fields aren?t dropped or required fields aren?t changed etc etc

bethskurrie
2019-11-21 00:17
is there a pact test that checks how the endpoint responds if the validation fails?

bheemreddy181
2019-11-21 00:17
From my contact tests

bheemreddy181
2019-11-21 00:18
Nope

bethskurrie
2019-11-21 00:18
I'd recommend asking the consumer team to include that.

bheemreddy181
2019-11-21 00:19
But in that case each request values has different validations so they have to add all that combinations?

bethskurrie
2019-11-21 00:19
With Pact, you *don't* want to try and test the business rules that cause the validation to fail, but you want to pick a stable scenario that will cause the validation to fail so that the consumer knows that that response looks like (assuming all validation failure responses have the same pattern)

bethskurrie
2019-11-21 00:20
You could, of course, cause the validation to fail by modifying something in the provider state, rather than expecting some type of data from the consumer.

bheemreddy181
2019-11-21 00:21
What all should sit in provider state then in general?

bethskurrie
2019-11-21 00:21
I'm sorry, the question doesn't make sense to me.

bethskurrie
2019-11-21 00:21
Can you rephrase it?

bheemreddy181
2019-11-21 00:22
When ever we write provider states in provider what all mocks should generally sit there

bethskurrie
2019-11-21 00:23
I personally mock downstream APIs, and anything that's too hard/slow to run as part of the verification test.

bheemreddy181
2019-11-21 00:23
Aren?t pact tests become duplicates of the provider functional tests if we write them at both places ?

bethskurrie
2019-11-21 00:23
Did you read the link I sent about functional vs contract tests?

bheemreddy181
2019-11-21 00:23
You mean if there are any third party API?s underneath my provider api ?

bethskurrie
2019-11-21 00:24
yes

bheemreddy181
2019-11-21 00:24
I will read that for sure

bethskurrie
2019-11-21 00:24
ok, read and then come back and we can discuss if it's still unclear.

bethskurrie
2019-11-21 00:24
no point repeating all that content.

bheemreddy181
2019-11-21 00:24
Sure Beth

bheemreddy181
2019-11-21 00:33
Cool it makes more sense for me

bethskurrie
2019-11-21 00:33
Awesome

bheemreddy181
2019-11-21 00:33
Here are some use cases I am worried about date and time dependencies

bheemreddy181
2019-11-21 00:34
Like say if I can?t create a payment after 10:30 pm cst but if I am running a test after that it would fail ?

bheemreddy181
2019-11-21 00:36
But before 10:30 I will get a 200 ok this will not happen in production because the configurations or jobs which run are restricted to run a hour before

bheemreddy181
2019-11-21 00:36
But let me go back and see all use cases and come back with a list if there are any

bethskurrie
2019-11-21 00:39
I would mock the time, not the validation

bethskurrie
2019-11-21 00:40
Ensuring you always get current time from a mockable location is always a good thing for testing

bethskurrie
2019-11-21 00:41
Though, now I think about it, your approach makes sense.

bethskurrie
2019-11-21 00:41
As long as you have a test that shows how it works when it succeeds, and when it fails.

bheemreddy181
2019-11-21 00:50
Ya that?s where I was mocking some of the underlying validations but I will go back and see which all use-case needs these

bheemreddy181
2019-11-22 02:57
@bethskurrie I have another use case where incoming request should not have date in the past in this you mean me mock the incoming time to current all the time and few are cutoff based requests like said above payment can be created given a :bank: bank is fixed cutoff

bheemreddy181
2019-11-22 02:58
I mean tomorrow if bank is extending the cutoff shouldn?t break the contracts correct those are not breaking contracts too

bethskurrie
2019-11-22 02:58
Is this a unique response? ie. is there anything different about the shape of the response body that comes back when the time cutoff has occurred, compared to other validation errors?

bheemreddy181
2019-11-22 02:59
If request comes in post cutoff then it?s a 422

bheemreddy181
2019-11-22 02:59
Validation failure

bethskurrie
2019-11-22 02:59
What language are you validating in?

bheemreddy181
2019-11-22 02:59
Ruby

bethskurrie
2019-11-22 03:00
Is the validation error different in shape to other validation errors?

bheemreddy181
2019-11-22 03:00
Nope all fall in the same bucket just message is different

bethskurrie
2019-11-22 03:00
I personally wouldn't bother testing it then.

bheemreddy181
2019-11-22 03:01
That?s where I was mocking the validations for these so you mean these are valid mocks ?

bethskurrie
2019-11-22 03:01
All you need is one example of "this is what the response looks like when validation fails". Doing that multiple times is just overhead.

bheemreddy181
2019-11-22 03:01
Which turns out to be a functional test correct ?

bethskurrie
2019-11-22 03:02
Hm. It's not so much functional as redundant.

bethskurrie
2019-11-22 03:02
functional tests check for side effects, which this is not doing.

bethskurrie
2019-11-22 03:02
it's just unnecessary.

bethskurrie
2019-11-22 03:03
You're creating a unnecessary maintenance burden.

bheemreddy181
2019-11-22 03:03
Can you give me a short example of side effects in general

bethskurrie
2019-11-22 03:03
From the docs, "a functional test for the provider would ensure that when a given request was made, that an Order with the correct attributes was actually persisted to the underlying datastore"

bethskurrie
2019-11-22 03:04
Functional tests check "does it do the right thing with what I've sent". Contract tests just check "does it respond in the expected way".

bethskurrie
2019-11-22 03:06
I'd say that functional tests were a superset of contract verification tests -> they test the response is as expected AND that the right thing has been done with the data.

bheemreddy181
2019-11-22 04:32
Makes sense

bheemreddy181
2019-11-23 21:30
Hey Beth, i can?t mock future dates all the time as this forces me to update my contract my consumer all the time , if my consumer doesn?t change we will keep verifying with old contract which has the old date as input

bheemreddy181
2019-11-23 21:30
which throws a error like below ```{"errors":[{"error":"validation_failed","reasons":{"effective_on":["Effective date in past."]}}]}```

bethskurrie
2019-11-23 21:47
So, you can either use rack middleware to update the date (look in the "verifying pacts" docs on the Ruby wiki) or you can stub "now".


bethskurrie
2019-11-23 23:55
Yes

bheemreddy181
2019-11-24 05:47
Is there a way we can run rack middleware for only pact tests

bethskurrie
2019-11-24 06:30
Yes

bethskurrie
2019-11-24 06:30
Your can set up the rack app manually. It's documented on that same page.

bethskurrie
2019-11-24 06:31
It's in the example section that you sent me.

bheemreddy181
2019-11-27 14:28
Beth , thanks for all your inputs i was able to set up rack middleware for one use case

bethskurrie
2019-12-06 02:48
@khoatran

khoatran
2019-12-06 02:48
has joined #pact-ruby

bethskurrie
2019-12-06 02:50
@khoatran now I've refreshed my memory, I've remembered the DSL for message pact is not done in Ruby yet. The underlying logic is done though, because it's being used by pact-js.

bethskurrie
2019-12-06 02:50
Which side would you be interested in using? Consumer or provider, or both?

bethskurrie
2019-12-06 02:51
Oops, now I see the #pact-message-ruby channel that I'd forgotten about! Moving over there.

gordo
2019-12-09 22:27
has joined #pact-ruby

bheemreddy181
2019-12-12 21:19
Just to verify, are we not supposed to test the data semantics using contract tests @matt.fellows @bethskurrie ?


matt.fellows
2019-12-15 21:26
I would agree with Tom?s article and that statement, yes

bheemreddy181
2019-12-16 03:16
Well I am surprised here whether we have to mock the provider side functionality or not now

bheemreddy181
2019-12-16 03:17
As I heard last time from you is that we shouldn?t mock other than any other service dependencies( like if I have third party API?s ) using contract testing

bheemreddy181
2019-12-16 03:17
@matt.fellows@matt.fellows@matt.fellows ^

bethskurrie
2019-12-16 03:18
I don't know what is meant by data semantics here.

bethskurrie
2019-12-16 03:18
If you're talking about the difference between a validation error response, and a success response, we want to cover that.

bethskurrie
2019-12-16 03:19
If we're talking about the differences between all 20 different enumerations of some particular field, then we don't want to cover that.

bethskurrie
2019-12-16 03:20
There might be a semantic difference between each value, but no structural difference to the response.

bethskurrie
2019-12-16 03:22
Can you provide me with a concrete example that you're unsure about?

matt.fellows
2019-12-16 03:47
The example used is a credit card

matt.fellows
2019-12-16 03:47
do we validate all of the permutations of valid, invalid (and so on), or do we just care about the unique set of responses we can illicit from the provider

matt.fellows
2019-12-16 03:48
from a consumers? perspective, we just care about the possible responses. The meanings of the card numbers are something the provider is interested

bethskurrie
2019-12-16 03:49
Nice example

bheemreddy181
2019-12-16 03:49
Ah I agree with this as well

bheemreddy181
2019-12-16 03:52
Well from what I felt is semantics is how you are validating the data and inserting the data on to the database where are as syntax is how you are presenting the data back in your response

bethskurrie
2019-12-16 03:54
What you want to test is what a validation failure response looks like. To get that, the easiest way is to give it invalid data, but it's not the validation logic that you really care about.

bethskurrie
2019-12-16 03:55
You could mock some internals of the provider to force it to return a validation failure, but it may be more effort than its worth.

bheemreddy181
2019-12-16 04:09
:+1::skin-tone-3:

bheemreddy181
2019-12-17 16:02
Can I get some help on the above ? ^

bernardoguerr
2019-12-17 17:14
has joined #pact-ruby

matt.fellows
2019-12-17 21:07
Oh, I thought the mock process in Ruby was purely Rack based, so it didn?t need to spin up an actual port at all.

matt.fellows
2019-12-17 21:07
But admittedly, it?s been a while since I used the Ruby Pact DSL (like, 4 years :stuck_out_tongue: )

bheemreddy181
2019-12-18 00:58
@bethskurrie ^ In case you missed i am open to create a request on the ruby implementation

bheemreddy181
2019-12-18 00:59
thats not true

bethskurrie
2019-12-18 01:03
@bheemreddy181 if you don't give it a port, it should pick one for you

bethskurrie
2019-12-18 01:04
You'll need to then use a method on the dsl base object to get the base url that it chose.

bheemreddy181
2019-12-18 01:07
you mean to say for mocking the response from the provider i need to get the base url it chose ?

bethskurrie
2019-12-18 01:12
Yes

bethskurrie
2019-12-18 01:12
I think it's mock_service_base_url

bethskurrie
2019-12-18 01:12
No, I mean, when you make the real request

bethskurrie
2019-12-18 01:13
You need to know the base url of the mock service to send it to


v.melnychuk12
2019-12-18 18:46
has joined #pact-ruby

taisedias
2019-12-22 21:53
has joined #pact-ruby

shilpa3006
2019-12-24 04:37
has joined #pact-ruby

shilpa3006
2019-12-24 05:08
@bheemreddy181 Hi Bheem, I am trying to setup PACT in ruby and trying to run basic example - Animal Service and Zoo App just for understanding purposes. I am able to generate PACT file. After that, when i try command rake pact:verify, nothing happens. It doesn't give me either failure or success messages. I tried pact:publish to see if file gets published to localhost:9292(its by default pointing to this from PACT repo) but getting error saying connection refused. Looks like you got success with setup. Can you please help?

shilpa3006
2019-12-24 05:33
@bethskurrie @matt.fellows I am pretty new to Pact. I am good until generation of Pact file(atleast was able to generate for the animal-zoo example). After that, rake pact:verify is doing nothing. am i missing some steps here?

shilpa3006
2019-12-24 06:33
I could install pact-provider-verifier gem and ran "pact-provider-verifier zoo_app-animal_service.json --provider-base-url http://localhost:9292" command, got all 3 interactions failed:

shilpa3006
2019-12-24 06:35
C:\Automation\PACT\pact-ruby-master\example\animal-service\spec\pacts>pact-provider-verifier zoo_app-animal_service.json --provider-base-url http://localhost:9292 INFO: Reading pact at zoo_app-animal_service.json Verifying a pact between Zoo App and Animal Service Given there is an alligator named Mary a request for an alligator with GET /alligators/Mary returns a response which WARN: Skipping set up for provider state 'there is an alligator named Mary' for consumer 'Zoo App' as there is no --provider-states-setup-url specified. has status code 200 (FAILED - 1) WARN: Skipping set up for provider state 'there is an alligator named Mary' for consumer 'Zoo App' as there is no --provider-states-setup-url specified. has a matching body (FAILED - 2) includes headers WARN: Skipping set up for provider state 'there is an alligator named Mary' for consumer 'Zoo App' as there is no --provider-states-setup-url specified. "Content-Type" which equals "application/json;charset=utf-8" (FAILED - 3) Given there is not an alligator named Mary a request for an alligator with GET /alligators/Mary returns a response which WARN: Skipping set up for provider state 'there is not an alligator named Mary' for consumer 'Zoo App' as there is no --provider-states-setup-url specified. has status code 404 (FAILED - 4) Given an error occurs retrieving an alligator a request for an alligator with GET /alligators/Mary returns a response which WARN: Skipping set up for provider state 'an error occurs retrieving an alligator' for consumer 'Zoo App' as there is no --provider-states-setup-url specified. has status code 500 (FAILED - 5) WARN: Skipping set up for provider state 'an error occurs retrieving an alligator' for consumer 'Zoo App' as there is no --provider-states-setup-url specified. has a matching body (FAILED - 6) includes headers WARN: Skipping set up for provider state 'an error occurs retrieving an alligator' for consumer 'Zoo App' as there is no --provider-states-setup-url specified. "Content-Type" which equals "application/json;charset=utf-8" (FAILED - 7) Failures: 1) Verifying a pact between Zoo App and Animal Service Given there is an alligator named Mary a request for an alligator with GET /alligators/Mary returns a response wh ich has status code 200 Failure/Error: replay_interaction interaction, options[:request_customizer] Errno::ECONNREFUSED: Failed to open TCP connection to localhost:9292 (No connection could be made because the target machine actively refused it. - connect(2) for "localhost" port 9292 ) # C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/pact-provider-verifier-1.25.2/bin/pact-provider-verifier:3:in `<top (required)>' # C:/Ruby25-x64/bin/pact-provider-verifier:23:in `load' # C:/Ruby25-x64/bin/pact-provider-verifier:23:in `<main>' # ------------------ # --- Caused by: --- # Errno::ECONNREFUSED: # No connection could be made because the target machine actively refused it. - connect(2) for "localhost" port 9292 # C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/pact-provider-verifier-1.25.2/bin/pact-provider-verifier:3:in `<top (required)>'

bethskurrie
2019-12-24 10:31
Which directory are you running `bundle exec rack pact:verify` from @shilpa3006?

bethskurrie
2019-12-24 10:31
That's not going to work unless you've manually started the Animal Service on port 9292.

bethskurrie
2019-12-24 10:31
I'd stick with the native Ruby pact:verify.

bethskurrie
2019-12-24 10:32
Oh, I can see from your example, you're in the right directory.

bethskurrie
2019-12-24 10:33
Are you familiar with developing in Ruby at all @shilpa3006?

bethskurrie
2019-12-24 10:34
Ah - I see you're running the examples on windows.

bethskurrie
2019-12-24 10:38
I think that's likely to be the cause. I'm not familiar with running Ruby on Windows I'm afraid.

bethskurrie
2019-12-24 10:40
Is there anyone else in your company you could ask who might know about Ruby+Windows?

shilpa3006
2019-12-24 23:15
Yes Beth. I am familiar with writing BDD scripts in Ruby. I did so for most of our applications for test automation purposes with Ruby, Cucumber framework. But, I haven't developed applications itself with Ruby.

shilpa3006
2019-12-24 23:27
hmm. now i am curious. which OS is recommended for this pact framework? Also, I don't have Rails. It would be better if there would be any prerequisites w.r.t OS in documentation.

bethskurrie
2019-12-24 23:27
I didn't mention rails.

bethskurrie
2019-12-24 23:27
Not all Ruby is Rails!

bethskurrie
2019-12-24 23:28
The native Ruby pact verify will manage the lifecycle of the app for you - you don't need to start and stop it and make extra endpoints for setting up the provider states.

bethskurrie
2019-12-24 23:29
It's more complex to use the pact provider verifier.

bethskurrie
2019-12-24 23:29
It'll be something to do with Windows. If you can reproduce the issue with a Windows ci system as I mentioned in the issue, I may be able to help you.

shilpa3006
2019-12-24 23:29
I wish pact:verify works for me. How can i troubleshoot this issue? I don't see any logging for this as well.

bethskurrie
2019-12-24 23:30
I guess you don't have any other machine apart from windows?

bethskurrie
2019-12-24 23:30
Nobody else has ever reported this issue before.

shilpa3006
2019-12-24 23:31
not at the moment. can you pls send me that link where i can reproduce. I saw earlier. Somehow i lost it.

bethskurrie
2019-12-24 23:31
It's in the issue.

bethskurrie
2019-12-24 23:31
Where you reported it.

shilpa3006
2019-12-24 23:35
ok

shilpa3006
2019-12-24 23:53
looks like i will not be able to do this. Its against our comp policy. I own a mac, i guess i can try there but eventually i need it at my work :disappointed:

bethskurrie
2019-12-25 00:15
What is against your company policy?

bheemreddy181
2019-12-25 00:22

shilpa3006
2019-12-25 00:25
I will try this and keep you all posted. Thanks @bheemreddy181

bethskurrie
2019-12-25 01:36
Thanks @bheemreddy181! I'd forgotten to suggest that.

bheemreddy181
2019-12-25 01:41
I can help the beginners now :grimacing:

shilpa3006
2019-12-25 18:56
@bheemreddy181 I have tried this and still pact:verify doesn't work.

bheemreddy181
2019-12-25 18:58
What?s the issue

shilpa3006
2019-12-25 21:45
it does't do anything @bheemreddy181

shilpa3006
2019-12-25 21:45
C:\Automation\PACT\pact-ruby-e2e-example-master\provider>bundle exec rake pact:verify:foobar SPEC_OPTS='' C:/Ruby25-x64/bin/ruby.exe -S pact verify --pact-helper ./provider/spec/pact_helper.rb --pact-uri ./consumer/spec/pacts/foo-bar.json

shilpa3006
2019-12-25 21:45
just spits out this message.

shilpa3006
2019-12-25 21:46
also i tried with Pact_broker

shilpa3006
2019-12-25 21:46
C:\Automation\PACT\pact-ruby-e2e-example-master>bundle exec rake pact:verify:foobar_using_local_broker Publishing Foo/Bar pact to pact broker at http://localhost:9292 Error making request - Errno::ECONNREFUSED Failed to open TCP connection to localhost:9292 (No connection could be made because the target machine actively refused it. - connect(2) for "localhost" port 9292) C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/pact_broker-client-1.20.0/lib/pact_broker/client/pacts.rb:35:in `get', attempt 1 of 3

shilpa3006
2019-12-25 21:46
I get this

bheemreddy181
2019-12-25 21:46
Well first we should target with having pact files locally

shilpa3006
2019-12-25 21:48
I agree @bheemreddy181 Pact is getting generated without any issue. Its just that pact:verify won't work

bheemreddy181
2019-12-25 21:48
You have pact broker running locally? Well ignore that let?s target first with having pact files locally

shilpa3006
2019-12-25 21:48
sure

bheemreddy181
2019-12-25 21:49
With out spitting out an error it?s hard to debug this

shilpa3006
2019-12-25 21:50
i know..

bheemreddy181
2019-12-25 21:50
Did you just clone the above repo and running on local

shilpa3006
2019-12-25 21:51
yes. I just cloned, did bundle install and running these command..

shilpa3006
2019-12-25 21:51
commands*

bethskurrie
2019-12-25 22:27
My gut feel is that it's a path/escaping issue on windows.

bethskurrie
2019-12-25 22:27
You know the command that you see printed out?

bethskurrie
2019-12-25 22:28
Can you try running that directly?

shilpa3006
2019-12-25 22:29
this one? SPEC_OPTS='' C:/Ruby25-x64/bin/ruby.exe -S pact verify --pact-helper ./provider/spec/pact_helper.rb --pact-uri ./consumer/spec/pacts/foo-bar.json

bethskurrie
2019-12-25 22:48
Yes

shilpa3006
2019-12-25 22:55
hmm.. i got something different now

shilpa3006
2019-12-25 22:56
C:\Automation\PACT\pact-ruby-e2e-example-master\consumer\spec\pacts>C:/Ruby25-x64/bin/ruby.exe -S pact verify --pact-helper ./provider/spec/pact_helper.rb --pact-uri ./co nsumer/spec/pacts/foo-bar.json Traceback (most recent call last): 11: from C:/Ruby25-x64/bin/pact:23:in `<main>' 10: from C:/Ruby25-x64/bin/pact:23:in `load' 9: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/pact-1.42.3/bin/pact:4:in `<top (required)>' 8: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/base.rb:466:in `start' 7: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor.rb:387:in `dispatch' 6: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/invocation.rb:126:in `invoke_command' 5: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/thor-0.20.3/lib/thor/command.rb:27:in `run' 4: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/pact-1.42.3/lib/pact/cli.rb:26:in `verify' 3: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/pact-1.42.3/lib/pact/cli/run_pact_verification.rb:14:in `call' 2: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/pact-1.42.3/lib/pact/cli/run_pact_verification.rb:20:in `call' 1: from C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/pact-1.42.3/lib/pact/cli/run_pact_verification.rb:43:in `load_pact_helper' C:/Ruby25-x64/lib/ruby/gems/2.5.0/gems/pact-1.42.3/lib/pact/cli/run_pact_verification.rb:43:in `load': cannot load such file -- ./provider/spec/pact_helper.rb (LoadError)

bethskurrie
2019-12-25 23:03
That's more helpful.

bethskurrie
2019-12-25 23:03
So, this is what I was asking you to do:


bethskurrie
2019-12-25 23:03
^^ This is a build I created using a free service called appveyor


bethskurrie
2019-12-25 23:04
Can you run that command that you just ran again from the root of the project this time @shilpa3006

bethskurrie
2019-12-25 23:05
It can't find the `./provider/spec/pact_helper.rb` file because you're running it from the `spec/pacts` directory, and that's a relative path.

bethskurrie
2019-12-25 23:16
ok, this is annoying. When I run the command directly, it passes: https://ci.appveyor.com/project/pact-foundation/pact-ruby-e2e-example/builds/29754338

bethskurrie
2019-12-25 23:19
Can you try the same @shilpa3006?

bethskurrie
2019-12-25 23:20
`bundle exec C:/Ruby25-x64/bin/ruby.exe -S pact verify --pact-helper ./provider/spec/pact_helper.rb --pact-uri ./consumer/spec/pacts/foo-bar.json` from the directory: `C:\Automation\PACT\pact-ruby-e2e-example-master`

shilpa3006
2019-12-26 00:38
ok

shilpa3006
2019-12-26 00:39
omg

shilpa3006
2019-12-26 00:39
its passed :slightly_smiling_face:

shilpa3006
2019-12-26 00:39
C:\Automation\PACT\pact-ruby-e2e-example-master>bundle exec C:/Ruby25-x64/bin/ruby.exe -S pact verify --pact-helper ./provider/spec/pact_helper.rb --pact-uri ./consumer/s pec/pacts/foo-bar.json INFO: Reading pact at ./consumer/spec/pacts/foo-bar.json Verifying a pact between Foo and Bar A retrieve thing request with GET /thing returns a response which has status code 200 has a matching body includes headers "Content-Type" which equals "application/json" 1 interaction, 0 failures

shilpa3006
2019-12-26 00:39
This is an achievement for me

shilpa3006
2019-12-26 00:40
Thanks a lot @bethskurrie

shilpa3006
2019-12-26 00:41
It would be helpful if bundle exec rake:verify would work

bethskurrie
2019-12-26 00:48
I was hoping that command would error so I could see what was wrong :joy:

bethskurrie
2019-12-26 00:48
But good that it works.

bethskurrie
2019-12-26 00:48
I'll have a think about what could be the issue

shilpa3006
2019-12-26 00:50
:+1:

shilpa3006
2019-12-26 00:51
Now i have issue with pact-broker. somehow not able to publish to localhost:9292

bheemreddy181
2019-12-26 00:51
Perfecto

bheemreddy181
2019-12-26 00:53
Well pact:verify itself works fine this is an issue from windows from what I understand and you should always be on the root while running these commands

bethskurrie
2019-12-26 01:12
@shilpa3006 you'll need to be more specific if you want help. Please say what command you've used, and what the outcome was.

shilpa3006
2019-12-26 17:29
Sure @bethskurrie Before going to pact-broker, I have some questions. I have observed that BarApp's headers and payload have been hardcoded in this example under provider folder - bar_app.rb. If I want to invoke real time service, how can i do that?

shilpa3006
2019-12-26 17:30
@bheemreddy181: Please let me know how you invoking real app were headers and payload is dynamic?

shilpa3006
2019-12-26 17:32
Also, all our headers contain bearer token which generates and lives for few min

shilpa3006
2019-12-26 21:26
@bethskurrie @matt.fellows @bheemreddy181: I have very basic question. If provider services are in .Net, can i write my provider tests in Ruby or its mandatory that i should be writing in .Net since services are developed in .Net?

bethskurrie
2019-12-26 22:03
The only code you need to write for the provider side is the provider state set up code.

bethskurrie
2019-12-26 22:06
To set up the right state in .Net the provider verifier needs to make a request to a url. It's much easier if this url is an endpoint that gets run as part of the underlying provider application code, because you can reuse the services and db connections to insert the right data.

bethskurrie
2019-12-26 22:07
So, no, it's not mandatory to use Net code, but it will be much easier to manage the provider states.


bethskurrie
2019-12-26 22:09
In fact, please read all the docs.

bethskurrie
2019-12-26 22:09
They're not that long.

shilpa3006
2019-12-26 22:39
Sure Beth. I will go through this. Thanks.

shilpa3006
2019-12-26 22:49
So, it means that from Pact-Ruby framework, I can invoke actual app for getting actual response. But, how can i replace this code, incase i want to invoke actual app?

shilpa3006
2019-12-26 22:49
```Pact.service_provider "Bar" do app { BarApp.new }```

bethskurrie
2019-12-26 22:49
You can't in that library.

bethskurrie
2019-12-26 22:50
That's for native Ruby applications. If you want to verify an app in another language, you'll need to use pact-provider-verifier.

bethskurrie
2019-12-26 22:50
No, sorry, you should use the native implementation that wraps the pact-provider-verifier.

bethskurrie
2019-12-26 22:50
Don't use the pact-provider-verifier directly.

bethskurrie
2019-12-26 22:50
There's one in .net

shilpa3006
2019-12-26 22:56
ok. so, i can use consumer tests in ruby and use pact-provider-verifier for .net? where do my provider tests be in? Sorry for basic questions. I am trying to understand.

matt.fellows
2019-12-27 02:01
So basically, find the Pact library that matches the language of the code base you are testing

matt.fellows
2019-12-27 02:02
in your case, if your consumer is Ruby use `pact-ruby` (https://github.com/pact-foundation/pact-ruby). If your back end is .NET use `pact-net` (https://github.com/pact-foundation/pact-net)

matt.fellows
2019-12-27 02:03
If you can?t use the language bindings for some reason, there are other approaches. For the provider side, see https://docs.pact.io/implementation_guides/other_languages#how-it-works (which includes the verifier mentioned). But only use this as a last resort

matt.fellows
2019-12-27 02:04
> where do my provider tests be in As a general rule, they should live with the actual provider code. It?s not necessary, but in the vast majority of cases this is where it makes sense.

bheemreddy181
2019-12-27 02:34
Typically provider and consumer can talk two different languages but they should talk the same thing from API perspective and we can achieve that using pact

shilpa3006
2019-12-27 03:13
Got it. In our case consumer and provider both are in .Net. So, looks like it makes sense to implement pact-net then.

shilpa3006
2019-12-27 03:16
Is there a channel in slack for pact-net in case I have questions?

matt.fellows
2019-12-27 03:41
Of course

bheemreddy181
2019-12-27 03:51
#pact-net

matt.fellows
2019-12-27 03:58
I left that as an exercise to the reader, Bheem :laughing:

shilpa3006
2019-12-27 14:07
Thanks Matt and Bheem.

simon.nizov
2020-02-03 11:31
Is the new pending pacts feature supported in pact-ruby yet?

joseph.haig
2020-02-03 13:47
What is this feature?

joseph.haig
2020-02-03 13:47
I probably cannot answer your question but I?m curious.


joseph.haig
2020-02-03 13:50
Thanks.

simon.nizov
2020-02-04 09:25
@bethskurrie?

bheemreddy181
2020-02-06 15:02
Hey team , we use our own library for authentication between backend services and it?s typically based on the current date and converts the auth to hash with using pact how can I override the authentication - do I ignore the auth and add a test in some other environment ?

simon.nizov
2020-02-06 15:13
Is the hash passed as a header in each request?

joseph.haig
2020-02-06 15:53
Is the problem that it is time based? You might be able to use the timecop gem to fix the time and so fix the authentication hash. (If you are using Rails you can use the built in time helpers instead of timecop)

joseph.haig
2020-02-06 15:55
and then, in the `given` condition, include a note about the time so that the service provider can do the same.

bheemreddy181
2020-02-06 16:16
Yes hash passed as a header in each request

bheemreddy181
2020-02-06 17:20
I will revisit this and get back with more information

simon.nizov
2020-02-06 19:34
I would look into not including the authorization header in the pact and instead using the ```--custom-provider-header``` option of pact-provider-verifier https://github.com/pact-foundation/pact-provider-verifier

matt.fellows
2020-02-06 21:22
Is the problem on the consumer side or provider (guessing provider, but want to be sure we?re on the same page)


bheemreddy181
2020-02-06 23:33
typically I see this as an issue on both sides, on my mock i can't typically say how my Hash will look like while setting up mocked expectations for provider for example the header looks something like this ```"Authorization": "APIAuth sample:/m/EVGq2l60r13qd7azBf9qqO20="```

bheemreddy181
2020-02-07 00:54
@matt.fellows ^ here is the sample

bheemreddy181
2020-02-07 14:45
Thanks @simon.nizov I will give a look with custom headers basically as it?s been a valid request we will go ahead add a custom auth header you mean correct ?

simon.nizov
2020-02-07 14:47
The idea is not to include authentication in the pact. Only add the headers for the provider verification step.

bheemreddy181
2020-02-07 23:24
I was not able to achieve this in the provider states ended up having it on the middleware not sure if this is a great idea , rather than mocking to return true we are actually signing the request

matt.fellows
2020-02-08 02:40
I would still recommend having the header in the pact (for documentation and for completeness, if not too difficult). And then on the provider verification overriding where necessary

bethskurrie
2020-02-08 09:51
@simon.nizov yes, but only if you're using a pactflow Pact Broker.

bethskurrie
2020-02-08 09:52
I don't want to do an official release of the API until we've integrated it with Pact JVM, because I don't want to have to make any breaking changes if I discover that the API that works for Pact Ruby doesn't work for Pact JVM.

bethskurrie
2020-02-08 09:53
If you're using your own broker you can enable the API by setting `PACT_BROKER_FEATURES=pacts_for_verification` . You'll need to grab the latest versions of the pact gems.

simon.nizov
2020-02-08 10:00
Thanks!

bethskurrie
2020-02-08 10:00
I'm just doing a release now that you'll need.

bethskurrie
2020-02-08 10:00
pact ruby

bethskurrie
2020-02-08 10:05
I'm putting out 2.48.0 of the broker and 1.47.0 of pact ruby. You'll need those two together for the informational messages to work correctly.

bethskurrie
2020-02-08 10:06
There's a whole lot of explanatory text that should help understand what's going on

bethskurrie
2020-02-08 10:16
Just be aware that at the moment, the relation that pact-ruby uses to look up the api is `beta:pacts-for-verification`.` When I make the public release, I'll be removing the `beta:` relation and changing it to `pb:pacts-for-verification` so if you had some code running in beta, and it stops working, upgrade both the broker and the gem, so that the officially released gem and API can work correctly together.

simon.nizov
2020-02-08 12:52
Ok thanks for the info and the heads up!

bheemreddy181
2020-02-08 20:56
you mean a regex header during mocks ?

matt.fellows
2020-02-09 11:45
I just mean that you should still have the consumer code generate the correct auth header, even if it?s not correct by the time the provider verifies it (and use the approaches described to update it on demand during test cycle)

matt.fellows
2020-02-09 11:46
You could use regex or other matchers on the consumer side if needed

bheemreddy181
2020-02-11 01:32
Quick question regards to pact provider verification job - from consumer side we want to verify a branch all the time, but where as from provider side we want to look at the master tagged pact. so for this setup do we setup provider as below ``` consumer_version_tags [{name: ENV['pactConsumertags'], all: false, fallback: 'master'}]``` or just use different ENV variable for each job setup ?

bethskurrie
2020-02-11 01:33
> consumer side we want to verify a branch all the time I don't understand what you mean by this

bheemreddy181
2020-02-11 01:50
Typically as we are running on the PR on GitHub its the branch name or GIT SHA what we are tagging the pact with and we want to verify that particular tag all the time

bethskurrie
2020-02-11 01:51
Is this on a job triggered by a webhook?

bethskurrie
2020-02-11 01:51
or is this during the providers "normal" verification, as part of it's own build?

bheemreddy181
2020-02-11 01:51
Yes

bheemreddy181
2020-02-11 01:52
Webhook initiated from consumer side

bethskurrie
2020-02-11 01:52
You want to verify the pact URL that comes from the webhook.

bethskurrie
2020-02-11 01:52
You don't want to verify by the tag.

bethskurrie
2020-02-11 01:52
The reason is, there is metadata in that URL that will make sure your results go to the right commits.

bethskurrie
2020-02-11 01:52
If you make a fresh request to the broker to fetch by tag, you'll lose that.

bheemreddy181
2020-02-11 01:53
For regular provider job we always want to look at master pact

bethskurrie
2020-02-11 01:53
you need two separate configurations.

bethskurrie
2020-02-11 01:53
one for changes made by your provider, one for when your pact changes.


bheemreddy181
2020-02-11 01:56
So send this ${pactbroker.pactUrl} from webhook ? And there is no need for tagging

bethskurrie
2020-02-11 01:57
no

bethskurrie
2020-02-11 01:57
I would tag anyway

bethskurrie
2020-02-11 01:57
it will help you identify which pact belongs to which consumer branch.

bheemreddy181
2020-02-11 01:58
Makes sense so the packURL to be shared on the master build as well ?

bheemreddy181
2020-02-11 01:58
As it is all one webhook

bethskurrie
2020-02-11 01:59
Yes

bheemreddy181
2020-02-11 01:59
How about the provider side verification job it will look at the tags ?

bheemreddy181
2020-02-11 01:59
Or default to master all the time


bethskurrie
2020-02-11 02:00
see if that makes sense

bethskurrie
2020-02-11 02:00
It depends if you're using matching branch names between the consumer and provider

bheemreddy181
2020-02-11 02:14
Thanks. Appreciate it we are not using matching branch names as of now

bethskurrie
2020-02-11 02:14
just verify what ever you call your master/dev and prod

bheemreddy181
2020-02-11 02:15
And these are nothing but your tags tagged from consumer side on their master build if I understand this correctly

bethskurrie
2020-02-11 02:16
for master, yes.

bethskurrie
2020-02-11 02:16
for prod, you tag that at deploy time.


bethskurrie
2020-02-11 02:16
Please read ^^ if you haven't already

bethskurrie
2020-02-11 02:16
It's been updated recently, so even if you have read it, it's worth another read

bheemreddy181
2020-02-11 03:55
Thanks Beth, Happy Tuesday :)

bheemreddy181
2020-02-12 22:35
Hey if I am getting this correct there will two rake tasks on Ruby implementation provider in which one will be consuming the pact url from the webhook and running verification and other take task is always pulling the master tagged pact

bheemreddy181
2020-02-12 22:37
And can we use pact-provider-verifier CLI client for running these two tasks independent of which implementation the provider is on

bheemreddy181
2020-02-12 22:50
@bethskurrie when ever you are free ^ for couple of questions

bethskurrie
2020-02-13 03:33
> Hey if I am getting this correct there will two rake tasks on Ruby implementation provider in which one will be consuming the pact url from the webhook and running verification and other take task is always pulling the master tagged pact Yes.

bethskurrie
2020-02-13 03:33
That's what I was trying to say :stuck_out_tongue:

bethskurrie
2020-02-13 03:34
> And can we use pact-provider-verifier CLI client for running these two tasks independent of which implementation the provider is on Yes.

reverse9
2020-02-16 18:46
has joined #pact-ruby

yau.yik.shiung
2020-02-17 16:24
has joined #pact-ruby

yau.yik.shiung
2020-02-17 16:25
hi there would like to get some insight (right/wrong) on the following initiative that i am going to introduce: ? BDD/Cucumber test is often used in microservice isolation testing with by mocking the dependent services ? I am going to replace the current mock server (wiremock) with pact-jvm-server so that the "assumption" made on the mock request/response can be verified on the provider test ? Any potential downside by doing that ? Is this design violating contract testing ?

bheemreddy181
2020-02-18 16:02
Maybe not a bad idea from what I see but if your cukes are testing one-to-one communication between consumer and provider that should be, but if it is taking a long time running through the entire application then these tests might take longer to run and don't forget there will be a provider build if the contract changes. So better to have tests around the communication rather than everything

bheemreddy181
2020-02-18 22:36
Is there a way we can run rack middleware for each provider state ?

yau.yik.shiung
2020-02-19 15:19
thanks for the feedback. yeah that's quite true as in BDD we are likely to have some test scenarios that are be redundant in term of the contract testing. Might want to suggest: ? To revise the test cases to reuse the same mock data as much as possible ? Since swaggers are used, will recommend to run the provider test with swagger validation ( to reduce provider testing time )

bheemreddy181
2020-02-20 04:01
@bethskurrie ^ whenever you get some time

bethskurrie
2020-02-20 06:36
I don't know what you mean.

bethskurrie
2020-02-20 06:36
Different rack middleware? No.

bethskurrie
2020-02-20 06:36
The app is static once it's set up.

bheemreddy181
2020-02-22 00:39
Team, can I use APIs for creating data in provider states, typically in the setup block for provider state?

matt.fellows
2020-02-22 02:07
Of course. The provider state function can do whatever you need it to. Most of the times it's a local in-proc setup, but there's nothing stopping your testa to reach out and hit an API

bheemreddy181
2020-02-22 02:12
Well is it recommended to do so or better skip the total time and just insert data into dB for doing a GET

matt.fellows
2020-02-22 02:13
It?s hard to provide a recommendation without understanding all of the intricacies, but generally speaking, updating the database is going to be the simplest and fastest and easiest to maintain, so I?d start that way

me1015
2020-02-24 13:24
has joined #pact-ruby

dan.garland
2020-02-25 10:26
has joined #pact-ruby

tomas.sakinis611
2020-02-25 11:02
has joined #pact-ruby

aserdyuk
2020-03-04 00:05
has joined #pact-ruby

simon.nizov
2020-03-10 17:01
Hey @bethskurrie - did you get a chance to have a look at this? :point_up:

bethskurrie
2020-03-10 21:46
I haven't as my OSS day isn't happening this fortnight. But I haven't forgotten it. Thanks.

bheemreddy181
2020-03-13 20:27
Quick question folks , if i am trying to retrieve pacts with a particular tag say master like mentioned here https://github.com/pact-foundation/pact_broker/wiki/Using-tags#retrieving-pacts how does my rake task look like ? ```Pact::VerificationTask.new(:pull_request_verification) do |pact| pact.uri "#{REMOTE_PACT_BROKER_BASE_URL}/pacts/provider/provider_namee/consumer/consumer_name/latest", pact_helper: 'spec/service_consumers/pact_helper.rb' end```

bheemreddy181
2020-03-13 20:28
how does this rake task use config from my pact_helper which is like below ```honours_pacts_from_pact_broker do # This example points to a local file, however, on a real project with a continuous # integration box, you would use a [Pact Broker](https://github.com/bethesque/pact_broker) or publish your pacts as artifacts, # and point the pact_uri to the pact published by the last successful build. pact_broker_base_url "http://pact_broker.dev.com" consumer_version_tags [{name: 'master'}] end end```

bheemreddy181
2020-03-13 20:29
I mean how does it look for the master tag which is specified in the helper

bheemreddy181
2020-03-16 18:46
Can some one help me with this question ?

bheemreddy181
2020-03-16 23:59
@bethskurrie Sorry if you don?t mind can you help me getting some answer for this question ?

bethskurrie
2020-03-17 00:00
Hey.

bethskurrie
2020-03-17 00:00
Your custom task ignores the tags

bethskurrie
2020-03-17 00:00
You give it a specific URL.

bethskurrie
2020-03-17 00:02
If you have configured a custom ```app { MyApp.new }``` it will use that

bethskurrie
2020-03-17 00:03
it will also pick up the provider version number and tags.

bethskurrie
2020-03-17 00:03
But it will ignore any configurations that tell it where to get the pacts from, because the custom task overrides that.

bheemreddy181
2020-03-17 01:16
If in that case if I don?t have my custom task how will it know which consumer it has to pick from broker ? When I say bundle exec pact:verify ?

bheemreddy181
2020-03-17 01:24
Can I pass variables to pact verification task similar to pact publish task like the uri tags and version something like that @bethskurrie ?

bethskurrie
2020-03-17 01:51
It asks the broker for all the consumers for that provider.

bethskurrie
2020-03-17 01:51
You just provide the provider name, and the broker knows which consumers it has.

bethskurrie
2020-03-17 01:52
Yes, you can pass env vars to the verification task the same way you can to any ruby code.

bheemreddy181
2020-03-18 00:40
I was more asking something like below ```PactBroker::Client::Verification.new(:Provider_Pull_Request_Verification) do | task | task.provider_version = ENV['TRAVIS_BRANCH'] task.pact_broker_base_url = REMOTE_PACT_BROKER_BASE_URL task.tags = 'master' end``` So that we can avoid something like this ```Pact::VerificationTask.new(:pull_request_verification) do |pact| pact.uri "#{REMOTE_PACT_BROKER_BASE_URL}/pacts/provider/sample/consumer/sample/latest", pact_helper: 'spec/service_consumers/pact_helper.rb' end``` and the idea here is we can run multiple provider branch level verifications in different jobs on CI rather than just running pact:verify which pulls all the pacts at once. thoughts ?

bethskurrie
2020-03-18 01:44
Pass in the URL of the changed pact

bethskurrie
2020-03-18 01:45
You still need the spec helper

bethskurrie
2020-03-18 01:45
What you are trying isn't supported.

bethskurrie
2020-03-18 01:46
All the custom verification task does is override which pact gets verified

bethskurrie
2020-03-18 01:47
Otherwise you'd have to duplicate your tags, versions and app configurations, potentially leaving to inconsistencies.

bheemreddy181
2020-03-18 13:59
while consumer initiates the verification we are passing in the changed pact , this is for provider side verification for each branch change

joseph.haig
2020-04-08 15:39
If I have defined an interaction can I do the equivalent of `expect(WebMock).to have_requested(:post, url)` for that interaction? Or do I just depend on the fact that the test will report an error if the request has not been made?

anguyen0815
2020-04-15 16:51
has joined #pact-ruby

anguyen0815
2020-04-15 17:06
Hi guys, I have been trying to write consumer tests for a file upload api and it has to do with image/binary files. I couldn't get it to work so far and it looks like the mock service couldn't handle the binary file. I saw that there is this ticket https://github.com/pact-foundation/pact-mock_service/issues/32. Is that issue still applicable? If so, do you guys have any recommendations as far as testing image upload goes?

hacosta
2020-05-11 15:57
has joined #pact-ruby

patrick.b.romo
2020-05-11 18:01
has joined #pact-ruby

ross.kaffenberger
2020-05-28 02:14
has joined #pact-ruby

sairsule
2020-06-04 08:08
has joined #pact-ruby

sairsule
2020-06-04 08:10
according to feature_support matrix, Asychronous message pacts is not yet implemented for Ruby. Are there any timelines decided for it?

bethskurrie
2020-06-04 08:17
I've been hoping to get it done each week for the last 3 weeks.

bethskurrie
2020-06-04 08:17
I'll see what I can do next week.

sadeed.bari
2020-06-04 18:33
has joined #pact-ruby

ian.mcwilliams
2020-06-05 08:27
has joined #pact-ruby

ian.mcwilliams
2020-06-05 08:28
Hey all! I'm about to implement pact as a provider in a ruby repo. I'm following the documentation here: https://github.com/pact-foundation/pact-ruby

ian.mcwilliams
2020-06-05 08:36
I've added pact_helper.rb, but I'm missing what should go in line 4 here - when I run the rake task, what kicks off an actual test run?

bethskurrie
2020-06-05 08:53
You need to add the task as a dependency of the default rake task

bethskurrie
2020-06-05 08:53
Oh, no, that task is not right

bethskurrie
2020-06-05 08:55
I'll do an example when the kids are in bed.


bethskurrie
2020-06-05 08:57
Just follow that first example

ian.mcwilliams
2020-06-05 14:55
Thanks @bethskurrie, that seems to be working :slightly_smiling_face:

corey
2020-06-05 20:50
has joined #pact-ruby

corey
2020-06-05 20:51
~Is this the correct channel for stub server questions?~

corey
2020-06-05 20:59
~The stub server seems to want an exact body match on requests made to it but we want to be flexible on one field in particular in a JSON POST body and it doesn't seem to support falling back to the matchers specified in the pact~

ian.mcwilliams
2020-06-11 07:52
Hey @bethskurrie I'm following up on the above, have run into an error:


ian.mcwilliams
2020-06-11 07:54
I'm using a local file to test it's working so I tried adding the method `app_in_config_ru` to pact_helper.rb

ian.mcwilliams
2020-06-11 07:54
But no change

bethskurrie
2020-06-11 08:18
In the "verifying pacts" docs, look at the first line in the example `Pact.service_provider` block.


ian.mcwilliams
2020-06-12 10:47
Thanks @beth (http://Pactflow.io), I think that's moved us forward, we're now puzzling over another error

ian.mcwilliams
2020-06-12 10:48
Trying to follow the code, it seems to be internal to the Pact gem, but I think it must be trying to run our coded block with the --pact-helper flag?

kaio.silveira
2020-06-12 10:56
has joined #pact-ruby

bethskurrie
2020-06-16 10:41
@ian.mcwilliams I can't see anything unusual in that code that would explain the error you're getting.


bethskurrie
2020-06-16 10:42
What command are you using to run the tests?

bethskurrie
2020-06-16 10:43
And what is the output.

bethskurrie
2020-06-16 10:44
Can you checkout the pact-ruby codebase, go into `example/animal-service` run `bundle install` and then `bundle exec rake pact:verify`

bethskurrie
2020-06-16 10:45
Also, when you're running your failing test, can you set the env var `BACKTRACE=true` - you might get more of a stack trace.

ian.mcwilliams
2020-06-16 14:35
Thanks @bethskurrie, I've downloaded pact-ruby and that's running fine

ian.mcwilliams
2020-06-16 14:36
I'm using `rake test_contract` to run the tests

ian.mcwilliams
2020-06-16 14:39
Here's the output from the failing test with BACKTRACE=true

tyler.collins
2020-06-22 17:21
has joined #pact-ruby

tyler.collins
2020-06-22 17:24
hi All, is there an easy way to prevent the `reports/pacts/help.md` file from being created in my repo when I verify the pacts on the provider side? I realize I can just .gitignore this but I?d rather not have to fiddle with that file

ian.mcwilliams
2020-06-23 19:38
@bethskurrie just an update - I got some support in the team to look into this and as I think you expected it's a problem with spinning up the system. We tried a few things and got the setup into good shape.

ian.mcwilliams
2020-06-23 19:39
It still doesn't work, as the system runs on a thin server and throws :async, which the pact gem doesn't know what to do with as it's running WEBrick

ian.mcwilliams
2020-06-23 19:40
The system is using Event Machine so the server can't be replaced

ian.mcwilliams
2020-06-23 19:41
I can't find anything suggesting that the server can be configured in the Pact gem, so perhaps it's just not compatible

ian.mcwilliams
2020-06-23 19:41
Do let me know if that's not the case though and I'll see if we can wrap back round to it in the future :slightly_smiling_face:

bethskurrie
2020-06-24 05:14
I think you can change the reports dir to point to `./tmp/pact`

bethskurrie
2020-06-24 05:14
Most git ignore files ignore tmp anyway

nmsuryavanshi
2020-06-24 07:26
has joined #pact-ruby

nmsuryavanshi
2020-06-24 07:31
Hi All, I m getting the below error when verifying pact using java(provider) can anyone please help. Thanks Expected header 'Content-Type' to have value '{"json_class":"Pact::Term"' but was 'application/json', Expected header 'Content-Type' to have value '"data":{"generate":"application/json"' but was '', Expected header 'Content-Type' to have value '"matcher":{"json_class":"Regexp"' but was '', Expected header 'Content-Type' to have value '"o":0' but was '', Expected header 'Content-Type' to have value '"s":"application\/json"}}}' but was ''

bethskurrie
2020-06-24 07:31
java provider?

bethskurrie
2020-06-24 07:32
That pact is either a very old old version (like, 7 years old) or it's been hand crafted.

bethskurrie
2020-06-24 07:32
Not a java consumer?

nmsuryavanshi
2020-06-24 08:27
consumer is written in ruby and we are trying providers in java

bethskurrie
2020-06-24 08:44
the pact term should never be in the pact.json

bethskurrie
2020-06-24 08:44
That class. "Pact::Term"

bethskurrie
2020-06-24 08:44
What version of Pact Ruby generated that pact?

nmsuryavanshi
2020-06-24 08:44
2.5.7 may b

bethskurrie
2020-06-24 08:45
hm.

bethskurrie
2020-06-24 08:45
Current version is 1.51.0

bethskurrie
2020-06-24 08:45
that doesn't sound right

matt.fellows
2020-06-26 11:13
As I mentioned yesterday Namruta, please share your code example and also the gemfile so we can see what's going on. That pact is incorrectly generated

nmsuryavanshi
2020-06-26 11:14
Its resolved the version used was older version

nmsuryavanshi
2020-06-26 11:17
Thanks

bheemreddy181
2020-07-16 01:21
Quick question around just pulling all the pacts for a provider in ruby https://github.com/pact-foundation/pact-ruby-e2e-example/blob/master/provider/Rakefile#L31 do we just specify the provider name and exclude the consumer name

bethskurrie
2020-07-16 10:09
That example is for replicating issues, not for showing best practice.


bethskurrie
2020-07-16 10:13
The consumer name is not specified.

bheemreddy181
2020-07-16 14:28
Thanks Beth

bheemreddy181
2020-07-16 14:29
How generally people deal with a giant json while writing pact tests , are there any examples how pact.like can be used for bigger jsons?

bheemreddy181
2020-07-17 18:22
Team need help on understanding what i am doing wrong while pulling latest pact from master for one of my provider

bheemreddy181
2020-07-17 18:22
here is the error what i see ```1: from /usr/local/bundle/gems/pact-1.51.0/lib/pact/hal/link.rb:65:in `post!' /usr/local/bundle/gems/pact-1.51.0/lib/pact/hal/entity.rb:102:in `assert_success!': Error retrieving https://pact-broker.enova.com/pacts/provider/identity/for-verification status=400 {"errors":{"consumerVersionSelectors":["tag must be a string at index 0"]}} (Pact::Hal::ErrorResponseReturned)```

bheemreddy181
2020-07-17 18:32
here is what my pact helper looks like ```# frozen_string_literal: true require_relative './provider_states' Pact.configuration.reports_dir = './provider/reports' provider_version = ENV['GIT_COMMIT'] || `git rev-parse --verify HEAD` publish_flag = ENV['PUBLISH_VERIFICATION_RESULTS'] Pact.configure do |config| config.diff_formatter = :embedded end Pact.service_provider 'identity' do app { ProxyApp.new(Identity::Application) } app_version provider_version publish_verification_results publish_flag honours_pacts_from_pact_broker do # Base URL of pact broker is mandatory # basic auth username/password and token are optional parameters pact_broker_base_url 'https://pact-broker.dev.com' # Advanced configuration # name: name of the tag # all: it takes the boolean value true|false. Optional. Defaults to false. # To fetch all the pacts for a tag, set it to true. # To fetch only the latest pact, set it to false. # fallback: In case, the tag does not exist, it will fetch pacts for the fallback-tag. This is an optional # parameter. consumer_version_tags [{name: 'master', all: false}] end end```

harsh.x.parekh
2020-07-19 23:03
has joined #pact-ruby

bheemreddy181
2020-07-20 18:34
Can stateHandlers access the pact request parameters in pact ruby ?

bheemreddy181
2020-07-21 18:22
How can we tag a provider in pact ruby ? similar to tagging in go


harsh.x.parekh
2020-07-22 17:36
Is there an example of writing pacts for a HTTP post interaction?

harsh.x.parekh
2020-07-22 19:53
never mind, i figured it out.. its the same as any other controller/request spec

harsh.x.parekh
2020-07-22 19:53
which is kind of neat!

harsh.x.parekh
2020-07-22 23:04
I?m adding pact gem to a large rails app, and `bundle install` complains `Bundler could not find compatible versions for gem "thor"` .. A `bundle update` is downgrading the version of thor the app is using which I don?t want to do. 1. Would it be better to update versions of thor being used in pact and pact-mock_service gems? 2. Would that be worth the effort?

harsh.x.parekh
2020-07-22 23:53
On broad brushes, it seems this will also need upgrading the version of thor on dependent runtime and development gems.. pact-message, pact-mock_service

harsh.x.parekh
2020-07-24 16:05
@bethskurrie any thoughts before i spend more time on this?

tyler.collins
2020-07-31 00:15
is there a pact-ruby provider library that supports using minitest as opposed to rspec? I saw that there?s a pact-consumer-minitest gem, and wondering if there?s an equivalent for the provider side

sagupta
2020-08-06 08:54
has joined #pact-ruby

steve.mackinnon
2020-08-10 03:11
has joined #pact-ruby

coduo123
2020-08-10 11:13
has joined #pact-ruby

bethskurrie
2020-08-20 01:53
@tyler.collins no there isn't unfortunately

bethskurrie
2020-08-20 01:53
But you don't need to write any tests in RSpec.

bethskurrie
2020-08-20 01:54
It's a completely separate rake task, and shouldn't interfere with your minitest tests.

alex.elmekeev
2020-08-21 16:33
has joined #pact-ruby

bheemreddy181
2020-08-21 17:41
Has any one started seeing issues latest docker image from pact while publishing results to pact broker

bheemreddy181
2020-08-21 18:15
I mean latest pact broker image

heytaco
2020-08-25 03:57
has joined #pact-ruby

heytaco
2020-08-25 03:57
Hi there! My name is HeyTaco!, and you can use me to give people tacos to show your appreciation. My tacos will spread joy through Slack!

bethskurrie
2020-08-25 04:17
@bheemreddy181 strip new lines off your git branch/commit

bethskurrie
2020-08-25 04:18
If you're doing something like `git rev-parse --something` , put a `.strip` on it

bheemreddy181
2020-08-26 17:47
Ah makes sense thanks Beth

ben.johnson
2020-09-03 08:53
has joined #pact-ruby


alex.elmekeev
2020-09-14 08:28
@tyler.collins FYI

tyler.collins
2020-09-14 16:42
:pray:

tyler.collins
2020-09-14 23:28
I?ve started using the enable_pending flag but oddly the tests are still failing (returning status code 1) even with pending pacts. Here?s some excerpts from the logs ```INFO: Reading pact at http://<pact broker url>/pacts/provider/<provider>/consumer/<consumer>/pact-version/b625d36696f1ae44adc80a9324e0ff6929f342f2 DEBUG: The pact at http://<pact broker url>/pacts/provider/<provider>/consumer/<consumer>/pact-version/b625d36696f1ae44adc80a9324e0ff6929f342f2 is being verified because it matches the following configured selection criterion: latest pact for a consumer version tagged 'master' DEBUG: This pact is in pending state for this version of <provider> because a successful verification result for <provider> has not yet been published. If this verification fails, it will not cause the overall build to fail. Read more at https://pact.io/pending Verifying a pact between <consumer> and <provider> [PENDING] Given user is authenticated a GET request for stuff with GET /api/<route>/ returns a response which has status code 200 (FAILED - 1) has a matching body (FAILED - 2) includes headers "Content-Type" which equals "application/vnd.api+json" (FAILED - 3) Failures: 1) Verifying a pact between <consumer> and <provider> [PENDING] Given user is authenticated a GET request for stuff with GET /api/<route>/ returns a response which has status code 200 Got 0 failures and 2 other errors: 1.1) Failure/Error: set_up_provider_states interaction.provider_states, options[:consumer] RuntimeError: Could not find provider state "user is authenticated" for consumer <consumer> # /Users/tylercollins/.rvm/gems/ruby-2.6.3/gems/pact-1.54.0/bin/pact:4:in `<top (required)>' # /Users/tylercollins/.rvm/gems/ruby-2.6.3/bin/pact:23:in `load' # /Users/tylercollins/.rvm/gems/ruby-2.6.3/bin/pact:23:in `<main>' 1.2) Failure/Error: tear_down_provider_states interaction.provider_states, options[:consumer] RuntimeError: Could not find provider state "user is authenticated" for consumer <consumer> # /Users/tylercollins/.rvm/gems/ruby-2.6.3/gems/pact-1.54.0/bin/pact:4:in `<top (required)>' # /Users/tylercollins/.rvm/gems/ruby-2.6.3/bin/pact:23:in `load' # /Users/tylercollins/.rvm/gems/ruby-2.6.3/bin/pact:23:in `<main>' ...and a few more failures that look similar to ^ this 3 interactions, 1 pending Pending interactions: (Failures listed here are expected and do not affect your suite's status)``` @bethskurrie any idea what might be happening here?

tyler.collins
2020-09-14 23:29
my test setup looks like this ```Pact.service_provider 'provider' do app_version ENV['CIRCLE_SHA1'] app_version_tags [ENV['CIRCLE_BRANCH']] publish_verification_results ENV['CIRCLECI'] ? true : false honours_pacts_from_pact_broker do consumer_version_tags ['master'] enable_pending true include_wip_pacts_since (Date.today - 7) pact_broker_base_url ENV['PACT_BROKER_URL'], username: ENV['PACT_BROKER_USER'], password: ENV['PACT_BROKER_PASSWORD'] end end```

tyler.collins
2020-09-14 23:32
I?m using pact ruby version 1.54.0 and pact broker version 2.60.1.0

tyler.collins
2020-09-14 23:36
I?ll also clarify that this test is verifying several contracts, some of which are no longer pending. So in the failure described above, there was a successful verification of a regular contract, and an unsuccessful verification of a pending contract from a different consumer in the same test run

bethskurrie
2020-09-14 23:39
@tyler.collins can you recreate the issue using https://github.com/pact-foundation/pact-ruby-e2e-example please


bethskurrie
2020-09-14 23:46
You can hardcode these credentials Broker base URL: https://test.pactflow.io username: dXfltyFMgNOFZAxr8io9wJ37iUpY42M password: O5AIZWxelWbLvqMd8PkAVycBJh2Psyg1


tyler.collins
2020-09-14 23:57
so it seems I can?t have a combination of pending and non-pending pacts in the same test run with the current implementation.

tyler.collins
2020-09-14 23:59
What would be the best practice here?

bethskurrie
2020-09-15 00:01
huh.

bethskurrie
2020-09-15 00:01
Ok I need to fixt hat

bethskurrie
2020-09-15 00:01
Can you raise an issue in pact-ruby please?

bethskurrie
2020-09-15 00:04
Most users of the Ruby code are actually users of other languages that use the pact-ruby-standalone, so I've focussed all my dev on that interface, and completely forgotten to do the native Ruby one. Poor Ruby!

bethskurrie
2020-09-15 00:07
@tyler.collins are you confortable with hacking your local ruby code?

bethskurrie
2020-09-15 00:07
`bundle open pact`

bethskurrie
2020-09-15 00:07
lib/pact/provider/pact_spec_runner.rb

bethskurrie
2020-09-15 00:08
Line 163

bethskurrie
2020-09-15 00:08
`pact_urls.all?{ | pact_url| pact_url.metadata[:pending] }`

bethskurrie
2020-09-15 00:08
Change the `all` to `any`

tyler.collins
2020-09-15 00:09
I?ll give that a go

tyler.collins
2020-09-15 00:16
oh yep that was the trick!

tyler.collins
2020-09-15 00:17
It?s the end of the day for me here in California so I gotta run, if you?d still like me to raise any issue for this I can do that in morning :thumbsup:

bethskurrie
2020-09-15 07:26
I'm going to have to give it more thought so that the ones that are not pending still cause the build to fail correctly.

bethskurrie
2020-09-15 07:26
Please do raise an issue tomorrow.


nazar.khmil
2020-10-05 10:34
has joined #pact-ruby

xandebianchi
2020-10-05 13:05
has joined #pact-ruby

dorin.enache
2020-10-05 15:01
has joined #pact-ruby

nazar.khmil
2020-10-06 09:35
Hi, I was trying to follow pact message consumer example by following https://github.com/pact-foundation/pact-message-ruby/blob/master/spec/features/create_message_pact_spec.rb `alice_producer` doesn't seem to be defined Are consumers still WIP?

ledinhcuong99
2020-10-06 12:53
has joined #pact-ruby

bethskurrie
2020-10-07 08:07
@nazar.khmil yes, sorry.

nazar.khmil
2020-10-07 08:10
all good thanks for the answers

dothetan.040490
2020-10-07 09:14
has joined #pact-ruby

dagostino.remy
2020-10-07 23:03
has joined #pact-ruby

abhi.nandan
2020-10-08 06:38
has joined #pact-ruby

przemyslaw.dabrowski
2020-10-08 12:36
has joined #pact-ruby

emiliano.righi
2020-10-08 13:25
has joined #pact-ruby

cariaga.bh
2020-10-08 21:03
has joined #pact-ruby

campellcl
2020-10-09 00:06
has joined #pact-ruby

elenitsaa043
2020-10-09 10:00
has joined #pact-ruby

adriangabrieloros
2020-10-09 11:05
has joined #pact-ruby

sh.ilgam_pact
2020-10-11 16:13
has joined #pact-ruby

anastasiia.bielik
2020-10-12 11:13
has joined #pact-ruby

deepika.krishnakumar
2020-10-12 15:03
has joined #pact-ruby

anbansal27
2020-10-12 23:02
has joined #pact-ruby

prabhakar.thippa
2020-10-13 04:58
has joined #pact-ruby

giadinhluong
2020-10-13 06:24
has joined #pact-ruby

pavank
2020-10-13 08:41
has joined #pact-ruby

stephane.meng
2020-10-13 09:06
has joined #pact-ruby

abirlal.bose
2020-10-13 09:45
has joined #pact-ruby

mateusz.mrzyglod
2020-10-14 09:32
has joined #pact-ruby

cathleen.yuan
2020-10-14 11:16
has joined #pact-ruby

ramana.jaladurgam
2020-10-14 16:10
has joined #pact-ruby

alik.berezovsky
2020-10-14 18:38
has joined #pact-ruby

a.robecke
2020-10-14 19:24
has joined #pact-ruby

mikahchapman
2020-10-14 21:47
has joined #pact-ruby

hem_kec
2020-10-15 00:44
has joined #pact-ruby

dothetan.040490
2020-10-15 02:22
@dothetan.040490 has left the channel

a.robecke
2020-10-15 07:57
Hey guys, can anyone point me to a sophisticated tutorial (preferably video) how to setup pact properly.

marco.cordeiro
2020-10-15 10:54
has joined #pact-ruby

betty.he
2020-10-15 14:32
has joined #pact-ruby

tamer
2020-10-16 09:08
has joined #pact-ruby

mario.gioiosa
2020-10-16 18:57
has joined #pact-ruby

tjones
2020-10-19 01:11
Sadly we don't have this yet. I'd really like to make some, though!

a.robecke
2020-10-19 07:27
No worries and thanks for responding :heart:

lior.baber
2020-10-19 07:33
has joined #pact-ruby

jeffbdye
2020-10-19 17:10
has joined #pact-ruby

jace
2020-10-19 19:22
has joined #pact-ruby

almaak
2020-10-20 09:35
has joined #pact-ruby

andra.moraru
2020-10-20 14:13
has joined #pact-ruby

camila.coder91
2020-10-20 17:06
has joined #pact-ruby

julzelements
2020-10-21 05:25
has joined #pact-ruby

kapil.mathur
2020-10-21 06:40
has joined #pact-ruby

mark.hudson
2020-10-21 10:45
has joined #pact-ruby

cluu
2020-10-21 17:16
has joined #pact-ruby

camila.campos
2020-10-21 21:35
has joined #pact-ruby

longlevan
2020-10-22 09:15
has joined #pact-ruby

mateusz.derks
2020-10-22 11:30
has joined #pact-ruby

mateusz.derks
2020-10-22 11:37
Hey, is there any option to select particular consumer with `honours_pacts_from_pact_broker` ? I can only see filtering by tag, not sure how to narrow down the selection to the tag of a particular consumer.

justin.garfield
2020-10-22 16:15
has joined #pact-ruby

guppy0356.nakira
2020-10-23 00:34
has joined #pact-ruby

mateusz.derks
2020-10-23 07:32
I guess I can create a consumer-specific tag like `my-project-production` to pick only `my project` consumer. Will check it out.

ercalbwar
2020-10-24 19:24
has joined #pact-ruby

andrewshtamburg
2020-10-25 13:04
has joined #pact-ruby

siad.ardroumli
2020-10-25 18:16
has joined #pact-ruby

srikanthpmailid
2020-10-26 01:02
has joined #pact-ruby

photesthesis_geospiza
2020-10-26 15:10
has joined #pact-ruby

mikahchapman
2020-10-27 16:03
We just started trying to use the pact-stub-service in our UI testing to try to keep our requests in sync with the contracts, but we found that the regex on query params is not respected. I saw https://github.com/pact-foundation/pact-mock_service/issues/80 and https://github.com/pact-foundation/pact-support/pull/69, but there hasn't been any activity on them in some time. Some questions about this functionality: 1. Is this part of spec v2 or v3? 2. Is there anything that can be done to help move this forward? At this point, we're having to break the link between the contract and our tests to move forward with our goals.

jackbwheatley
2020-10-27 21:02
has joined #pact-ruby

carlosalmeida.xon
2020-10-27 22:06
has joined #pact-ruby

nasir.amin
2020-10-28 11:07
has joined #pact-ruby

jimish.shah.-nd
2020-10-28 11:26
has joined #pact-ruby

adam_figgins
2020-10-28 14:20
has joined #pact-ruby

aperdomobo
2020-10-28 15:42
has joined #pact-ruby

diazguerra2
2020-10-28 16:06
has joined #pact-ruby

xsamore
2020-10-28 19:52
has joined #pact-ruby

simon
2020-10-28 20:49
has joined #pact-ruby

ruben.cagnie
2020-10-29 01:24
has joined #pact-ruby

272939217
2020-10-29 05:33
has joined #pact-ruby

driloni92
2020-10-29 09:05
has joined #pact-ruby

pauloavra
2020-10-29 12:33
has joined #pact-ruby

jikogay728
2020-10-30 17:20
has joined #pact-ruby

blmlcu
2020-10-31 14:51
has joined #pact-ruby

jamescourtoy
2020-11-02 21:04
has joined #pact-ruby

telmo.ferreira.costa
2020-11-03 11:32
has joined #pact-ruby

sergii.kopovskyi
2020-11-03 12:35
has joined #pact-ruby

silverton.gimenes
2020-11-03 17:58
has joined #pact-ruby

colber16
2020-11-03 18:34
has joined #pact-ruby

cvoong
2020-11-03 18:55
has joined #pact-ruby

pbobba
2020-11-09 23:03
has joined #pact-ruby

jun.li
2020-11-09 23:05
has joined #pact-ruby

douweicai
2020-11-10 04:11
has joined #pact-ruby

christian.huber
2020-11-10 09:20
has joined #pact-ruby

vuttithatkrongyot
2020-11-10 10:57
has joined #pact-ruby

dan.iosif
2020-11-10 17:06
has joined #pact-ruby

rodrigo.costa20
2020-11-12 00:59
has joined #pact-ruby

yong.gong188
2020-11-12 09:13
has joined #pact-ruby

anandhadeepak
2020-11-12 13:03
has joined #pact-ruby

david.dias
2020-11-12 20:04
has joined #pact-ruby

billal.patel
2020-11-13 10:31
has joined #pact-ruby

billal.patel
2020-11-13 10:41
@billal.patel has left the channel

louis.oliver
2020-11-16 10:33
has joined #pact-ruby

ashishkujoy
2020-11-16 15:08
has joined #pact-ruby

pradeepchoube
2020-11-17 03:49
has joined #pact-ruby

meng-lingtao
2020-11-17 14:39
has joined #pact-ruby

pabvidcal
2020-11-17 15:30
has joined #pact-ruby

magesh.nagamani
2020-11-18 05:15
has joined #pact-ruby

jstoebel
2020-11-18 13:53
has joined #pact-ruby

daniel.sayer89
2020-11-19 10:33
has joined #pact-ruby

art.ptushkin
2020-11-19 10:34
has joined #pact-ruby

pact457
2020-11-19 10:36
has joined #pact-ruby

ajerthan.sivayoganath
2020-11-19 10:38
has joined #pact-ruby

philipchardwick
2020-11-19 11:05
has joined #pact-ruby

tanzmann
2020-11-19 11:09
has joined #pact-ruby

olivier.quere
2020-11-19 12:10
has joined #pact-ruby

wilfried.vandenberghe
2020-11-19 12:19
has joined #pact-ruby

alan.hanafy
2020-11-19 19:28
has joined #pact-ruby

michael.deutscher
2020-11-19 21:39
has joined #pact-ruby

gerry.power
2020-11-20 03:31
has joined #pact-ruby

alex900
2020-11-20 05:08
has joined #pact-ruby

tomas.panik
2020-11-20 08:28
has joined #pact-ruby

gerry.power
2020-11-20 13:41
@bethskurrie - is it possible to gain access to and provide help with the https://github.com/pact-foundation/pact-message-ruby consumer? We are rolling out our Ruby evented MicroServices, and are very interested in using Pact message validation.

marc.ferland
2020-11-20 14:43
has joined #pact-ruby

sebastien.crapoulet
2020-11-20 15:24
has joined #pact-ruby

adutrillaux
2020-11-20 15:28
has joined #pact-ruby

he
2020-11-20 15:59
has joined #pact-ruby

he
2020-11-20 16:15
Hello all. Second day pact user here. Just trying to get some verifications running. I managed to get some pacts generated, and moved them over to the provider apps. Everything seems to be set up, and the verification even hits my api (I?m seeing an error message from it). But even when I enable backtracing, I?m not seeing it hitting my code in the stack anywhere. So, i?m having trouble figuring out what is causing the error. I thought maybe I could use `binding.pry` to get in there, but it doesn?t seem to be able to get ahold of the session. Anyone have any debugging suggestions from the provider verification side?

ivgeni.slabkovski
2020-11-20 21:52
has joined #pact-ruby

ivgeni.slabkovski
2020-11-20 21:53
hello

serhatburakyildirim
2020-11-21 21:57
has joined #pact-ruby

he
2020-11-22 16:59
Aha! It appears my authentication was preventing it to get to the binding.pry statement. Looks like i?m all sorted!

alnasl
2020-11-22 18:46
has joined #pact-ruby

ashutosh23802
2020-11-23 06:20
has joined #pact-ruby

leonty
2020-11-23 10:33
has joined #pact-ruby

dariusz.piwko
2020-11-23 11:34
has joined #pact-ruby

praneeth.kumar
2020-11-23 16:18
has joined #pact-ruby

mark.white
2020-11-24 09:03
has joined #pact-ruby

ufuk.ozcelik
2020-11-24 14:58
has joined #pact-ruby

stefanos.varsanis
2020-11-24 16:48
has joined #pact-ruby

lalexander2810
2020-11-24 16:53
has joined #pact-ruby

sivaprasad9
2020-11-24 20:46
has joined #pact-ruby

scyr
2020-11-25 14:56
has joined #pact-ruby

timotheus.ruprecht
2020-11-25 22:12
has joined #pact-ruby

manali.mogre
2020-11-26 11:44
has joined #pact-ruby

erik.terpstra
2020-11-26 12:08
has joined #pact-ruby

kjayachandra2000
2020-11-26 20:40
has joined #pact-ruby

kjayachandra2000
2020-11-26 22:01
@kjayachandra2000 has left the channel

sushil.kumar
2020-11-27 01:45
has joined #pact-ruby

zhujian
2020-11-27 07:54
has joined #pact-ruby

h.octavian
2020-11-27 14:08
has joined #pact-ruby

noel
2020-11-28 23:12
has joined #pact-ruby

muraalee
2020-11-30 01:56
has joined #pact-ruby

pooja.sharma
2020-11-30 08:52
has joined #pact-ruby

mo
2020-11-30 09:24
has joined #pact-ruby

david.greene
2020-11-30 21:47
has joined #pact-ruby

bas
2020-12-01 09:00
has joined #pact-ruby

wainstead
2020-12-01 14:57
has joined #pact-ruby

jerobinson
2020-12-01 20:32
has joined #pact-ruby

sumedhagamage
2020-12-02 03:33
has joined #pact-ruby

sumedhagamage
2020-12-02 04:12
@sumedhagamage has left the channel

fealaer
2020-12-02 11:40
has joined #pact-ruby

patrick.hendron
2020-12-02 14:44
has joined #pact-ruby

lpratt
2020-12-02 18:19
has joined #pact-ruby

sandragnzalez
2020-12-03 11:04
has joined #pact-ruby

kristian
2020-12-03 14:34
has joined #pact-ruby

me1466
2020-12-03 23:42
has joined #pact-ruby

wenfeng.li
2020-12-04 11:42
has joined #pact-ruby

cdambo
2020-12-05 11:59
has joined #pact-ruby

gerry.power
2020-12-07 19:04
```Pact::Message Consumer Not finished yet as nobody has asked for it. Ping @Beth Skurrie on http://slack.pact.io if you'd like use this.``` Ping @bethskurrie - we would like to use it^

gayatree.eee
2020-12-08 04:50
has joined #pact-ruby

c.pavan1986
2020-12-09 04:18
has joined #pact-ruby

william.pritchard
2020-12-09 15:28
has joined #pact-ruby

parveshchaudhary111
2020-12-09 17:54
has joined #pact-ruby

w.sobasik
2020-12-10 10:39
has joined #pact-ruby

thanuxxxx
2020-12-12 22:41
has joined #pact-ruby

ian.hamilton
2020-12-13 06:53
has joined #pact-ruby

colm.j.murphy91
2020-12-13 07:02
has joined #pact-ruby

victoria.kruczek
2020-12-13 14:13
has joined #pact-ruby

wuddarwin
2020-12-14 05:23
has joined #pact-ruby

connor.aird
2020-12-14 15:52
has joined #pact-ruby

arman.najafian
2020-12-14 15:52
has joined #pact-ruby

praveen.lakkaraju
2020-12-14 16:12
has joined #pact-ruby

alejandro.germain
2020-12-14 16:26
has joined #pact-ruby

josh.ellinger
2020-12-15 01:22
has joined #pact-ruby

ufuk.ozcelik
2020-12-15 08:22
@ufuk.ozcelik has left the channel

nikitsenka
2020-12-15 09:35
has joined #pact-ruby

hibahawes
2020-12-15 09:53
has joined #pact-ruby

sarvar
2020-12-15 14:24
has joined #pact-ruby

bethskurrie
2020-12-15 22:28
@gerry.power it's actually done, just waiting for someone to try it out.


suruchipatidar14
2020-12-16 05:35
has joined #pact-ruby

smatheson
2020-12-16 06:33
has joined #pact-ruby

gerry.power
2020-12-16 13:46
Excellent news! I will integrate with our project and test it over the next few weeks.

olayemifolakemi
2020-12-16 15:23
has joined #pact-ruby

ania.kovalchuk
2020-12-17 00:09
has joined #pact-ruby

writetojoshma
2020-12-17 05:52
has joined #pact-ruby

rejeesh.g
2020-12-17 11:07
has joined #pact-ruby

lukas.kempec
2020-12-17 12:45
has joined #pact-ruby

vikas543
2020-12-17 16:28
has joined #pact-ruby

bpugh
2020-12-17 17:05
has joined #pact-ruby

jeff.burmood
2020-12-19 17:45
has joined #pact-ruby

kyle.florence
2020-12-19 19:21
has joined #pact-ruby

ankurmalik22
2020-12-19 21:14
has joined #pact-ruby

vsukumaran
2020-12-20 01:56
has joined #pact-ruby

omer.morad
2020-12-20 08:10
has joined #pact-ruby

ringo
2020-12-20 10:51
has joined #pact-ruby

omer.moradd
2020-12-20 18:01
has joined #pact-ruby

souravsen1
2020-12-21 11:28
has joined #pact-ruby

andoni.arroyo
2020-12-21 17:51
has joined #pact-ruby

theovanessen
2020-12-22 10:47
has joined #pact-ruby

stuart3166
2020-12-22 12:35
has joined #pact-ruby

winfante
2020-12-22 22:51
has joined #pact-ruby

lars.bonnes
2020-12-23 13:05
has joined #pact-ruby

eungjun.yi
2020-12-25 14:25
has joined #pact-ruby

ebanster
2020-12-27 13:18
has joined #pact-ruby

onur.baskirt
2020-12-28 10:48
has joined #pact-ruby

massimo.daros
2020-12-29 13:18
has joined #pact-ruby

chris.fullinwider
2020-12-29 18:15
has joined #pact-ruby

piotr.soltysiak
2020-12-30 16:55
has joined #pact-ruby

adrian.przybyla
2021-01-04 13:41
has joined #pact-ruby

dcorrales
2021-01-04 22:06
has joined #pact-ruby

jokubas.lekevicius
2021-01-04 22:10
has joined #pact-ruby

matt195
2021-01-05 16:35
has joined #pact-ruby

rafael.manzoni
2021-01-05 17:56
has joined #pact-ruby

animesh2712
2021-01-05 19:29
has joined #pact-ruby

info
2021-01-06 01:55
has joined #pact-ruby

pascal.libenzi
2021-01-06 10:57
has joined #pact-ruby

brett
2021-01-06 18:55
has joined #pact-ruby

josh.rosenfeld
2021-01-06 19:39
has joined #pact-ruby

carlo
2021-01-07 13:24
has joined #pact-ruby

rafael.manzoni
2021-01-07 15:19
Hi there is any way to use VCR to stub an external api in a provider pact verification test?

rafael.manzoni
2021-01-07 15:30
Just in case, I was able to configure this by using this configuration in VCR: ```config.around_http_request do |request| VCR.use_cassette(request.uri, &request) end```

andrewshtamburg
2021-01-07 16:03
@andrewshtamburg has left the channel

danny.porrello
2021-01-07 16:48
has joined #pact-ruby

dawood.abbas
2021-01-08 07:00
has joined #pact-ruby

victoria.kruczek
2021-01-10 16:35
@victoria.kruczek has left the channel

cksharma122
2021-01-10 17:19
has joined #pact-ruby

caiquedpfc
2021-01-11 04:05
has joined #pact-ruby

henrik.rudstrom
2021-01-11 18:30
has joined #pact-ruby

eric
2021-01-12 10:23
has joined #pact-ruby

fnguyen
2021-01-13 00:39
has joined #pact-ruby

pollet_22
2021-01-13 16:04
has joined #pact-ruby

dshattuck
2021-01-13 20:49
has joined #pact-ruby

thomas.rosati
2021-01-13 21:58
has joined #pact-ruby

rahulsmalpani
2021-01-14 07:56
has joined #pact-ruby

sacha.camfferman768
2021-01-14 09:42
has joined #pact-ruby

brandonbeard86
2021-01-14 22:10
has joined #pact-ruby

geetishnayak
2021-01-15 01:02
has joined #pact-ruby

shettyg
2021-01-15 14:18
has joined #pact-ruby

natarajang1
2021-01-15 15:29
has joined #pact-ruby

michel.neufeglise
2021-01-18 08:55
has joined #pact-ruby

bart.boersma
2021-01-18 10:48
has joined #pact-ruby

monica.wu
2021-01-19 06:25
has joined #pact-ruby

makobernal
2021-01-19 08:23
has joined #pact-ruby

jibrail.idris
2021-01-19 10:11
has joined #pact-ruby

jmvb.registros
2021-01-19 11:01
has joined #pact-ruby

tpham
2021-01-19 22:36
has joined #pact-ruby

vishal.grover
2021-01-20 03:12
has joined #pact-ruby

priya.saraf
2021-01-20 08:43
has joined #pact-ruby

fahad.aj.khan
2021-01-20 08:58
has joined #pact-ruby

nicole.jaenchen
2021-01-20 09:38
has joined #pact-ruby

dinakaran.ulaganathan
2021-01-20 13:59
has joined #pact-ruby

ptsiakos77
2021-01-20 21:55
has joined #pact-ruby

mhdtouban
2021-01-21 01:58
has joined #pact-ruby

bheemreddy181
2021-01-21 03:26
I see Golang pact has an option to not fail or fail when pacts present on pact broker using `FailIfNoPactsFound` , is there a way we can do that in ruby ?

veeraprathap.n
2021-01-21 04:10
has joined #pact-ruby

tsiakos
2021-01-21 09:24
has joined #pact-ruby

oleg
2021-01-21 13:05
has joined #pact-ruby

tsiakos
2021-01-21 14:04
@bethskurrie Hi Beth, I am using pact-message gem for create and verify consumer driven contracts for messages. The provider works fine!! I was wondering if I can use the consumer as well..


gerry.power
2021-01-21 14:11
I have been doing some early testing with it, and it?s working well for us.

tsiakos
2021-01-21 14:13
Excellent, thank you very much!!!!

bheemreddy181
2021-01-21 15:51
Can some one help me on this ?

bheemreddy181
2021-01-21 23:19
@bethskurrie Can you share some insights on this when ever you are free?

bethskurrie
2021-01-21 23:20
@bheemreddy181 please raise a feature request in http://pact.canny.io

bheemreddy181
2021-01-21 23:21
oh this feature is not available right now.

bheemreddy181
2021-01-21 23:24
if i am reading this correct , i feel this feature will enable provider to be able to go green if `master` pacts not present and gives an ability to consumer to verify the contracts on each pull request for the initial integration - correct me if i am wrong

bethskurrie
2021-01-21 23:25
At the moment, the ruby impl does not fail if there are no pacts.

bheemreddy181
2021-01-21 23:27
Am i doing this wrong then

bethskurrie
2021-01-21 23:28
I can't tell unless you show me the configuration

bheemreddy181
2021-01-21 23:31
this my pact_helper.rb ```require_relative './provider_states' Pact.configuration.reports_dir = './provider/reports' provider_version = ENV['GIT_COMMIT'] || `git rev-parse --verify HEAD`.strip publish_flag = true branch = 'pull_request' Pact.configure do |config| config.diff_formatter = :embedded end Pact.service_provider 'pgs' do app { ProxyApp.new(Pgs::Application) } app_version_tags [branch] app_version provider_version publish_verification_results publish_flag honours_pacts_from_pact_broker do # Base URL of pact broker is mandatory # basic auth username/password and token are optional parameters pact_broker_base_url 'http://localhost:9292', {username: 'pact_workshop', password: 'pact_workshop'} # Advanced configuration # Optionally specify the consumer version tags for the pacts you want to verify # Simple config - a list of tag names # This will verify the latest pact with the tag `master` consumer_version_tags ['master'] end end```

bethskurrie
2021-01-21 23:31
Ok, it seems that the ruby one doesn't let you run with no pacts. The CLI version does (pact-provider-verifier).

bethskurrie
2021-01-21 23:31
``` def run_with_configured_pacts_from_pact_helper pact_urls = Pact.provider_world.pact_urls raise "Please configure a pact to verify" if pact_urls.empty? Pact::Provider::PactSpecRunner.new(pact_urls, pact_spec_options).run end```

bethskurrie
2021-01-21 23:31
As I said, please raise a feature request in http://pact.canny.io

bethskurrie
2021-01-21 23:32
I might be able to look at it on my next OSS day in two weeks.

bethskurrie
2021-01-21 23:32
If you know some Ruby devs, please feel free to suggest they raise a PR.

bheemreddy181
2021-01-21 23:32
Ah got is it recommended to use the cli version for ruby ?

bethskurrie
2021-01-21 23:32
No, because you can't mock things out using RSpec.

bethskurrie
2021-01-21 23:33
And it runs an actual server instead of using rack, which is slow.

bheemreddy181
2021-01-21 23:33
makes sense - if you can direct me a bit probably i can raise a PR

bethskurrie
2021-01-21 23:34
The line of code that needs to change is lib/pact/cli/run_pact_verification.rb:75

bethskurrie
2021-01-21 23:34
You'll need to add an option to lib/pact/cli.rb

bethskurrie
2021-01-21 23:35
(which, despite it's name, is not the pact-provider-verifier CLI, it's the process that runs the RSpec tests)

bethskurrie
2021-01-21 23:36
You'll need to add an option to the DSL lib/pact/provider/configuration/service_provider_dsl.rb

bheemreddy181
2021-01-21 23:36
sure i will give a try

bheemreddy181
2021-01-21 23:36
thanks Beth , have a great day

bheemreddy181
2021-01-21 23:37
Appreciate all the work you and Matt did so far for supporting PACT Open Source - its adding a lot of value

bethskurrie
2021-01-21 23:37
Glad to hear it

bheemreddy181
2021-01-21 23:40
Do you have any examples on how to use can-i-deploy for ruby , if you have those handy can you please share them

bethskurrie
2021-01-21 23:40
There's only a CLI for can-i-deploy

bethskurrie
2021-01-21 23:40
The docs are in the usual place (http://docs.pact.io and put "can-i-deploy" in the search bar).

bheemreddy181
2021-01-21 23:56
if i need to modify an incoming request parameter to make sure the tests pass - is that a good way for writing contract tests - like say i need a parameter to be always the next business day on the incoming request , i can't ideally ask consumer tp publish contract daily rather write a middleware to handle that request and modify that parameter to full-fill the use case

thomas.powell
2021-01-22 10:18
has joined #pact-ruby

stefan.selent
2021-01-23 01:54
has joined #pact-ruby

paulo
2021-01-25 11:37
has joined #pact-ruby

kmckeever
2021-01-25 14:38
has joined #pact-ruby

robert.land
2021-01-25 19:25
has joined #pact-ruby

aparnachaudhari
2021-01-25 21:34
has joined #pact-ruby

gwhill7
2021-01-25 23:23
has joined #pact-ruby

bibinc99
2021-01-26 14:37
has joined #pact-ruby

luisc.barretog
2021-01-27 00:42
has joined #pact-ruby

laxmi.somni508
2021-01-27 10:27
has joined #pact-ruby

ryanding16
2021-01-27 20:25
has joined #pact-ruby

bheemreddy181
2021-01-27 22:44
Has any one seen issues with publishing results with latest pact ruby gems

bheemreddy181
2021-01-27 22:44
```/root/project/vendor/bundle/ruby/2.7.0/gems/json-2.5.1/lib/json/common.rb:216:in `parse': 809: unexpected token at 'URL path cannot contain a new line character.' (JSON::ParserError)```

bethskurrie
2021-01-27 22:45
Strip your consumer version branch or tag.

bethskurrie
2021-01-27 22:45
``git ...`.strip`

bethskurrie
2021-01-27 22:47
@bheemreddy181 ^^

bheemreddy181
2021-01-27 22:55
Makes sense thanks

bheemreddy181
2021-01-27 23:03
This is happening on the provider side though

bheemreddy181
2021-01-27 23:04
You think the consumer version which we are pulling from pact broker has a new line ?

bheemreddy181
2021-01-28 01:00
@bethskurrie@bethskurrie@bethskurrie ^

bethskurrie
2021-01-28 01:01
one of your variables has a new line in it.

bethskurrie
2021-01-28 01:01
Something that is being used to create one of the resources. Maybe it's the tag.

bheemreddy181
2021-01-28 01:01
Got it

athurner
2021-01-28 13:55
has joined #pact-ruby

alex.mcnair
2021-01-28 18:35
has joined #pact-ruby

mailinglistsspammedme
2021-01-28 23:30
has joined #pact-ruby

steven.beaver.retail
2021-01-29 15:34
has joined #pact-ruby

ekberli.elbrus
2021-01-30 16:33
has joined #pact-ruby

george.south
2021-02-01 21:12
has joined #pact-ruby

bethskurrie
2021-02-01 22:06
@guppy0356.nakira

bethskurrie
2021-02-01 22:06
This is the place to ask about the http://config.ru path. Can you tell me what the problem you're having is?

guppy0356.nakira
2021-02-02 01:12
@bethskurrie Okay :ok_hand: I try to build gem like devise which expands Rails. In case of devise, it includes dummy rails app for its test. http://config.ru is located at `test/rails_app/config.ru` . I need to update `Pact.configuration.config_ru_path` .

guppy0356.nakira
2021-02-02 01:13
I want to know which file is prefer to call `Pact.configuration.config_ru_path=` .

guppy0356.nakira
2021-02-02 01:15
I think `spec/service_consumers/pact_helper.rb` is best.

bethskurrie
2021-02-02 04:36
@guppy0356.nakira don't override the http://config.ru path, set the rack app directly.

bethskurrie
2021-02-02 04:37
``` # Optional app configuration. Pact loads the app from http://config.ru by default # (it is recommended to let Pact use the http://config.ru if possible, so testing # conditions are closest to runtime conditions) app { MyApp.new }```


guppy0356.nakira
2021-02-02 04:38
Thank you. I will fix my code.

bethskurrie
2021-02-02 04:39
Please share when you've done!

guppy0356.nakira
2021-02-02 05:12
It doesn't work :sob: ```require File.expand_path('../rails_app/config/environment', __dir__) Pact.service_provider "My Service Provider" do app { RailsApp::Application.new } end``` @bethskurrie

bethskurrie
2021-02-02 05:13
@guppy0356.nakira look at what you've told me and ask yourself if you could give any helpful advice with only that information!

bethskurrie
2021-02-02 05:13
Exactly what doesn't work?

bethskurrie
2021-02-02 05:15
If you can put your code in a repository and provide instructions on how to reproduce the error then I'll have the best chance of helping you.

guppy0356.nakira
2021-02-02 05:16
My gem add some routes. ```Rails.application.routes.draw do resources :books end``` Dummy Rails app mount this module like this. ```Rails.application.routes.draw do mount MyApp::Engine, at: :my_app end```

guppy0356.nakira
2021-02-02 05:18
Sorry, it is little difficult to tell my troubles :sob:

guppy0356.nakira
2021-02-02 05:30
@bethskurrie Why should not call like this? ```Pact.configuration.config_ru_path = File.expand_path('../rails_app/config.ru', __dir__)```

bethskurrie
2021-02-02 05:30
Well, try it and see.

bethskurrie
2021-02-02 05:31
It should give you exactly the same thing

guppy0356.nakira
2021-02-02 05:31
Exactly no. it works fine :thinking_face:

guppy0356.nakira
2021-02-02 06:26
I can't understand why it works fine.

bethskurrie
2021-02-02 08:43
:shrug::skin-tone-3:

twierzchowski
2021-02-03 07:05
has joined #pact-ruby

yassin.hajaj
2021-02-03 10:35
has joined #pact-ruby

dany.marques90
2021-02-03 12:48
has joined #pact-ruby

marcelo
2021-02-03 13:11
has joined #pact-ruby

sandeeparthur
2021-02-03 19:46
has joined #pact-ruby

octoberclub
2021-02-04 16:27
has joined #pact-ruby

slavick
2021-02-04 17:21
has joined #pact-ruby

imran.settuba
2021-02-04 18:57
has joined #pact-ruby

christopher.roberts
2021-02-05 01:02
has joined #pact-ruby

r.darcel
2021-02-05 09:15
has joined #pact-ruby

ashish.joshi
2021-02-06 01:07
has joined #pact-ruby

przemek.sech296
2021-02-08 23:18
has joined #pact-ruby

vplows
2021-02-09 06:00
has joined #pact-ruby

dany.marques90
2021-02-09 07:38
Hello guys, I've a problem downloading PACT binaries from our Nexus. (I previously downloaded the tar.gz file from github releases) It says "Error: Error while installing binary: Checksum rejected for file 'pact-1.88.37-linux-x86_64.tar.gz' with checksum pact-1.88.37-linux-x86_64.tar.gz.checksum" Any ideas ?

dany.marques90
2021-02-09 10:12
Seems that I've a problem with the npm proxy. this has nothing to do with checksum

rodney.stromlund
2021-02-09 16:18
has joined #pact-ruby

nada
2021-02-09 19:00
has joined #pact-ruby

siddhardhan
2021-02-09 20:21
has joined #pact-ruby

lars.hisken916
2021-02-10 08:08
has joined #pact-ruby

pauligoe10
2021-02-10 08:19
has joined #pact-ruby

tusharvarm
2021-02-10 09:38
has joined #pact-ruby

igorsharf
2021-02-10 10:39
has joined #pact-ruby

kieran
2021-02-10 17:13
has joined #pact-ruby

poward
2021-02-10 18:17
has joined #pact-ruby

ckhadilkar
2021-02-10 21:16
has joined #pact-ruby

neild
2021-02-11 18:53
has joined #pact-ruby

painenigowthami
2021-02-11 22:32
has joined #pact-ruby

stephenkilbourn
2021-02-11 23:02
has joined #pact-ruby

tcarlson
2021-02-11 23:05
has joined #pact-ruby

fnguyen
2021-02-12 01:34
@fnguyen has left the channel

r.strauch
2021-02-12 10:15
has joined #pact-ruby

ztlboy05
2021-02-12 14:57
has joined #pact-ruby

smith260194
2021-02-12 15:22
has joined #pact-ruby

dabfleming
2021-02-12 20:34
has joined #pact-ruby

prasanthp
2021-02-13 00:45
has joined #pact-ruby

bhardwajdiwakar
2021-02-14 22:38
has joined #pact-ruby

hiteshpatadia
2021-02-15 06:29
has joined #pact-ruby

vikrant.sarkaniya
2021-02-15 13:31
has joined #pact-ruby

lemitrou
2021-02-15 14:20
has joined #pact-ruby

helloraj
2021-02-16 08:09
has joined #pact-ruby

jamesmlucas
2021-02-16 19:29
has joined #pact-ruby

gabe707
2021-02-16 20:31
has joined #pact-ruby

gabe707
2021-02-16 20:34
```PactBroker::Client::PublicationTask.new(:local) do | task | task.consumer_version = "1.0.0" task.pact_broker_base_url = LOCAL_PACT_BROKER_BASE_URL task.pattern = "/Users/gabrielholmes/Desktop/ascent-rails/spec/pacts/*.json" end``` anyone know what im doing wrong here

gabe707
2021-02-16 20:34
even when I add the token i get the same error message of

gabe707
2021-02-16 20:35
Failed to publish pact due to error: PactBroker::Client::Error - Authentication failed

wangpei9679
2021-02-16 21:29
has joined #pact-ruby

geir
2021-02-16 23:03
has joined #pact-ruby

soruma.net
2021-02-17 05:58
has joined #pact-ruby

guppy0356.nakira
2021-02-17 06:52
How to enable https protocol. I expect `verify true` enables https protocol, but it doesn't enable https protocol. ```Pact.service_consumer "Zoo App" do has_pact_with "Animal Service" do mock_service :animal_service do port 1234 verify true end end end```

therimpact
2021-02-17 12:30
has joined #pact-ruby

mark.doppelfeld
2021-02-17 19:02
has joined #pact-ruby

andrzej.igielski
2021-02-17 21:41
has joined #pact-ruby

mikewagner21
2021-02-18 03:15
has joined #pact-ruby

khandelwalbhushan
2021-02-18 08:10
has joined #pact-ruby

aniket.agarwal
2021-02-18 09:21
has joined #pact-ruby

arpit.modani
2021-02-18 09:43
has joined #pact-ruby

byronth
2021-02-18 11:45
has joined #pact-ruby

isa.levine
2021-02-18 23:37
has joined #pact-ruby

r.strauch
2021-02-19 08:41
@r.strauch has left the channel

brian.pfretzschner
2021-02-19 10:15
has joined #pact-ruby

chitra.adikesavan
2021-02-20 15:50
has joined #pact-ruby

ankita.soni
2021-02-22 07:26
has joined #pact-ruby

jacek.helper
2021-02-22 08:03
has joined #pact-ruby

seanw122
2021-02-22 15:36
has joined #pact-ruby

akennedy
2021-02-22 15:54
has joined #pact-ruby

esimpson
2021-02-22 16:42
has joined #pact-ruby

dagrawal
2021-02-22 17:24
has joined #pact-ruby

venkata.pro
2021-02-22 21:47
has joined #pact-ruby

jordan.levin
2021-02-23 19:14
has joined #pact-ruby

francesco.latorre
2021-02-24 05:59
has joined #pact-ruby

aniket.g2185
2021-02-24 09:13
has joined #pact-ruby

sundaresank360
2021-02-24 12:12
has joined #pact-ruby

jhawthor
2021-02-24 15:18
has joined #pact-ruby

chris.r.thomas
2021-02-24 16:54
has joined #pact-ruby

peter.cook
2021-02-24 17:05
has joined #pact-ruby

jayeshguru81
2021-02-24 18:34
has joined #pact-ruby

ben.kirberger
2021-02-24 19:16
has joined #pact-ruby

m.stephkan
2021-02-25 05:30
has joined #pact-ruby

bethskurrie
2021-02-25 07:38
@guppy0356.nakira that's whether or not to very the interactions, not the ssl.

bethskurrie
2021-02-25 07:38
Http/https is not part of the contract.

bethskurrie
2021-02-25 07:39
Https is generally a deployment concern, not a development one. Are you trying to verify a deployed provider?

bethskurrie
2021-02-25 07:40
@gabe707 as mentioned in the other channel, you need to upgrade your gem.

guppy0356.nakira
2021-02-25 07:41
I'm not trying to verify a deployed provider.

guppy0356.nakira
2021-02-25 07:46
I can't update endpoint url because this is constant variable. I need to skip verify ssl when running pact.

bethskurrie
2021-02-25 07:48
Have a look at the mock provider code. I think there may be a ssl setting.

bethskurrie
2021-02-25 07:48
There definitely is on the cli.

bethskurrie
2021-02-25 07:48
I'll have a look later.

stephen.tjasink
2021-02-25 08:23
has joined #pact-ruby

beatrizwaclawek
2021-02-25 20:27
has joined #pact-ruby

zhoutianli1234
2021-02-25 21:09
has joined #pact-ruby

travis.day
2021-02-26 04:06
has joined #pact-ruby

andrew.cunningham
2021-02-26 11:13
has joined #pact-ruby

andrew.cunningham
2021-02-26 11:54
@andrew.cunningham has left the channel

brianmasschaele
2021-02-27 13:27
has joined #pact-ruby

pedroefajardo_pactio
2021-02-27 17:18
has joined #pact-ruby

dominic_herrmann
2021-03-01 06:54
has joined #pact-ruby

matthew.long
2021-03-02 14:08
has joined #pact-ruby

tmoncm
2021-03-02 17:17
has joined #pact-ruby

phoenixcampos01
2021-03-02 21:25
has joined #pact-ruby

hugh.paul.mcgowan
2021-03-03 17:52
has joined #pact-ruby

bheemreddy181
2021-03-03 20:50
Need some examples around GraphQL with pact ruby

normanrs
2021-03-04 11:18
has joined #pact-ruby

jayson.bailey
2021-03-04 19:18
has joined #pact-ruby

olayemifolakemi
2021-03-05 15:26
Hi there, I'm having this issue when verifying pact on the provider side

olayemifolakemi
2021-03-05 15:27
PS: I didn't include `charset=utf-8` in my header settings

olayemifolakemi
2021-03-05 15:58
The code:

bheemreddy181
2021-03-05 21:58
provider is returning charset by default here , you need to update your tests or add a regex match in your headers

olayemifolakemi
2021-03-05 21:59
Okay, I can try adding regex. Thanks!

mjsmcp
2021-03-08 23:46
has joined #pact-ruby

javier.garcia_cotado
2021-03-09 21:52
has joined #pact-ruby

bheemreddy181
2021-03-10 04:17
@bethskurrie@bethskurrie@bethskurrie do you have any examples handy ?

akos.csurai
2021-03-10 13:39
has joined #pact-ruby

akos.csurai
2021-03-10 14:12
@akos.csurai has left the channel

testme2020testme
2021-03-10 14:12
has joined #pact-ruby

tommy.mirchandani
2021-03-10 17:13
has joined #pact-ruby

varinderjitkaur13
2021-03-11 01:46
has joined #pact-ruby

gabe707
2021-03-11 03:52
*Could not find relation 'pb:latest-provider-pacts' in resource*

gabe707
2021-03-11 03:53
for pact verifier

gabe707
2021-03-11 03:53
what exactly do I put for --provider ?

bethskurrie
2021-03-11 03:53
You'll need to provide more information than that for us to give you good help.

gabe707
2021-03-11 03:53
k one sec

bethskurrie
2021-03-11 03:53
Versions of the PB and the PB client

bethskurrie
2021-03-11 03:54
what the line is that you're using to run the command.

bethskurrie
2021-03-11 03:54
Whether or not you've upgraded to the latest version of each.

gabe707
2021-03-11 03:54
pact-provider-verifier --provider-base-url='https://xxx-data-service-staging.herokuapp.com' --broker-token='xxxxxx' --custom-provider-header="Authentication: Bearer xxxxxx" --pact-broker-base-url='https://xxxx.pactflow.io/pacts/provider/Cds%20Graphql/consumer/Ascent%20Rails/version/4.0.0' --provider='Cds Graphql'

bethskurrie
2021-03-11 03:55
that's a pact URL, not the base URL

bethskurrie
2021-03-11 03:55
`--pact-broker-base-url='https://xxxx.pactflow.io`

gabe707
2021-03-11 03:56
i have that though in there don't I beth?


bethskurrie
2021-03-11 03:56
No, you've got the full URL

bethskurrie
2021-03-11 03:56
get rid of the path




gabe707
2021-03-11 03:56
one sec

bethskurrie
2021-03-11 03:56
But I think that won't help you do what you're trying to do


gabe707
2021-03-11 03:57
doing that

gabe707
2021-03-11 03:57
doing now

bethskurrie
2021-03-11 03:57
``` The parameters used when fetching pacts dynamically from a Pact Broker are: --pact-broker-base-url (REQUIRED) --provider (REQUIRED) --broker-username/--broker-password or --broker-token --consumer-version-tag or --consumer-version-selector --enable-pending --include-wip-pacts-since To fetch a pact from a known URL (eg. when a verification is triggered by a 'contract content changed' webhook), pass in the pact URL(s) as the first argument(s) to the command.```

gabe707
2021-03-11 03:57
that did get me pass the error

gabe707
2021-03-11 03:57
ok looking at this now

bethskurrie
2021-03-11 03:57
do not put in the base URL if you are just verifying a single pact

gabe707
2021-03-11 03:59
ok got you

gabe707
2021-03-11 03:59
thank you Beth

bethskurrie
2021-03-11 03:59
np

krcl.dev
2021-03-11 05:11
has joined #pact-ruby

krishnaraoveera1294
2021-03-11 17:53
has joined #pact-ruby

raghavendra.kalakonda
2021-03-11 23:08
has joined #pact-ruby

andries.spies
2021-03-12 07:25
has joined #pact-ruby

kamil.klima
2021-03-12 11:38
has joined #pact-ruby

jon.pascoe
2021-03-14 23:33
I?ve just replaced all of the inter-microservice HTTP REST comms in my app with RabbitMQ. Previously everything was 100% covered with Pact tests. Seemingly testing asynchronous messaging with pact-ruby isn?t possible yet. Is this on the roadmap?

jon.pascoe
2021-03-14 23:34
I looked in #pact-message-ruby but it?s a bit quiet there ?

lswanborough
2021-03-15 00:50
has joined #pact-ruby

don.tobias
2021-03-15 19:35
has joined #pact-ruby

marcelo
2021-03-16 12:17
@marcelo has left the channel

sagar.kathuria
2021-03-17 04:25
has joined #pact-ruby

shao.sum
2021-03-17 08:35
has joined #pact-ruby

olayemifolakemi
2021-03-17 16:05
Hi Everyone, I am trying to verify pact but I keeping getting this error: ```Failure/Error: expect(response_body).to match_term expected_response_body "content": "Pact::Term matcher: /\\w+...*/ generate: \"1. Hey, this is not an actual text\""```

olayemifolakemi
2021-03-17 16:08
The matcher code is like this: ```content: Pact::Term.new( generate: '1. Hey, this is not an actual text', matcher: /\w+...*/)```

bheemreddy181
2021-03-17 23:45
What are you trying to do ? Can you share your test ?

riddhichopra
2021-03-18 01:28
has joined #pact-ruby

anu.de
2021-03-18 02:28
has joined #pact-ruby

sreyaslj
2021-03-18 04:25
has joined #pact-ruby


arvind1017
2021-03-18 22:48
has joined #pact-ruby

sushilvc84
2021-03-19 00:30
has joined #pact-ruby

tejakoshti7
2021-03-19 06:26
has joined #pact-ruby

yannick.adler
2021-03-19 12:44
has joined #pact-ruby

smith260194
2021-03-19 17:40
@smith260194 has left the channel

olayemifolakemi
2021-03-19 23:20
This has been resolved. Thanks

olayemifolakemi
2021-03-19 23:24
Hello there! How do we match simple key:value pair, where the value is a basic array, for example: `key: ["element", "elements"]` ?

aelse
2021-03-19 23:54
has joined #pact-ruby

eric2323223
2021-03-20 01:35
has joined #pact-ruby

jordan.r.stewart
2021-03-20 16:07
has joined #pact-ruby

tmorrison
2021-03-21 21:45
has joined #pact-ruby

a.chandrasekaran
2021-03-22 00:50
has joined #pact-ruby

guppy0356.nakira
2021-03-22 01:26
@bethskurrie Thank you for your review at https://github.com/pact-foundation/pact-message-ruby/pull/18 . How to publish new release? I want include new released pact-message at pact-provider-verifier.


maksym.motornyi
2021-03-22 11:50
has joined #pact-ruby

olayemifolakemi
2021-03-22 12:00
Hello again:slightly_smiling_face:. Please how do I match array of strings in ruby? I have this example: `array: ["apples", "mangoes", "oranges"]` Then I am trying to match using `each_like` `"array: Pact.each_like("apples", {min: 3})` The result I got: `["apples", "apples", "apples"]` The result above was not what I expected

olayemifolakemi
2021-03-22 12:01
I expected it to match the type and not the values...please how do I fix this?

gareth.somerville
2021-03-22 12:10
has joined #pact-ruby

joseph.method
2021-03-22 19:55
has joined #pact-ruby

dennyg666
2021-03-22 20:54
has joined #pact-ruby

me1295
2021-03-23 00:15
has joined #pact-ruby

anchit.99
2021-03-23 09:04
has joined #pact-ruby

wola.adedeji
2021-03-23 16:25
has joined #pact-ruby

kenny.shobowale
2021-03-23 16:38
has joined #pact-ruby

anbu.pandian
2021-03-24 11:54
has joined #pact-ruby

rachel.barton
2021-03-24 19:12
has joined #pact-ruby

james522
2021-03-24 22:06
has joined #pact-ruby

anne.schuth320
2021-03-25 07:49
has joined #pact-ruby

james.shirtcliffe
2021-03-25 12:04
has joined #pact-ruby

serhii.makarenko
2021-03-25 12:55
has joined #pact-ruby

jacek.helper
2021-03-25 13:42
Hi, I am using quite old version of pact_broker-client 1.28.3 and I would like to know if in the latest version command `pact-broker describe-version --pacticipant <PACTICIPANT> --latest prod --output json` also return free flow text when there is no pacticipant for a given tag? From my point it will be more consistent to return an empty json object or json object with some text field. Sorry if has been already discussed, but I had no luck to find such discussion on slack. cheers, Jacek.

mashabudryte
2021-03-25 14:35
has joined #pact-ruby

matthew.simon.barnes_
2021-03-25 16:08
has joined #pact-ruby

jose.manzano
2021-03-26 14:27
has joined #pact-ruby

chris.faulkner
2021-03-26 16:13
has joined #pact-ruby

bryanw
2021-03-26 18:46
has joined #pact-ruby

bethskurrie
2021-03-29 08:16
I don't think this has changed. Please raise an issue in the pact broker client project @jacek.helper

kerem.durak
2021-03-29 08:34
has joined #pact-ruby

dave.clissold
2021-03-29 12:40
has joined #pact-ruby

sidhant.bhayana.15
2021-03-29 18:34
has joined #pact-ruby

crhawkins85
2021-03-30 21:02
has joined #pact-ruby

pranav.gore
2021-03-31 01:58
has joined #pact-ruby

harsha6988
2021-03-31 12:19
has joined #pact-ruby

leixu
2021-03-31 14:42
has joined #pact-ruby

matthew.brown
2021-03-31 15:15
has joined #pact-ruby

oleksandr.tryshchenko
2021-03-31 19:54
has joined #pact-ruby

phelantomas
2021-04-01 13:13
has joined #pact-ruby

ktogias
2021-04-01 20:04
has joined #pact-ruby

bheemreddy181
2021-04-01 20:37
How can i retrieve pact url for a given pact to manually pass the pact_url as an input to verify the pact ?

joseph.method
2021-04-01 21:00
How do you clear the interactions from the mock service in Ruby? It seems like there?s a way to do it via the command line

bheemreddy181
2021-04-01 21:15
this can be ignored

bheemreddy181
2021-04-01 21:16
if stop and start doesn't it start fresh ?

joseph.method
2021-04-02 01:21
Between tests yeah. I?m trying to do something that I probably shouldn?t be doing, which is to finalize and clear out the interactions in the middle of the test.

balaji.sivakumar
2021-04-02 05:41
has joined #pact-ruby

bheemreddy181
2021-04-02 15:53
But why ?

jayson.bailey
2021-04-02 20:11
Are any you guys mocking external services in `Pact.set_up` somehow?

bheemreddy181
2021-04-03 21:04
Well I have the same question but for another internal service

jayson.bailey
2021-04-05 14:42
I ended up using rspec mocks and it worked pretty well.

uryadov212
2021-04-05 20:52
has joined #pact-ruby

soumya.aithal966
2021-04-05 22:45
has joined #pact-ruby

sheyan.rizfee
2021-04-06 00:55
has joined #pact-ruby

piotr
2021-04-06 09:24
has joined #pact-ruby

dmitry.korolev
2021-04-06 11:47
has joined #pact-ruby

dmitry.korolev
2021-04-06 11:48
@dmitry.korolev has left the channel

gabe707
2021-04-06 16:20
Question

gabe707
2021-04-06 16:21
```Pact::VerificationTask.new(:foobar) do | pact | pact.uri './consumer/spec/pacts/foo-bar.json', pact_helper: './provider/spec/pact_helper.rb' end```

gabe707
2021-04-06 16:21
just looking at this example

gabe707
2021-04-06 16:22
how to I add additional variables like authorization token, bearer token, etc in here?

gabe707
2021-04-06 16:22
I see pact helper examples like this

gabe707
2021-04-06 16:23
Pact.service_provider "My Service Provider" _do_ honours_pacts_from_pact_broker _do_ _# Base URL of pact broker is mandatory_ _# basic auth username/password and token are optional parameters_ pact_broker_base_url 'http://...', {username: '...', password: '...', token: '...'}

gabe707
2021-04-06 16:23
but how can I add additional custom token variables here etc

sravyavadrevu988
2021-04-06 20:40
has joined #pact-ruby

johnnycareer
2021-04-06 21:34
has joined #pact-ruby

johnnycareer
2021-04-06 21:41
@johnnycareer has left the channel

danil.nurgaliev
2021-04-07 12:26
has joined #pact-ruby

gtsifrikas
2021-04-08 08:53
has joined #pact-ruby

kanapuramamarnath
2021-04-08 09:18
has joined #pact-ruby

bheemreddy181
2021-04-08 17:16
How can i modify a request based on the provider states in the middleware ?


bheemreddy181
2021-04-09 00:47
Here is use case i am facing issue with ? My consumer rely's on the validation error from provider where if the date fields surpasses the cutoff , they will change the date and re-send the request. ? Pact Provider doesn't have that ability to change the incoming request for a particular use-case. ? Consumer can write a test but provider can't change the request fields to have the latest date to fail that validation. Do i need to just mock the validation to return that error ?

arnaud.dutrillaux
2021-04-09 10:59
has joined #pact-ruby

gsinghania
2021-04-09 15:40
has joined #pact-ruby

souravmohanty35
2021-04-09 16:34
has joined #pact-ruby

itzdavey
2021-04-09 17:23
has joined #pact-ruby

normanrs
2021-04-09 22:21
Hello group! Has anyone used Pact with minitest? I'm going to have to setup an endpoint at some point and am right now dreading it because the docs I've seen for doing this aren't detailed at all. Setting up Pact with Rspec uses Rails magic and I'm kindof concerned the setup with minitest is going to be tough. ?

tjones
2021-04-10 06:46
I don't know the answer to this, but I don't think Pact has any rails magic. We use rspec for testing the pact broker itself, which is not a rails app.

tjones
2021-04-10 06:47
(I don't have much ruby knowledge, but I do know that we don't use rails and we do test the broker with pact)

normanrs
2021-04-10 20:42
The magic is in the provider pact_helper.rb. The docs tell you to require "pact/provider/rspec" and then do a Pact.service do block where you tell it what pact contract to honor. That part makes sense - what's difficult is telling it *what response* to validate against the pact. Since it's using an rspec framework, Pact.service knows how to connect to the app. But we've got some Sinatra apps which don't have testing setup with Rspec. So I'm trying to figure out how to connect Pact.service to the app.

normanrs
2021-04-10 20:43
See this example project, from this line down to see what I mean about Rails (Rspec) "magic". https://github.com/DiUS/pact-workshop-ruby/blob/8d5777e4da46a88318c47eb8b51f3e4a336517a5/spec/pact_helper.rb#L16

tmorrison
2021-04-12 00:17
@tmorrison has left the channel

tjones
2021-04-12 01:14
forgive me if this is incorrect, but I don't think that's a rails app.

tjones
2021-04-12 01:15
> what's difficult is telling it what response to validate against the pact. You don't need to do this. Pact validates all the requests for you. What you do in the provider spec is to tell the provider how to set up the states.

tjones
2021-04-12 01:17
Pact will validate all request/response pairs in the contract. So, for a request that has multiple responses, provider states are used to disambiguate the setup


tjones
2021-04-12 01:21
(although I don't know if there are helpers for minitest in the provider)

bheemreddy181
2021-04-12 03:02
I feel this is an issue with pact-ruby while validating the headers on provider side ``` Expected header "Content-Type" to equal "application/json; charset=UTF-8", but was "application/json; charset=utf-8"``` is UTF-8 vs utf-8 is different ? Correct me if i am wrong

bheemreddy181
2021-04-12 03:02
Matt / Beth - Can one of you provider some inputs on this ^

matt.fellows
2021-04-12 06:51
By default, unless you have a regex matcher on it it?s matching exact value

matt.fellows
2021-04-12 06:52
Header names are case-insensitive, values are not. But, I do believe these parameters in the header are equivalent


matt.fellows
2021-04-12 06:53
anyway, the simple fix is to apply a regex matcher that doesn?t care about the charset, or doesn?t care about the case of the charset

bethskurrie
2021-04-12 07:25
What Matt said.

bheemreddy181
2021-04-12 12:42
Shouldn?t we make the values also case-insensitive?

bheemreddy181
2021-04-12 18:13
Even with a matcher pact-ruby fails ``` Expected header "Content-Type" to equal "application\\/json(;\\s?charset=[\\w\\-]+)?", but was "application/json; charset=utf-8"```


gabe707
2021-04-12 19:42
question when pact runs against my local it's returning html format instead of json format

gabe707
2021-04-12 19:42
is there an example of how to make the response json

bheemreddy181
2021-04-12 21:14
which file are you looking at

bheemreddy181
2021-04-12 21:14
it should generate contracts under a pacts folder


gabe707
2021-04-12 22:59
so the pact uri is within pactflow

gabe707
2021-04-12 23:01
bundle exec rake pact:verify:at [https://testexample.pactflow.io/pacts/provider etc

gabe707
2021-04-12 23:01
when I run this locally i get a HTML response

gabe707
2021-04-12 23:01
and it fails

gabe707
2021-04-12 23:03
when I run help i see

gabe707
2021-04-12 23:03
If the diff output is confusing, try using another diff formatter.  The options are :unix, :embedded and :list   Pact.configure do | config |    config.diff_formatter = :embedded   end  See https://github.com/pact-foundation/pact-ruby/blob/master/documentation/configuration.md#diff_formatter for examples and more information.

gabe707
2021-04-12 23:03
where do I place this pact.configure at though?

gabe707
2021-04-12 23:06
Expected header "Content-Type" to equal "application/json; charset=utf-8", but was "text/html; charset=UTF-8"

laura.edington
2021-04-13 17:45
has joined #pact-ruby

liam.mcdermott
2021-04-13 22:38
has joined #pact-ruby

wedlaaa
2021-04-14 13:33
has joined #pact-ruby

wderksen
2021-04-14 22:26
has joined #pact-ruby

mail_4brad
2021-04-15 02:34
has joined #pact-ruby

mail_4brad
2021-04-15 05:15
@mail_4brad has left the channel

goncalosamuel
2021-04-15 15:08
has joined #pact-ruby

matthew.hall
2021-04-15 17:36
has joined #pact-ruby

matthew.hall
2021-04-15 17:37
any tricks to starting a mock service on one docker container on a particular port, and then accessing it on another docker container, I can't seem to connect.

matthew.hall
2021-04-15 17:39
a previous implementation without pact using the same port worked without issue

matthew.hall
2021-04-15 17:42
it's like pact won't allow remote connections

raony
2021-04-15 19:21
has joined #pact-ruby

raony
2021-04-15 19:29
Hi folks :wave: We are using `pact-ruby` for synchronous requests and now we are going to start using `pact-messages` for contract testing asynchronous events. The message consumer is working fine, but I couldn't manage to make the consumer contract builders share the same contract file. They seem to overwrite each other. Has anyone got into that scenario or has any idea on how to write both pact and pact-messages interactions to the same contract file? Thanks in advance.

uglyog
2021-04-15 22:43
If you use docker compose, it will setup the networking between the containers. Otherwise you need to make the mock server container available to the host or the other container. Remember, with docker, accessing localhost is the loopback inside the container.

matthew.hall
2021-04-15 23:04
thanks, yea we are using compose. I tried various setting: localhost, 0.0.0.0, the container name

matthew.hall
2021-04-15 23:04
nothing works, and our previous implementation which did something similar, (forked the process and listened on the same port) worked fine

uglyog
2021-04-15 23:04
Make sure the ports are correctly exported

matthew.hall
2021-04-15 23:05
do they need to be from container to container?

uglyog
2021-04-15 23:05
Yes, they still need to be exported. Compose will then allow the traffic on the exposed ports

matthew.hall
2021-04-15 23:06
i'll try more of that, thanks

gupta.ratnesh9
2021-04-16 04:48
has joined #pact-ruby

tjones
2021-04-16 06:51
This is a current limitation - you can't have both message and http pacts in the same contract. Usually the solution is to have two consumer names -something like "YourConsumer (HTTP)" and "YourConsumer (Message)"

greg595au
2021-04-16 10:00
has joined #pact-ruby

manel_ben_yahia
2021-04-16 13:59
has joined #pact-ruby

maxence
2021-04-17 11:07
has joined #pact-ruby

kranti.deep
2021-04-17 14:17
has joined #pact-ruby

aaronw153
2021-04-17 21:42
has joined #pact-ruby

bheemreddy181
2021-04-19 00:33
Interesting

github
2021-04-19 00:57
GitHub app is successfully upgraded in your workspace :tada: To receive notifications in your private channels, you need to invite the GitHub app `/invite @GitHub`

kranti.deep
2021-04-19 06:59
@kranti.deep has left the channel

dwmahieddine
2021-04-19 12:44
has joined #pact-ruby

garrettmichael
2021-04-19 18:34
has joined #pact-ruby

matthew.hall
2021-04-19 19:44
no luck

matthew.hall
2021-04-19 19:44
```require 'pact/consumer/rspec' require 'socket' Pact.service_consumer "partner websites cron" do has_pact_with "SimilarWeb" do mock_service :similar_web do port 5678 host "0.0.0.0" # Optional, defaults to "localhost". Useful when using a standalone mock service. standalone false # Optional. If true, does not automatically start a mock service # You must start/stop the mock service manually. end end end```

matthew.hall
2021-04-19 19:45
```# lsof -i -P -n | grep LISTEN ruby 1285 root 7u IPv4 635140 0t0 TCP 127.0.0.1:5678 (LISTEN)```

matthew.hall
2021-04-19 19:46
no matter what i put as the host, I can only get it to listen on 127.0.0.1

matthew.hall
2021-04-19 19:46
not sure why

matthew.hall
2021-04-19 19:47
thanks for your time, i'll probably move on

daniel.kalleward
2021-04-20 08:16
has joined #pact-ruby

mattias.persson
2021-04-20 12:45
has joined #pact-ruby

martin.eklund
2021-04-20 12:47
has joined #pact-ruby

enda.brody
2021-04-20 17:37
has joined #pact-ruby

cristian.moisa
2021-04-20 18:25
has joined #pact-ruby

darccide
2021-04-21 01:35
has joined #pact-ruby

stain.witness
2021-04-22 02:43
has joined #pact-ruby

oleksandra.pishcheiko
2021-04-22 08:31
has joined #pact-ruby

akos.csurai.4github
2021-04-22 10:01
has joined #pact-ruby

christosbouloumpasis
2021-04-22 10:38
has joined #pact-ruby

temanibeck
2021-04-22 16:04
has joined #pact-ruby

michael_swiss
2021-04-22 21:04
has joined #pact-ruby

bas
2021-04-23 07:45
@bas has left the channel

dawoud.sheraz
2021-04-23 09:34
has joined #pact-ruby

adriano.tanoue
2021-04-23 12:01
has joined #pact-ruby

saurabh.goel
2021-04-24 20:10
has joined #pact-ruby

cemal.onder
2021-04-25 12:22
has joined #pact-ruby

richard.forjoe
2021-04-26 00:52
has joined #pact-ruby

ron.aharoni
2021-04-26 11:03
has joined #pact-ruby

andrewmorton
2021-04-26 13:33
has joined #pact-ruby

andrewmorton
2021-04-26 13:37
:wave: We're looking to use `pact-messages` to verify some asynchronous events. I'm having some difficulty getting the pact test to run using `bundle exec pact:verify` based on the documentation on https://docs.pact.io/implementation_guides/ruby/verifying_pacts as it keeps failing with `This document does not use a recognised Pact format:` (I'll put the full message in the thread). Likely it's something simple I've messed up but any tips / tricks would be appreciated

andrewmorton
2021-04-26 13:38
```This document does not use a recognised Pact format: {"consumer"=>{"name"=>"Service B"}, "provider"=>{"name"=>"Service A"}, "messages"=>[{"description"=>"feature X", "contents"=>{"text"=>"Hello world"}, "providerStates"=>[], "matchingRules"=>{}}], "metadata"=>{"pactSpecification"=>{"version"=>"2.0.0"}}} (Pact::UnrecognizePactFormatError)```

andrewmorton
2021-04-26 13:38
what is weird is that I copied the structure from the `pact-messages` repo and updated it (another team is in the process of integrating it with the consumer)

aram
2021-04-26 15:24
has joined #pact-ruby

marcelo.souzameinberg
2021-04-26 21:32
has joined #pact-ruby

songqing.gu
2021-04-27 01:25
has joined #pact-ruby

fortiss.anita
2021-04-27 09:34
has joined #pact-ruby

github2
2021-04-27 11:13
[pact-foundation/pact-support] Pull request opened by ahjmorton

andrewmorton
2021-04-27 11:19
Resolved this, turns out I was missing a require in the `pact_helper.rb`

keshav.reddy503
2021-04-27 12:06
has joined #pact-ruby

jeremykeczan
2021-04-27 14:57
has joined #pact-ruby

github2
2021-04-27 15:30
[pact-foundation/pact-ruby] Issue opened by iamvery

yeseniavega411
2021-04-27 15:31
has joined #pact-ruby

almantusk
2021-04-27 16:56
has joined #pact-ruby

alexandra.huamani
2021-04-28 00:12
has joined #pact-ruby

tonynguyenit18
2021-04-28 02:12
has joined #pact-ruby

agrawalneeraj43
2021-04-28 04:37
has joined #pact-ruby

shixun.liu1023
2021-04-28 04:39
has joined #pact-ruby

narendra.pathai
2021-04-28 06:21
has joined #pact-ruby

marcin.grzejszczak
2021-04-28 13:53
has joined #pact-ruby

scott.riley111
2021-04-28 15:45
has joined #pact-ruby

flubniewski
2021-04-28 17:01
has joined #pact-ruby

bangn
2021-04-29 02:18
has joined #pact-ruby

bangn
2021-04-29 02:19
:wave:

matt.fellows
2021-04-29 02:42
Hey Bang, welcome back!

bangn
2021-04-29 02:44
Glad to be back :smile:

matt.fellows
2021-04-29 02:44
As discussed, a great starting point would be to attempt to use Pact on a real project. This will help get you in a helpful frame of mind

matt.fellows
2021-04-29 02:45
You might discover small bugs/docs that could be updated as a result


bangn
2021-04-29 03:59
coolio. Thanks Matt

roy_collings
2021-04-30 15:15
has joined #pact-ruby

prachi_mangesh_edake
2021-05-03 04:43
has joined #pact-ruby

sams.prashanth
2021-05-03 08:04
has joined #pact-ruby

philip.m.wood
2021-05-03 12:46
has joined #pact-ruby

amiller
2021-05-03 15:27
has joined #pact-ruby

agarwal.akash333
2021-05-03 23:14
has joined #pact-ruby

marcin.grzejszczak
2021-05-04 07:26
@marcin.grzejszczak has left the channel

anand.ilkal
2021-05-04 08:01
has joined #pact-ruby

dennis.minard
2021-05-04 16:23
has joined #pact-ruby

chris.williams
2021-05-04 16:41
has joined #pact-ruby

ssorcnafets
2021-05-04 19:20
has joined #pact-ruby

kowalczuk.jnr
2021-05-04 22:24
has joined #pact-ruby

hugo
2021-05-05 00:48
has joined #pact-ruby

jadelong
2021-05-05 15:51
has joined #pact-ruby


bheemreddy181
2021-05-05 22:35
I don't think i need that , i confused around how can i pass a `enable_pending` with a custom verification task

bheemreddy181
2021-05-05 22:41
is this correct ```Pact::VerificationTask.new(:pact_consumer_verification) do |pact| pact.uri ENV['PACT_URL'], pact_helper: 'spec/service_consumers/pact_helper.rb', ignore_failures: true end```


bheemreddy181
2021-05-05 22:41
confused with `Process will always exit with exit code 0` this description though

bheemreddy181
2021-05-06 00:51
@bethskurrie@bethskurrie@bethskurrie ^ thoughts ?

bethskurrie
2021-05-06 00:52
You can't enable pending with a custom verification.

bethskurrie
2021-05-06 00:53
> Note that the pending feature is only applicable to the https://docs.pact.io/pact_nirvana/step_4#d-configure-pact-to-be-verified-when-provider-changes, where the list of pacts to be verified are fetched from the Pact Broker. It does not apply to the https://docs.pact.io/pact_nirvana/step_4#e-configure-pact-to-be-verified-when-contract-changes workflow where the pact URL is passed to the job via the webhook. This is because the pending status of the pact content is calculated based on the tags that the provider will use to publish the verification results, and the 'contract content changed' webhook cannot know this information.


bethskurrie
2021-05-06 00:53
The ignore_failures was a precursor to pending, and I never officially released it.

bethskurrie
2021-05-06 00:53
I'm not sure if it works.

bethskurrie
2021-05-06 00:54
If this is for the webhook flow, it doesn't matter if that fails or not. It's expected to fail.

bethskurrie
2021-05-06 00:54
Nothing should be depending on it.

bheemreddy181
2021-05-06 00:55
So with ignore-failures is always pass even if the verification fails ?

bethskurrie
2021-05-06 00:55
I'd expect so. But why?

bheemreddy181
2021-05-06 00:55
I was trying to understand the reason for that design

bheemreddy181
2021-05-06 00:57
So ideally webhook workflow should always fail for the pacts which doesn?t have a provider state ?

bethskurrie
2021-05-06 00:58
Yes.

bethskurrie
2021-05-06 00:58
Why would it not fail?

bethskurrie
2021-05-06 00:58
Nothing depends on this build.

bethskurrie
2021-05-06 00:58
If the provider state isn't there, it needs to be added.

bethskurrie
2021-05-06 00:58
The pact can't pass until the provider state is added.

bethskurrie
2021-05-06 00:59
The status reported back to the broker is failure.

bheemreddy181
2021-05-06 01:05
I am following the use case http://blog.pact.io/2020/02/24/how-we-have-fixed-the-biggest-problem-with-the-pact-workflow/ which says `The contract (consumer expectations) has changed.` Which is the use case I am looking at where consumer added new expectations ( TDD ) those are not implemented yet so in that feature branch pacts shouldn?t pass ?

alexei.solcanu
2021-05-06 02:01
has joined #pact-ruby

zonkor
2021-05-06 08:08
has joined #pact-ruby

florian.mautendorfer
2021-05-06 14:04
has joined #pact-ruby

john.mcnulty
2021-05-06 16:49
has joined #pact-ruby

bheemreddy181
2021-05-06 22:26
I am still confused with pending pacts feature here ```The fact that the provider build can be broken by new or incorrect expectations in the contract (which is effectively written by the consumer team) is one of the biggest problems people have with Pact. It leads to contention between teams, and in some cases, stops teams using Pact at all.``` isn't this means consumer can push new expectations and there are chances provider is not ready yet thats where this pending flag is needed Above information is contradicted a bit with https://pact-foundation.slack.com/archives/C9VHVEDE1/p1620262404096100

bheemreddy181
2021-05-06 22:53
```The fact that the provider build can be broken by new or incorrect expectations in the contract (which is effectively written by the consumer team)``` this only happens when the contract content changed webhook is triggering a job on provider

bethskurrie
2021-05-06 22:55
So, there should be two separate builds for the provider.

bethskurrie
2021-05-06 22:55
One which is triggered by the webhook that only does the verification for the changed pact.

bethskurrie
2021-05-06 22:56
And one which is just the normal CI/CD pipeline for the provider.

bethskurrie
2021-05-06 22:56
We don't care about breaking the "webhook triggered build" because nothing should be depending on it. It's just a little thing that runs on the side.

bethskurrie
2021-05-06 22:56
We do care about blocking the provider's main CI/CD pipeline, because that stops them deploying.

bethskurrie
2021-05-06 22:57
Does that make it clearer @bheemreddy181?

bethskurrie
2021-05-06 22:57
This page describes how the builds should be set up https://docs.pact.io/pact_nirvana/step_4

bheemreddy181
2021-05-06 23:00
@bethskurrie here is the thing on the consumer branch which has new expectations and failed on build which will never get merged to master no ? if that is the case the second build you are talking about will never happen no ?

bheemreddy181
2021-05-06 23:01
As providers main CI/CD build is only looking at `master` / `prod` tagged contracts the above contract will never make it to master as the consumer CI failed on the branch


bethskurrie
2021-05-06 23:02
I think it will clear things up

bethskurrie
2021-05-06 23:02
Or at least read through this section https://docs.pactflow.io/docs/workshops/ci-cd/workshop

bheemreddy181
2021-05-06 23:07
sure will do

bheemreddy181
2021-05-06 23:42
Beth here is the difference what we are doing from the above documented approach Steps : 1. Consumer create a contract in the feature brach ( `feature-x` and pushes a commit 2. Build runs on the CI for consumer and publishes a contract tagged `feature-x` 3. Pact broker receives the contract with that and sends a webhook to provider to trigger a CI build on `master` branch with a reference to the pact on the `feature-x` 4. Provider CI build triggers and pull the contract with reference sent from consumer and the build fails and publishes results which only applies for the feature branch. 5. Consumer is blocked until provider either makes the changes and adds a provider states here 6. Regular CI builds don't fail here because on regular CI builds we are only looking at `master` contracts which gets tagged only once the feature branch goes green.

bheemreddy181
2021-05-06 23:44
Typically we tag the contracts twice once on the feature branch with branch name and next once merged on the master with branch name

bethskurrie
2021-05-06 23:58
That sounds fine - what is the issue?

bheemreddy181
2021-05-07 00:20
Now to unblock the consumer, provider has to make changes to support the new contracts else consumer has to wait ?

bethskurrie
2021-05-07 00:20
yes.

bethskurrie
2021-05-07 00:21
that's how CDC works.

bheemreddy181
2021-05-07 00:21
got it

bethskurrie
2021-05-07 00:21
That's how integrations work - if the consumer wants to deploy a feature that requires the provider to do something, the consumer can't deploy until the provider supports it.

bethskurrie
2021-05-07 00:21
it's just surfacing that reality in a way that doesn't let you deploy or merge anything broken.

bheemreddy181
2021-05-07 00:21
I get that makes sense

bethskurrie
2021-05-07 00:22
Before pact, you would only find out that the consumer/provider didn't work together when they both got deployed to the test environment and everything broke.

bheemreddy181
2021-05-07 00:23
got it

bethskurrie
2021-05-07 00:23
What I would suggest about your workflow is that turning on pending pacts means that the consumer would continue to get feedback on whether or not their feature pact was implemented yet or not.

bethskurrie
2021-05-07 00:23
The output that would be shown when the provider does a local verification would prompt them to add the provider state to their master build, without breaking it.

bethskurrie
2021-05-07 00:24
If you don't turn on pending pacts, the provider will need to make a deliberate change to the verification configuration to pull in that pact.

bheemreddy181
2021-05-07 00:25
how will that happen that won't happen no ? as provider is always looking at `master` tagged pact he will never know about `feature-x` tagged pact

bethskurrie
2021-05-07 00:25
that's how pending pacts works.



bheemreddy181
2021-05-07 00:26
i think i shouldn't use a custom verification rake task in that case ?

bheemreddy181
2021-05-07 00:28
my custom verification task is always pulling the incoming pact_url based pact

bethskurrie
2021-05-07 00:29
The custom verification task is only for the "content changed" webhook flow.

bethskurrie
2021-05-07 00:29
The normal provider build should use the built in task.

bheemreddy181
2021-05-07 00:29
normal provider yes like below ```Pact.service_provider 'pgs' do app { ProxyApp.new(Pgs::Application) } app_version provider_version app_version_tags [provider_branch] publish_verification_results publish_flag honours_pacts_from_pact_broker do pact_broker_base_url 'https://pact-broker.enova.com' enable_pending true consumer_version_selectors [ { tag: 'develop', latest: true }, { tag: 'master', latest: true } ] end end```

bethskurrie
2021-05-07 00:30
Yes.

bethskurrie
2021-05-07 00:30
Looks fine.

bheemreddy181
2021-05-07 00:30
ignore `enable_pending : true` there that is for testing i added

bethskurrie
2021-05-07 00:31
no, that's right.

bethskurrie
2021-05-07 00:31
keep it in!

bheemreddy181
2021-05-07 00:32
does that mean provider has to manually point to the consumer feature branch to know which all provider states needs to be added for the new contracts ?

bethskurrie
2021-05-07 00:32
it means the new pact will be pulled in automatically

bheemreddy181
2021-05-07 00:32
like ```consumer_version_selectors [ { tag: 'feature-x', latest: true }, { tag: 'master', latest: true } ]``` ^

bethskurrie
2021-05-07 00:32
Really, go and do the CI/CD workshop. It will answer all these questions.

bheemreddy181
2021-05-07 00:34
looks like i am going in all circles here

bheemreddy181
2021-05-07 00:34
circles

bethskurrie
2021-05-07 00:35
You know how the pact URL is passed in to the build for the pact changed webhook? This is how I run that.

bethskurrie
2021-05-07 00:35
```bundle exec rake pact:verify:at[${PACT_URL}]```

bethskurrie
2021-05-07 00:35
That's all I do.

bethskurrie
2021-05-07 00:35
Because the PACT_BROKER_TOKEN and PACT_BROKER_BASE_URL env vars are set, it just works.

bheemreddy181
2021-05-07 01:04
Oh this is how my custom task is written ```# consumer triggers this rake task from pact broker like : bundle exec pact:verify:pact_consumer_verification # incoming request will have a reference to the pact file for consumer pull request Pact::VerificationTask.new(:pact_consumer_verification) do |pact| pact.uri ENV['PACT_URL'], pact_helper: 'spec/service_consumers/pact_helper.rb', ignore_failures: true end``` And a sample PACT URL : PACT_URL="https://pact-broker.enova.com/pacts/provider/pgs/consumer/paymentinstructionservice/pact-version/7a4b428d139d37b0231e9b61c672f87ad46f0c33/metadata/Y29uc3VtZXJfdmVyc2lvbl9udW1iZXI9MDAxNmI2NjkxYWM2ZDY5M2EyNGQ5NGMzMzE2ZDBhNzliM2YxZWQ0MiZjb25zdW1lcl92ZXJzaW9uX3RhZ3NbXT1kZXZlbG9w"

bheemreddy181
2021-05-07 01:04
all i do is `bundle exec rake pact:verify:pact_consumer_verification`

bethskurrie
2021-05-07 01:04
Sure, that will work fine too

bheemreddy181
2021-05-07 01:05
but if do so `enable_pending` is not accounted no ?

bethskurrie
2021-05-07 01:05
correct

bethskurrie
2021-05-07 01:05
like I said, this build is expected to fail.

bheemreddy181
2021-05-07 01:05
ya true makes sense

tarunmehrotra3
2021-05-10 06:31
has joined #pact-ruby

jbecker
2021-05-10 16:31
has joined #pact-ruby

james.wettenhall
2021-05-11 04:54
has joined #pact-ruby

eduardo.marques
2021-05-11 09:19
has joined #pact-ruby

al8x.romanov
2021-05-11 13:09
has joined #pact-ruby

jr.jenks
2021-05-11 21:46
has joined #pact-ruby

sammomichael
2021-05-12 02:27
has joined #pact-ruby

tony.foster
2021-05-12 03:44
has joined #pact-ruby

jan.businsky
2021-05-12 09:10
has joined #pact-ruby

github2
2021-05-12 15:07
[pact-foundation/pact-mock_service] Pull request opened by mhall58

matthew.hall
2021-05-12 15:15
@uglyog ^ I think I found the issue with remote connections if you could take a look and consider this fix please. Thanks

matthew.hall
2021-05-12 15:28
@bethskurrie ^

lreisch
2021-05-12 19:23
has joined #pact-ruby

bethskurrie
2021-05-13 00:09
@matthew.hall the host is definitely used because otherwise this Dockerfile would never have worked https://github.com/pact-foundation/pact-mock-service-docker/blob/master/Dockerfile#L18

bethskurrie
2021-05-13 00:09
The service has to be bound to `0.0.0.0` otherwise it is not accessible outside the Docker container. ```CMD bundle exec pact-mock-service service --host 0.0.0.0 --port $EXPOSED_SERVICE_PORT --pact-dir ./pacts```

jorge.curima.corp
2021-05-13 01:37
has joined #pact-ruby

matthew.hall
2021-05-13 02:46
thanks, but I am creating the mock service with the ruby library, not using the command line version

matthew.hall
2021-05-13 02:48
```Pact.service_consumer "partner websites cron" do has_pact_with "similar web" do mock_service :similar_web do port 5678 host "0.0.0.0" # Optional, defaults to "localhost". Useful when using a standalone mock service. standalone false # Optional. If true, does not automatically start a mock service # You must start/stop the mock service manually. end end end```

matthew.hall
2021-05-13 02:50
I can only ever get it to listen to localhost for some reason. any other setting causes a rack exception to be thrown and the server doesn't start

anh.evizi.test
2021-05-13 05:56
has joined #pact-ruby

yka259
2021-05-13 08:22
has joined #pact-ruby

joshibharat
2021-05-13 11:43
has joined #pact-ruby

smankala
2021-05-13 20:55
has joined #pact-ruby

github2
2021-05-13 23:04
[pact-foundation/pact-ruby] Issue closed by surpher

martin.pelikan
2021-05-14 06:48
has joined #pact-ruby

joao_glorioso
2021-05-14 08:41
has joined #pact-ruby

ashok.jan31
2021-05-14 12:25
has joined #pact-ruby

gusfisha
2021-05-14 19:52
has joined #pact-ruby

keithgutfreund
2021-05-14 20:13
has joined #pact-ruby

k.gutfreund
2021-05-15 03:47
has joined #pact-ruby

siegcollado
2021-05-17 05:03
has joined #pact-ruby

simon.thomas1978
2021-05-17 08:53
has joined #pact-ruby

keimiokamoto
2021-05-17 10:36
has joined #pact-ruby

fabian.feary
2021-05-17 11:52
has joined #pact-ruby

josh.brangwyn
2021-05-17 12:19
has joined #pact-ruby

xiao.liang
2021-05-17 16:41
has joined #pact-ruby

github2
2021-05-18 00:17
[pact-foundation/pact-mock_service] Pull request merged by bethesque

github2
2021-05-18 00:22
[pact-foundation/pact-mock_service] New release _https://github.com/pact-foundation/pact-mock_service/releases/tag/v3.9.0_ published by github-actions[bot]

bhattacharyyasom
2021-05-18 14:05
has joined #pact-ruby

lalit210784
2021-05-18 17:55
has joined #pact-ruby

zaxosdimi
2021-05-18 22:14
has joined #pact-ruby

viktor.trako
2021-05-19 15:45
has joined #pact-ruby

abdel.akkoub
2021-05-19 17:27
has joined #pact-ruby

akrala
2021-05-19 21:22
has joined #pact-ruby

mazi.fayazfar
2021-05-19 22:23
has joined #pact-ruby

daniel.qu
2021-05-20 18:03
has joined #pact-ruby

vijay.chawla
2021-05-21 08:37
has joined #pact-ruby

tim.walter
2021-05-21 09:12
has joined #pact-ruby

ankit.laddha
2021-05-21 14:03
has joined #pact-ruby

dimundo
2021-05-21 14:09
has joined #pact-ruby

include.melaz
2021-05-22 13:15
has joined #pact-ruby

uddhavchopade
2021-05-23 08:32
has joined #pact-ruby

lukasz.wlosek
2021-05-24 08:03
has joined #pact-ruby

komathy_priya_dhanas
2021-05-24 09:26
has joined #pact-ruby

nh.salah
2021-05-24 11:46
has joined #pact-ruby

erinc1915
2021-05-24 16:11
has joined #pact-ruby

nzarate
2021-05-24 18:11
has joined #pact-ruby

jonathan.arreola
2021-05-24 21:20
has joined #pact-ruby

cesar.consultorjr
2021-05-24 21:39
has joined #pact-ruby

gdfesta
2021-05-25 00:44
has joined #pact-ruby

utsavk3210
2021-05-25 08:37
has joined #pact-ruby

daniel.cardinha
2021-05-25 10:06
has joined #pact-ruby

dan.haughey
2021-05-25 14:34
has joined #pact-ruby

vince.lee
2021-05-25 14:36
has joined #pact-ruby

pact544
2021-05-25 16:01
has joined #pact-ruby

shlomi
2021-05-25 22:41
has joined #pact-ruby

raquel.bautista
2021-05-26 09:38
has joined #pact-ruby

vince.lee
2021-05-26 09:41
@vince.lee has left the channel

aubilla
2021-05-26 09:52
has joined #pact-ruby

vishnuprakash323
2021-05-26 10:46
has joined #pact-ruby

rob.caiger
2021-05-26 11:54
has joined #pact-ruby

lio.lunesu
2021-05-26 17:55
has joined #pact-ruby

nahuel.dallavecchia
2021-05-26 20:24
has joined #pact-ruby

mathew.baltes
2021-05-26 23:33
has joined #pact-ruby

stephen.leece
2021-05-26 23:44
has joined #pact-ruby

james_fraser
2021-05-27 09:23
has joined #pact-ruby

mostafa.zaher
2021-05-27 10:13
has joined #pact-ruby

utsavtiwary10
2021-05-27 10:53
has joined #pact-ruby

kamoljan
2021-05-28 02:39
has joined #pact-ruby

mathias.duesterhoeft
2021-05-28 08:59
has joined #pact-ruby

matty_o_connor01
2021-05-28 15:57
has joined #pact-ruby

nathaniel.emmons
2021-05-28 18:25
has joined #pact-ruby

sapoho3257
2021-05-29 16:10
has joined #pact-ruby

andjela.rajic
2021-05-30 20:00
has joined #pact-ruby

sumitsg004
2021-05-31 05:10
has joined #pact-ruby

james_fraser
2021-05-31 08:59
@james_fraser has left the channel

louiseavelar
2021-05-31 13:02
@louiseavelar has left the channel

allan.barbosa
2021-05-31 14:08
has joined #pact-ruby

vinicius.grund
2021-05-31 14:35
has joined #pact-ruby

todd.lemmonds
2021-06-01 15:57
has joined #pact-ruby

alexander.infante
2021-06-01 15:57
has joined #pact-ruby

michael.doyle
2021-06-01 15:58
has joined #pact-ruby

paulorochag
2021-06-01 20:20
has joined #pact-ruby

matthew.hall
2021-06-01 20:20
Is it possible to get pact consumer library to work with TestUnit (instead of rspec and minitest) ?

matthew.hall
2021-06-01 20:20
would a new consumer class need to be written?

jaspal.gill
2021-06-02 15:23
has joined #pact-ruby

wenqiglantz
2021-06-02 18:19
has joined #pact-ruby

ch.toimbetov
2021-06-02 21:46
has joined #pact-ruby

github2
2021-06-03 00:26
[pact-foundation/pact-mock_service] Issue opened by bethesque

kyle.florence
2021-06-03 04:57
@kyle.florence has left the channel

xyz1kind
2021-06-03 05:03
has joined #pact-ruby

github2
2021-06-03 05:07
[pact-foundation/pact-ruby] Issue opened by bethesque

github2
2021-06-03 05:52
[pact-foundation/pact-mock_service] Issue closed by bethesque

github2
2021-06-03 05:54
[pact-foundation/pact-mock_service] New release _https://github.com/pact-foundation/pact-mock_service/releases/tag/v3.9.1_ published by github-actions[bot]

aftab.shamim2020
2021-06-03 06:02
has joined #pact-ruby

slu.mendozaharold
2021-06-03 10:33
has joined #pact-ruby

sergio.artero
2021-06-04 10:07
has joined #pact-ruby

v-gabriel.dantas
2021-06-04 15:26
has joined #pact-ruby

leonardo.viana
2021-06-04 18:52
has joined #pact-ruby

yashdev963
2021-06-07 06:51
has joined #pact-ruby

github2
2021-06-07 12:12
[pact-foundation/pact-mock_service] Issue reopened by mefellows

github2
2021-06-07 12:12
[pact-foundation/pact-mock_service] Issue closed by mefellows

i.pinzari
2021-06-07 17:27
has joined #pact-ruby

gurkiratguliani
2021-06-07 19:36
has joined #pact-ruby

krishna.ramnk
2021-06-08 13:24
has joined #pact-ruby

nathaniel.emmons
2021-06-08 18:50
@nathaniel.emmons has left the channel

sagar.kharab
2021-06-09 00:32
has joined #pact-ruby

david.vancouvering
2021-06-09 03:36
has joined #pact-ruby

nuno.pik
2021-06-09 06:58
has joined #pact-ruby

natashakdykes
2021-06-09 16:06
has joined #pact-ruby

torbjorn.vatn
2021-06-09 17:30
has joined #pact-ruby

s.goel
2021-06-10 08:57
has joined #pact-ruby

s.goel
2021-06-10 14:17
@s.goel has left the channel

kondal.ramidi
2021-06-10 16:13
has joined #pact-ruby

richard
2021-06-11 00:13
has joined #pact-ruby

jwcarman
2021-06-11 14:23
has joined #pact-ruby

hello370
2021-06-11 14:58
has joined #pact-ruby

vikrant82
2021-06-12 12:16
has joined #pact-ruby

daniel.bubenheim
2021-06-14 08:05
has joined #pact-ruby

joaoproenca
2021-06-14 10:15
has joined #pact-ruby

e.pittaluga.b
2021-06-14 16:34
has joined #pact-ruby

npatil
2021-06-14 17:28
has joined #pact-ruby

lucas.rolle
2021-06-15 06:48
has joined #pact-ruby

caoilte
2021-06-15 11:36
has joined #pact-ruby

caoilte
2021-06-15 11:40
@caoilte has left the channel

danielabbitt
2021-06-15 17:12
has joined #pact-ruby

tom.borglum
2021-06-15 17:29
has joined #pact-ruby

michael.branders
2021-06-16 06:57
has joined #pact-ruby

jedlicka
2021-06-16 10:12
has joined #pact-ruby

jpasse
2021-06-16 13:45
has joined #pact-ruby

jan.malkiewicz
2021-06-16 14:48
has joined #pact-ruby

jeen.broekstra
2021-06-17 06:13
has joined #pact-ruby

minijb225
2021-06-17 06:44
has joined #pact-ruby

tomknee1
2021-06-18 08:15
has joined #pact-ruby

rockin291
2021-06-19 05:18
has joined #pact-ruby

zainamro1
2021-06-20 17:17
has joined #pact-ruby

nferrazzano
2021-06-21 05:23
has joined #pact-ruby

lewis.prescott079
2021-06-21 12:55
has joined #pact-ruby

vlad
2021-06-21 18:23
has joined #pact-ruby

christopher.doherty
2021-06-21 19:01
has joined #pact-ruby

github2
2021-06-21 22:45
[pact-foundation/pact-support] Issue closed by bethesque

liorra
2021-06-22 04:17
has joined #pact-ruby

stanojevic.boban
2021-06-22 10:20
has joined #pact-ruby

miguel.carneiro
2021-06-22 12:51
has joined #pact-ruby

srinagasai.krishnasan
2021-06-22 17:35
has joined #pact-ruby

varnit.garg2424
2021-06-23 06:19
has joined #pact-ruby

varun.patil
2021-06-23 12:44
has joined #pact-ruby

mselvakumar
2021-06-23 23:54
has joined #pact-ruby

srikanth.rachakonda
2021-06-24 02:32
has joined #pact-ruby

ali.akbar
2021-06-24 06:58
has joined #pact-ruby

erterpstra
2021-06-24 19:20
has joined #pact-ruby

abinzahid
2021-06-25 06:12
has joined #pact-ruby

scott.riley111
2021-06-25 08:37
Is anyone working on a relatively old version of Rails (3.2) as a provider with pact? Running into some issues and want to know if there?s precedent or if I?m going to just end up in pain :slightly_smiling_face:

jchandorkar
2021-06-26 09:01
has joined #pact-ruby

rani.sathya
2021-06-27 04:14
has joined #pact-ruby

cala.dev_pact
2021-06-28 04:07
has joined #pact-ruby

robert.rap
2021-06-28 06:34
has joined #pact-ruby

v-ratngupta
2021-06-28 07:13
has joined #pact-ruby

e.hallowell
2021-06-28 13:28
has joined #pact-ruby

mishalalexander20
2021-06-29 07:36
has joined #pact-ruby

lukemufc125
2021-06-29 07:57
has joined #pact-ruby

prash471
2021-06-29 09:43
has joined #pact-ruby

martijn.hagens
2021-06-29 10:12
has joined #pact-ruby

miguel.carneiro
2021-06-29 10:23
@miguel.carneiro has left the channel

mikko.s.koskinen
2021-06-29 17:05
has joined #pact-ruby

bheemreddy181
2021-06-29 23:00
Beth / Matt - Any idea why do we see these error when we do pact verification on provider side the interactions are passing as expected but i do see connection not allowed

bheemreddy181
2021-06-29 23:03
i have `WebMock.disable_net_connect!(allow: "http://pact-broker.enova.com"])` in my rails helper too

bheemreddy181
2021-06-29 23:03
but i am curious around what this verification job is trying to do

zhaoyi0113
2021-06-30 02:13
has joined #pact-ruby

sgottipati
2021-07-01 06:02
has joined #pact-ruby

vshankar
2021-07-01 06:06
has joined #pact-ruby

e.generalov
2021-07-01 07:19
has joined #pact-ruby

eduards.klavins
2021-07-01 13:44
has joined #pact-ruby

felix.gomez
2021-07-01 14:38
has joined #pact-ruby

bbako
2021-07-01 20:51
has joined #pact-ruby

github2
2021-07-02 03:27
[pact-foundation/pact-ruby] Issue opened by bethesque

phil.armstrong
2021-07-02 06:49
has joined #pact-ruby

gargshubham49
2021-07-02 07:21
has joined #pact-ruby

vinnys.lins
2021-07-05 13:49
has joined #pact-ruby

talank
2021-07-06 03:52
has joined #pact-ruby

juri.petersen
2021-07-06 07:29
has joined #pact-ruby

leolvicario
2021-07-06 07:36
has joined #pact-ruby

swoichhaa
2021-07-06 08:46
has joined #pact-ruby

ivo.velthoven174
2021-07-06 09:28
has joined #pact-ruby

fjtdg
2021-07-06 12:16
has joined #pact-ruby

steve.etherington
2021-07-06 16:44
has joined #pact-ruby

rosh.mjohn
2021-07-07 07:19
has joined #pact-ruby

mahajanalokkumar
2021-07-07 10:41
has joined #pact-ruby

jyiyng2002
2021-07-07 19:57
has joined #pact-ruby

splurgeop
2021-07-07 21:48
has joined #pact-ruby

kapoor.manil
2021-07-07 22:30
has joined #pact-ruby

pashas.2k3
2021-07-08 03:41
has joined #pact-ruby

vijayanaggella
2021-07-08 05:25
has joined #pact-ruby

ananthshenoy03
2021-07-08 05:46
has joined #pact-ruby

sai5i.islam
2021-07-08 06:40
has joined #pact-ruby

poorvasgokhale
2021-07-08 09:08
has joined #pact-ruby

suresh.thammishetti
2021-07-08 11:08
has joined #pact-ruby

michael.katende
2021-07-09 10:41
has joined #pact-ruby

marcin.baranowski953
2021-07-09 10:42
has joined #pact-ruby

bedfordwest
2021-07-10 22:21
has joined #pact-ruby

firstamit
2021-07-11 14:07
has joined #pact-ruby

omar554
2021-07-11 21:54
has joined #pact-ruby

k.deepupardha
2021-07-12 10:23
has joined #pact-ruby

lumenofor
2021-07-12 10:46
has joined #pact-ruby

jayr.motta
2021-07-12 13:57
has joined #pact-ruby

doug.shattuck
2021-07-12 20:26
has joined #pact-ruby

sorin_balbae
2021-07-13 07:41
has joined #pact-ruby

akara
2021-07-13 10:34
has joined #pact-ruby

nathan.derave
2021-07-13 12:28
has joined #pact-ruby

matthew.schaad
2021-07-13 21:29
has joined #pact-ruby

neenad.jadhavgre
2021-07-13 22:30
has joined #pact-ruby

cristian
2021-07-14 06:18
has joined #pact-ruby

michal.bernhard
2021-07-14 11:16
has joined #pact-ruby

richard.jones254
2021-07-14 23:53
has joined #pact-ruby

edanielsen
2021-07-15 00:46
has joined #pact-ruby

abatan.k
2021-07-15 03:48
has joined #pact-ruby

mandeep302755
2021-07-15 04:49
has joined #pact-ruby

mahajanrupali22
2021-07-15 05:46
has joined #pact-ruby

hylke.de.jong
2021-07-15 12:49
has joined #pact-ruby

matthew.hall
2021-07-15 14:17
@bheemreddy181 did you get this working?

bheemreddy181
2021-07-15 14:18
nope still looking for answers

matthew.hall
2021-07-15 14:18
I am a pact novice but do you have a pact_helper file ?

matthew.hall
2021-07-15 14:20
```# In /spec/service_providers/pact_helper.rb require 'pact/consumer/rspec' # or require 'pact/consumer/minitest' if you are using Minitest Pact.service_consumer "Zoo App" do has_pact_with "Animal Service" do mock_service :animal_service do port 1234 host "0.0.0.0" # optional, defaults to "localhost" end end end```

matthew.hall
2021-07-15 14:22
actually it looks like you are using something different than I used

matthew.hall
2021-07-15 14:22
so thats probably not much help

efemgy
2021-07-15 14:27
has joined #pact-ruby

bheemreddy181
2021-07-15 20:20
i do - do you mean that we should provide a input host there ?

amreenshaik.basha
2021-07-16 04:06
has joined #pact-ruby

rhian.van.esch
2021-07-16 12:14
has joined #pact-ruby

wilco.van.esch
2021-07-16 12:30
has joined #pact-ruby

karl.morrison
2021-07-16 12:56
has joined #pact-ruby

timothyjabez
2021-07-16 17:23
has joined #pact-ruby

bethskurrie
2021-07-16 23:54
@bheemreddy181 because the tests failed, it's trying to get the previous version to show a diff to you.

bethskurrie
2021-07-16 23:55
I won't know why your webmock is not allowing the connection, because your configuration looks fine to me.

bethskurrie
2021-07-16 23:55
It might be because it's happening after the tests are over?

bethskurrie
2021-07-16 23:55
I'd be looking at the webmock docs/issues, rather than the pact ones.

bethskurrie
2021-07-16 23:57
@scott.riley111 what issues are you seeing? Pact does not know or care about Rails. It does however get affected by active bloody support, and can be affected if you have a custom JSON serialization gem.

bethskurrie
2021-07-16 23:58
@matthew.hall yes, it shouldn't be too hard if you wanted to try. You can look at the mini test bindings and copy how it does that.


bheemreddy181
2021-07-17 04:04
Actually @bethskurrie@bethskurrie@bethskurrie tests were not failing here that?s where it confused me

olayemifolakemi
2021-07-18 07:33
Hello there:wave:. How do I verify pact for data that has null values included?

ppdnguyen
2021-07-18 16:23
has joined #pact-ruby

cgoodison
2021-07-18 23:56
has joined #pact-ruby

bethskurrie
2021-07-18 23:58
Yeah, it's not to do with the tests.

bethskurrie
2021-07-18 23:59
You need to expect nil @olayemifolakemi


scott.riley111
2021-07-19 09:56
I ended up needing to swap over to using the standalone verifier because of gem version conflicts/requirements

scott.riley111
2021-07-19 09:56
from memory it was something like `rack` needing >= 2 with `pact-ruby`, but we?re on `1.5` I think

bethskurrie
2021-07-19 10:49
Or you need to make sure the values are populated by the provider state @olayemifolakemi

sripathi
2021-07-19 12:30
has joined #pact-ruby

olayemifolakemi
2021-07-19 14:35
Hmm, okay. Thanks for the suggestions!

calvin.krist
2021-07-19 15:29
has joined #pact-ruby

vinay.viswanadha
2021-07-19 15:30
has joined #pact-ruby

brian.mitchell
2021-07-19 15:37
has joined #pact-ruby

mike.geeves064
2021-07-19 18:07
has joined #pact-ruby

ben.clare2
2021-07-20 08:16
has joined #pact-ruby

rafael.moral
2021-07-20 11:48
has joined #pact-ruby

andrii.rakhimov
2021-07-20 23:06
has joined #pact-ruby

boris.gordon
2021-07-20 23:25
has joined #pact-ruby

github2
2021-07-22 00:25
[pact-foundation/pact-ruby] Issue opened by bethesque

ryn.anderson
2021-07-22 17:41
has joined #pact-ruby

schakalabbi
2021-07-22 21:29
has joined #pact-ruby

uryadov212
2021-07-23 06:15
@uryadov212 has left the channel

consulting
2021-07-23 12:33
has joined #pact-ruby

galante2123
2021-07-23 14:14
has joined #pact-ruby

dc113604
2021-07-23 14:39
has joined #pact-ruby

github2
2021-07-23 15:30
[pact-foundation/pact-ruby] Issue closed by iamvery

github2
2021-07-23 15:43
[pact-foundation/pact-ruby] Issue reopened by iamvery

dsinecos
2021-07-26 04:49
has joined #pact-ruby

mebenhoeh
2021-07-26 05:20
has joined #pact-ruby

dsmileb
2021-07-26 16:06
has joined #pact-ruby

hazel.wright
2021-07-26 19:04
has joined #pact-ruby

matt682
2021-07-27 01:32
has joined #pact-ruby

github2
2021-07-27 07:01
[pact-foundation/pact-support] New release _https://github.com/pact-foundation/pact-support/releases/tag/v1.16.8_ published by github-actions[bot]

bheemreddy181
2021-07-27 21:56
Did something changed in the latest pact support gem ``` 4: from /home/circleci/project/vendor/bundle/ruby/2.5.0/gems/pact-support-1.16.8/lib/pact/matching_rules/merge.rb:41:in `recurse' 3: from /home/circleci/project/vendor/bundle/ruby/2.5.0/gems/pact-support-1.16.8/lib/pact/matching_rules/merge.rb:85:in `wrap' 2: from /home/circleci/project/vendor/bundle/ruby/2.5.0/gems/pact-support-1.16.8/lib/pact/matching_rules/merge.rb:100:in `handle_regex' 1: from /home/circleci/project/vendor/bundle/ruby/2.5.0/gems/pact-support-1.16.8/lib/pact/matching_rules/merge.rb:100:in `new' /home/circleci/project/vendor/bundle/ruby/2.5.0/gems/pact-support-1.16.8/lib/pact/term.rb:31:in `initialize': Value to generate "{"case_types"=>["Bankruptcy", "Credit counseling", "Legal complaint", "ID theft", "Contingent Placement", "Deceased", "Cease & Desist", "Credit Reporting", "Debt Sale"], "loan_number"=>"2021IL316410875"}" does not match regular expression /\S.*loan_number=\d{4}[A-Z]{2}\d*/ (Pact::Error)``` which used to work pact support 1.0 version vs 1.16


vbhardwaj.eminent
2021-07-28 05:15
has joined #pact-ruby

miguel.panelo
2021-07-28 07:29
has joined #pact-ruby

otaviio
2021-07-28 07:57
has joined #pact-ruby

patrice.krakow
2021-07-28 10:00
has joined #pact-ruby

david.simpson
2021-07-28 12:51
has joined #pact-ruby

e.alderson004
2021-07-28 17:17
has joined #pact-ruby

jdalessandro
2021-07-29 07:27
has joined #pact-ruby

eric.tang1
2021-07-29 16:22
has joined #pact-ruby

antklim
2021-07-29 22:25
has joined #pact-ruby

toffer.lim87
2021-07-30 03:51
has joined #pact-ruby

aphronio
2021-07-30 13:42
has joined #pact-ruby

fabio882
2021-08-01 19:31
has joined #pact-ruby

eddie
2021-08-02 04:08
has joined #pact-ruby

marvin.kienitz
2021-08-05 07:20
has joined #pact-ruby

danieljak
2021-08-05 10:09
has joined #pact-ruby

univ.anirudh
2021-08-05 13:22
has joined #pact-ruby

james.perepiczka
2021-08-05 16:29
has joined #pact-ruby

j3rry.wan9
2021-08-05 21:44
has joined #pact-ruby

sadikshahidain
2021-08-06 02:14
has joined #pact-ruby

ganginenik
2021-08-06 18:14
has joined #pact-ruby

george.south
2021-08-09 21:51
@george.south has left the channel

xiaoyewang
2021-08-10 01:13
has joined #pact-ruby

mfellows_admin
2021-08-10 02:52
has joined #pact-ruby

qingyuliu
2021-08-10 09:27
has joined #pact-ruby

dhairyapatel071996
2021-08-10 20:06
has joined #pact-ruby

beem132
2021-08-10 21:21
has joined #pact-ruby

rfang
2021-08-11 00:49
has joined #pact-ruby

subhashnarla
2021-08-11 07:29
has joined #pact-ruby

jkdihenkar
2021-08-11 10:43
has joined #pact-ruby

christian.kampka
2021-08-11 10:51
has joined #pact-ruby

ashwinparthasarathy30
2021-08-11 11:23
has joined #pact-ruby

andrew.jensen
2021-08-11 16:18
has joined #pact-ruby

bheemreddy181
2021-08-11 21:00
Team - Question around tagging failures from pact provider ```E, [2021-08-11T15:29:52.458498 #1291] ERROR -- : Coverband Error: #<RuntimeError: coverage measurement is not enabled> coverage measurement is not enabled /home/circleci/project/vendor/bundle/ruby/2.4.0/gems/pact-1.32.0/lib/pact/provider/verification_results/publish.rb:87:in `block in tag_versions': Error returned from tagging request 404 (Pact::Provider::VerificationResults::PublicationError) from /home/circleci/project/vendor/bundle/ruby/2.4.0/gems/pact-1.32.0/lib/pact/provider/verification_results/publish.rb:83:in `each'```

bheemreddy181
2021-08-11 21:01
Any insights will be really helpful

bethskurrie
2021-08-12 01:00
@bheemreddy181 you're on version 1.32.0. Please upgrade to 1.57.0.

bheemreddy181
2021-08-12 01:01
Ah ohk thanks

vivekkurhe1993
2021-08-12 03:44
has joined #pact-ruby

aakbar
2021-08-12 06:05
has joined #pact-ruby

tm.buga
2021-08-12 08:55
has joined #pact-ruby

yanivhad
2021-08-12 08:58
has joined #pact-ruby

francois.fernandes
2021-08-12 11:55
has joined #pact-ruby

ringo
2021-08-12 13:53
@ringo has left the channel

johnathan.gilday
2021-08-13 16:40
has joined #pact-ruby

ben.kaiser
2021-08-13 17:47
has joined #pact-ruby

johnathan.gilday
2021-08-13 20:03
@johnathan.gilday has left the channel

dbekman
2021-08-13 20:51
has joined #pact-ruby

chen
2021-08-15 09:34
has joined #pact-ruby

tom.willmott
2021-08-16 13:47
has joined #pact-ruby

franklin.lucena89
2021-08-16 16:52
has joined #pact-ruby

ram.tripathi
2021-08-17 06:33
has joined #pact-ruby

ricardo.neto
2021-08-17 09:22
has joined #pact-ruby

andrew.patterson
2021-08-17 14:55
has joined #pact-ruby

pshah
2021-08-17 15:31
has joined #pact-ruby

dylanchase26
2021-08-18 04:11
has joined #pact-ruby

satish.chandra
2021-08-18 05:54
has joined #pact-ruby

flynnhandley
2021-08-18 22:30
has joined #pact-ruby

thomaswtsang
2021-08-19 16:53
has joined #pact-ruby

chris005
2021-08-19 19:07
has joined #pact-ruby

srimuralixi
2021-08-20 02:18
has joined #pact-ruby

manika.goel
2021-08-20 05:38
has joined #pact-ruby

akanksha.sharma
2021-08-20 06:31
has joined #pact-ruby

jonah
2021-08-20 14:42
has joined #pact-ruby

tlzhou
2021-08-20 15:02
has joined #pact-ruby

ramya.sri
2021-08-23 03:52
has joined #pact-ruby

joseramonrivera21
2021-08-23 08:49
has joined #pact-ruby

denny.duttig
2021-08-23 10:10
has joined #pact-ruby

akansha.saraswat3
2021-08-23 10:50
has joined #pact-ruby

sushant.soni
2021-08-23 21:10
has joined #pact-ruby

ajaiswal595
2021-08-24 11:00
has joined #pact-ruby

pd287515778
2021-08-24 12:48
has joined #pact-ruby

hwebster
2021-08-25 05:30
has joined #pact-ruby

hoangvo
2021-08-25 05:43
has joined #pact-ruby

jobjingjo
2021-08-25 06:20
has joined #pact-ruby

sagarsitap596
2021-08-25 14:10
has joined #pact-ruby

kyle.fischer
2021-08-25 16:31
has joined #pact-ruby

datasmithadvtech
2021-08-25 19:43
has joined #pact-ruby

todor.m.kolev
2021-08-25 19:59
has joined #pact-ruby

sushmitha.amin
2021-08-26 04:31
has joined #pact-ruby

shwetastar98
2021-08-26 12:35
has joined #pact-ruby

contact
2021-08-26 12:44
has joined #pact-ruby

malena.cadima
2021-08-26 16:07
has joined #pact-ruby

louis.ss
2021-08-27 01:42
has joined #pact-ruby

sergio.amorim
2021-08-27 14:40
has joined #pact-ruby

slin
2021-08-29 23:51
has joined #pact-ruby

shane.robinson
2021-08-30 00:30
has joined #pact-ruby

br.maher
2021-08-30 04:35
has joined #pact-ruby

kwongyun
2021-08-30 15:57
has joined #pact-ruby

0x06065a
2021-08-31 00:02
has joined #pact-ruby

matt.thomas
2021-08-31 05:29
has joined #pact-ruby

abhi.nandan964
2021-08-31 10:19
has joined #pact-ruby

shivi.btech08
2021-08-31 21:03
has joined #pact-ruby

kpuengpanich
2021-09-01 07:14
has joined #pact-ruby

mhmtyuceoz
2021-09-01 07:35
has joined #pact-ruby

volkan.tufekci
2021-09-02 08:47
has joined #pact-ruby

yassine
2021-09-02 10:59
has joined #pact-ruby

connor.beck
2021-09-02 13:39
has joined #pact-ruby

maurits.out
2021-09-02 15:12
has joined #pact-ruby

kumasaka.tk
2021-09-02 21:24
has joined #pact-ruby

valeriia.danylenko
2021-09-03 18:26
has joined #pact-ruby

irmt06
2021-09-04 22:51
has joined #pact-ruby

divyalakshmi.gk
2021-09-07 01:46
has joined #pact-ruby

constantin.jaeck
2021-09-07 02:24
has joined #pact-ruby

narendra_uppara
2021-09-07 07:17
has joined #pact-ruby

nikuplanchiwar
2021-09-07 08:03
has joined #pact-ruby

sdomeracki
2021-09-07 10:22
has joined #pact-ruby

gibraltor999
2021-09-07 12:03
has joined #pact-ruby

norway.martin
2021-09-07 18:38
has joined #pact-ruby

adamdullenty
2021-09-08 08:23
has joined #pact-ruby

martin.a.harkins
2021-09-08 12:15
has joined #pact-ruby

adamdullenty
2021-09-08 23:04
Hey everyone. I'm just working through the pact guide for Ruby at the point where I try to run the rake task from the producer project in order to verify against the pact from the consumer project: https://github.com/pact-foundation/pact-ruby#in-the-animal-service-provider-project I'm getting this error: ```RuntimeError: Could not find http://config.ru file at ./config.ru Please configure the service provider app or create a http://config.ru file in the root directory of the project.``` The "producer" in this case is a Ruby lambda function written using Serverless, so it doesn't really make sense to have a `http://config.ru` but I can carry on down this route if there's a known way to get this to work?

bethskurrie
2021-09-08 23:04
You'll need a rack interface to your app.

bethskurrie
2021-09-08 23:05
Then you can set the app directly in the config. Let me find the doc.


bethskurrie
2021-09-08 23:05
```Pact.service_provider "My Service Provider" do app { MyApp.new } end```

bethskurrie
2021-09-08 23:06
You can use a rack adapter like this one https://github.com/logandk/serverless-rack

bethskurrie
2021-09-08 23:07
We actually use this pattern for one of the Pactflow internal services.

adamdullenty
2021-09-08 23:09
Thanks for this, I'll do some digging :slightly_smiling_face:

rocco.smit
2021-09-09 06:20
has joined #pact-ruby

andrei_mironau
2021-09-09 10:00
has joined #pact-ruby

febin.sathar
2021-09-09 10:17
has joined #pact-ruby

adamdullenty
2021-09-09 10:22
I've been reading into the serverless-rack plugin and converting all of our serverless functions into rack apps is a bit much for the sake of contract testing. Do you think there would be a way of getting this up and running using serverless offline, running the lambda function in the background as part of a test script, and then calling `bundle exec pact verify` to avoid having to configure Rake, then killing the lambda?


jcaromiq
2021-09-09 11:47
has joined #pact-ruby

adamdullenty
2021-09-09 12:48
Hey, I'm just looking for some pointers on how to debug an issue I'm seeing please. I'm at the step in the guides where you verify your pacts in the producer app, I've got `pact_uri` configured to point at the shared JSON file in the consumer app, and getting the following error: ```Could not find provider state "valid payload" for consumer Rails Backend``` (the naming isn't overly detailed but I'm just working on a proof of concept branch currently) I'm a bit puzzled because it must be reading the JSON file in order to find the provider state, so then where is it looking when it says it can't find the provider state...?

adamdullenty
2021-09-09 12:49
Does this actually mean that it can't verify the state against the producer..? I'd have expected to see some other failure message if this was the case, e.g. no response from the server, or response does not match or something.

mirko.zipris
2021-09-09 20:08
has joined #pact-ruby

bethskurrie
2021-09-10 01:33
You need to define the provider state.

bethskurrie
2021-09-10 01:34
As in, the code to set up the data for the provider state in the codebase.

bethskurrie
2021-09-10 01:34
It should have printed out a template for you.


bethskurrie
2021-09-10 01:37
@adamdullenty you can, but having done it myself, I found it tediusly slow to execute the tests.

bethskurrie
2021-09-10 01:38
And you lose the ability to mock things.

bethskurrie
2021-09-10 01:38
It's actually a very small piece of code to turn a rack request into a serverless request.

bethskurrie
2021-09-10 01:40
This is what we use.

bethskurrie
2021-09-10 01:41
If you want to stick with your locally running serverless app, you'll need to use the pact-provider-verifier instead. You won''t be able to use the native ruby rack verification tool.


dotelnp
2021-09-10 06:48
has joined #pact-ruby

sameer.patil
2021-09-10 18:42
has joined #pact-ruby

b.1.alpha
2021-09-10 19:17
has joined #pact-ruby

naushad_amin
2021-09-11 23:15
has joined #pact-ruby

adamdullenty
2021-09-13 08:14
Thanks, from the readme it originally sounded like these were optional if you needed to set up data in a specific way (I didn't given it's a stateless lambda): https://github.com/pact-foundation/pact-ruby#using-provider-states

adamdullenty
2021-09-13 08:24
OK, thanks. Can you see any downsides to having an alternative setup where the rack layer is set up purely for contract testing, i.e. we could have a `serverless.test.yml` for testing, and an un-altered `serverless.yml` for staging/production?

bethskurrie
2021-09-13 09:44
Sounds like a good plan to me @adamdullenty

bethskurrie
2021-09-13 09:45
Contract testing is not about "testing in a production like manner", its about deliberately excluding all the deployment concerns and just focussing on the inputs and outputs, so having a different set up for contract testing and deployment is fine.

bethskurrie
2021-09-13 09:46
The consumer needs to not declare a provider state in the interaction then @adamdullenty

bethskurrie
2021-09-13 09:46
Or you can just declare a provider state that does nothing.

adamdullenty
2021-09-13 09:47
Apologies for all the questions. There's another thing I've been wanting to ask about our use case for testing the interaction between our Rails back end and a Ruby lambda. One of our Lambda functions actually returns PDF data, i.e. `application/pdf` . Is this just a no-go with http://pact.io or is there a way to get this to work with an expected PDF response? The docs seem to suggest that it only works with JSON but curious whether this is a definite non-starter or something that can be worked around

bethskurrie
2021-09-13 09:50
I wouldn't bother trying to use pact for that.

bethskurrie
2021-09-13 09:51
It can be done with some pact implementations, but Ruby isn't the best for it.

bethskurrie
2021-09-13 09:51
You're never going to cover every aspect of a service with contract testing - I think that's one of the cases where an integration test is probably a better option.

adamdullenty
2021-09-13 09:52
Thanks :thumbsup:

bethskurrie
2021-09-13 10:04
you're welcome


bethskurrie
2021-09-13 10:55
Yes

bethskurrie
2021-09-13 10:56
But it sounds like it would do the same thing.

jose_rodriguez
2021-09-13 13:16
has joined #pact-ruby

kyle_evans
2021-09-13 13:16
has joined #pact-ruby

rahul.louis
2021-09-13 15:55
has joined #pact-ruby

a.koka
2021-09-13 17:01
has joined #pact-ruby

adamdullenty
2021-09-13 20:03
The issues I've been hitting with the `serverless offline` option are to do with stubbing / mocking AWS services. I think you mentioned this as being a downside @bethskurrie . Basically there seems to be no simple way of doing this given we're booting the lambdas via the serverless offline command line tool rather than spinning up an instance from within the Ruby code. If we did go down the route of the rack adapter option, is this (stubbing out parts of the AWS client) something you can do via the provider state `up` / `down` methods, or would you usually do this when defining `app { ... instance of rack app goes here ... }` within `pact_helper.rb`?

efloresambrosio
2021-09-13 20:09
has joined #pact-ruby

adamdullenty
2021-09-13 20:50
would you be able to dig out a code snippet by any chance for how you are mounting the existing handlers within a Sinatra app with minimal changes please? I'm still trying to keep things as close to production as possible but the way I'm working through now seems pretty far removed

olle_hallin
2021-09-14 05:50
has joined #pact-ruby

a.babenko
2021-09-14 14:00
has joined #pact-ruby

vasavi.balanagu
2021-09-14 16:49
has joined #pact-ruby

samuel.sjoberg
2021-09-14 21:49
has joined #pact-ruby

domingo
2021-09-14 23:51
has joined #pact-ruby

pradeepkumarstudent20
2021-09-15 03:32
has joined #pact-ruby

bryan
2021-09-15 15:16
has joined #pact-ruby

dboxler
2021-09-15 18:35
has joined #pact-ruby

keerthisiv
2021-09-16 03:59
has joined #pact-ruby

adelina.simion
2021-09-16 08:41
has joined #pact-ruby

akke.luukkonen
2021-09-16 10:29
has joined #pact-ruby

alejandro.pena
2021-09-16 13:37
has joined #pact-ruby

bbleach
2021-09-17 07:30
has joined #pact-ruby

rushideshpandes
2021-09-20 13:11
has joined #pact-ruby

gemhar
2021-09-20 14:33
has joined #pact-ruby

olayemifolakemi
2021-09-20 17:27
Hi there. I have a question about `provider states`. It looks like the values set in the `Consumer` side must match the created data in `provider states` in the `Provider` side. I would like to know if there's a way to use a random value like ids that's different from whats in the Pact json file... Also, how do I verify `StartCursor` and `EndCursor` for a Graphql query in the Provider side? I keep seeing this error:

jsegall
2021-09-20 21:37
has joined #pact-ruby

tjones
2021-09-21 05:07
Which pact framework is this?

tjones
2021-09-21 05:08
In general, this is what Matchers are for - see: https://docs.pact.io/getting_started/matching/

tjones
2021-09-21 05:08
So, you can say "startCursor is a string, for example "foo"", with something like `startCursor: Matchers.like("foo")`

olayemifolakemi
2021-09-21 10:21
This is for pact-ruby.

olayemifolakemi
2021-09-21 10:22
I used matchers as suggested in the doc in the Consumer code

olayemifolakemi
2021-09-21 10:22
But I am getting the above error when running pact:verify in the Provider code

dalkire
2021-09-21 13:30
has joined #pact-ruby

hakan.celebi
2021-09-21 19:43
has joined #pact-ruby

samuel.sjoberg
2021-09-21 20:12
@samuel.sjoberg has left the channel

bethskurrie
2021-09-21 21:21
@olayemifolakemi you need to set those values to something in your provider state set up code.

bethskurrie
2021-09-21 21:21
If you expect a String, it can't be nil (because the verifier can't tell what type that nil would have been if it had been there).


nrobison
2021-09-22 15:39
has joined #pact-ruby

olayemifolakemi
2021-09-22 16:22
Alright. Thanks..

calise
2021-09-22 17:06
has joined #pact-ruby

nareshnavinash
2021-09-23 09:28
has joined #pact-ruby

nareshnavinash
2021-09-23 09:33
Hey Team :wave: I have raised a PR in `pact-support` repo to remove the `randexp` dependency. - https://github.com/pact-foundation/pact-support/pull/91 ? `randexp` is removed from `pact` in this PR - https://github.com/pact-foundation/pact-ruby/pull/202 ? Issue with the randexp is that it overrides the Array's pick method in this file - https://github.com/benburkert/randexp/blob/master/lib/randexp/core_ext/array.rb ? This is causing issues with other unit tests which we have in our repo. ? I have tested running pact test by removing this randexp dependency and seems like tests are not affected by this. ? Also I see that this is just required within a single file and not used at any other place. We are blocked with this and it would be a great help if someone could get his merged and pushed to `Ruby gems` Or if we have some other alternative to avoid `Array.pick` override by the `randexp` please let me know the same. Thanks :pray:

radu.simu
2021-09-23 09:38
has joined #pact-ruby

aterrong
2021-09-23 09:42
has joined #pact-ruby

nisharaveendran30
2021-09-23 10:34
has joined #pact-ruby

sujithsukumaranm
2021-09-23 10:36
has joined #pact-ruby

sureshbabudevaki
2021-09-23 12:01
has joined #pact-ruby

greg.hinsley
2021-09-23 12:29
has joined #pact-ruby

nyman.robin
2021-09-24 07:07
has joined #pact-ruby

ricardo.paquito
2021-09-24 10:36
has joined #pact-ruby

abramenkov.valentin
2021-09-24 12:42
has joined #pact-ruby

leo.tang
2021-09-24 17:56
has joined #pact-ruby

jyotiguptaofficial
2021-09-25 13:00
has joined #pact-ruby

mattandaey
2021-09-25 20:32
has joined #pact-ruby

saurelio58
2021-09-27 12:39
has joined #pact-ruby

francisco
2021-09-27 18:27
has joined #pact-ruby

jamesatroughton
2021-09-28 10:42
has joined #pact-ruby

jamesatroughton
2021-09-28 10:48
Hi there, I have a similar question. I want to provide a place holder with a default value so that i can create a contract but replace the value when verifying against the provider. I have got it working in java by adding ``` .valueFromProviderState("id", "${id}", "2b2a8b08-bfba-4524-b45a-0cbd2e137dbf") ``` What is the equivalent in ruby? I cant see it in the docs

jake.thacker
2021-09-28 22:06
has joined #pact-ruby

craig.schwarzwald
2021-09-28 22:37
has joined #pact-ruby

owain.hunt
2021-09-29 12:58
has joined #pact-ruby

damtsisa
2021-09-30 06:58
has joined #pact-ruby

morsisdivine
2021-09-30 09:23
has joined #pact-ruby

jamesatroughton
2021-09-30 11:51
Hi there, I am currently writing some consumer tests in a ruby service. I have a requirement to be able to inject a value into the contract that will be used against provider (a random `id` that is a UUID generated by the DB). I can see that pact jvm dsl allows you to provide a placeholder with a default value that can then be replaced e.g. ``` .valueFromProviderState("id", "${id}", "2b2a8b08-bfba-4524-b45a-0cbd2e137dbf") ``` Is there a similar way of doing it in ruby? Many thanks

patrice.jy.thomas
2021-09-30 15:05
has joined #pact-ruby

kschendster
2021-09-30 16:46
has joined #pact-ruby

adam.dubnytskyy
2021-09-30 17:49
has joined #pact-ruby

stefano.varesi
2021-09-30 17:51
has joined #pact-ruby

steven.yi
2021-09-30 20:17
has joined #pact-ruby

bethskurrie
2021-09-30 22:13
@jamesatroughton you could try using Rack middleware to modify the response. You'd have to hand write the interceptor though.

bethskurrie
2021-09-30 22:14
There was a PR opened to be able to inject values returned from the provider state, but the author never finished it unfortunately.


calcorbin
2021-09-30 23:09
has joined #pact-ruby

osikwemhev
2021-10-01 01:45
has joined #pact-ruby


jamesatroughton
2021-10-01 08:43
Ahh okay @bethskurrie thanks for this. My provider test is written in java, is there a neat way to overwrite the value in the contract thats created by my ruby consumer test?

bethskurrie
2021-10-01 09:01
You'll need to look up the pact-jvm docs @jamesatroughton


bethskurrie
2021-10-01 09:02
Find the right framework. What you want has got better support in jvm. I can't remember what it's called though.

bethskurrie
2021-10-01 09:02
If you can't find it in the docs, ask in #pact-jvm

bethskurrie
2021-10-01 09:04
I'm confused @jamesatroughton. In the other conversation you said your provider was JVM. This makes it sound like it's your provider that's Ruby.

jamesatroughton
2021-10-01 09:47
Hey, apologies @bethskurrie my consumer is ruby my provider is JVM. I wanted to see if I could get the placeholder working in java as a POC to myself as its the language I am more familiar with. But as my consumer is ruby I need to some how implement the functionality in ruby.

kentaro
2021-10-01 10:05
has joined #pact-ruby

vitali.domashkevitsh
2021-10-01 10:08
has joined #pact-ruby

jamesatroughton
2021-10-01 10:48
cheers think i may have resolved my issue

seb983
2021-10-01 11:30
has joined #pact-ruby

vannessa.andrade
2021-10-01 14:44
has joined #pact-ruby

mickfagan
2021-10-02 10:36
has joined #pact-ruby

maxim.matviyuk
2021-10-03 16:48
has joined #pact-ruby

jonathan.a.stern
2021-10-03 20:38
has joined #pact-ruby

chris.ramsden
2021-10-04 16:40
has joined #pact-ruby

brian.fung
2021-10-05 04:57
has joined #pact-ruby

elekberhacizade
2021-10-05 05:27
has joined #pact-ruby

ankit.wadhwana
2021-10-05 12:23
has joined #pact-ruby

zhaopeng
2021-10-05 12:24
has joined #pact-ruby

bjorn.johansson
2021-10-05 13:16
has joined #pact-ruby

pcting
2021-10-05 18:57
has joined #pact-ruby

pcting
2021-10-05 19:26
@pcting has left the channel

aulia.ahn
2021-10-06 00:01
has joined #pact-ruby

muralis
2021-10-06 01:21
has joined #pact-ruby

lakapoor777
2021-10-06 08:47
has joined #pact-ruby

garry.jeromson973
2021-10-06 09:52
has joined #pact-ruby

anag