Still
02/04/2022, 1:05 PM/spec/pacts
, but we have to create the directory right, and how do we configure that the pacts are stored there?Still
02/11/2022, 1:38 PMrequire pact/consumer/rspec
is a directory structure, or it should be configured in rake file. Is there specific document with the dependencies and keywords we use for Pact, so that I can go through it.
Here for eg, I don't understand what `require pact/consumer/rspec`is doingStill
02/21/2022, 9:27 PMStill
02/23/2022, 7:01 PMpact-broker publish PACT_DIRS_OR_FILES ... -a, --consumer-app-version=CONSUMER_APP_VERSION -b, --broker-base-url=BROKER_BASE_URL
https://github.com/pact-foundation/pact_broker-client
Is that correct?Jason Wang
03/09/2022, 10:00 PMPact.message_provider
and Pact.service_provider
in the same pact_helper.rb
? When trying to do so, whichever one comes first seems to get overriden by the second resulting in failures. If it's not possible, is there a known workaround? Maybe separate rake tasks, one for HTTP and one for messages?
cc @Victor LauJason Wang
03/10/2022, 9:41 PMno_op
?
Pact.provider_states_for 'My Service' do
provider_state 'some state that needs no setup' do
no_op
end
provider_state 'some other state that needs no setup' do
no_op
end
end
Still
03/15/2022, 7:39 AMStill
03/16/2022, 10:35 AMRachel Bingham
03/23/2022, 10:33 AMset_up
method is not being called prior to the interaction being verified. Can anyone help? Here are some code snippets:
from the contract:
"interactions": [
{
"description": "a request to GET cards",
"providerState": "user has cards", ...
from the provider states files:
Pact.provider_states_for "bloomandwild-frontend" do
provider_state "user has cards" do
# code reaches here
set_up do
# code doesn't reach here
apart from that, the verification is working - ie I can successful verify an interaction that requires no set up.
Any help or advice appreciated TIARachel Bingham
03/25/2022, 4:08 PMRealApp
Apparently we don't normally run a real server for our rspec tests (except for system/capybara ones).
When I try to authenticate a user i get this
# RuntimeError: Invalid strategy current_user
# from /Users/rachelbingham/.rbenv/versions/2.7.4/lib/ruby/gems/2.7.0/gems/warden-1.2.9/lib/warden/proxy.rb:385:in `_fetch_strategy'
Just wondering if you have any insight on how I might configure this so I can authenticate requests realistically?Alejandro Vélez-Calderón
04/07/2022, 5:11 PMENV['CI_BUILD_URL']
in this example in the docs https://docs.pact.io/implementation_guides/ruby/publishing_pacts is this supposed to be the Pact URI of the generated pact? In buildkite for example, this ENV will be auto populated with the url of the job, but the provider rake task needs the Pact URI if I’m not mistaken.Jason Wang
04/07/2022, 7:25 PMYesi (she/her)
05/03/2022, 7:03 PMRafi Gemhar
05/10/2022, 3:31 PMThomas
06/01/2022, 8:39 AM2
of the pact specification is supported by pact-ruby
.
Are any GitHub issues or Milestones to track the progress towards the support of version 3
or 4
of the specification?Britton Sparks
06/01/2022, 3:21 PMWARN: Currently only 1 provider state is supported. Ignoring
additionally, despite that warning, both provider states do seem to run.
am I missing something obvious?Jean Paiva
06/14/2022, 12:33 PM\
on each time a quote appear. Is there a way to deal with a situation like this, maybe treat the response before comparing them?
What I am expecting (example):
{"foo":"bar"}
what I am getting:
{\"foo\":\"bar\"}
Is this something I can fix with the pact-provider-verifier or I would need to fix with my provider?Santiago MartĂ
06/15/2022, 6:35 PMSantiago MartĂ
06/22/2022, 5:38 PMMassimiliano De Vivo
08/02/2022, 12:14 PMBritton Sparks
08/11/2022, 4:05 PMAlejandro Vélez-Calderón
08/15/2022, 8:01 PM->
)? Would it be helpful to add examples of how to do that in here? https://github.com/pact-foundation/pact-ruby/wiki/FAQ I’m willing to help 🙂Alejandro Vélez-Calderón
08/23/2022, 6:27 PMhonours_pact_with
block that references local files and honours_pacts_from_pact_broker
for CI/CD ? or is it preferred to abstract the local verification with a custom task like -> https://docs.pact.io/implementation_guides/ruby/verifying_pacts#using-a-custom-pactverify-task ?Patrick Badley
09/19/2022, 7:42 PMKellie Persson
09/23/2022, 6:13 PMcircumstance-1.0.0
gem to setup state for me.
Do I need to do any special setup to gain access to these gems inside the provider state files? Thank you for you helpful. Excited to get this POC going.Slackbot
10/24/2022, 4:13 PMPatrick Badley
10/26/2022, 3:04 PMKellie Persson
11/14/2022, 11:51 PMyou will need to create a dev/test only HTTP endpoint that accepts a JSON document that looks like:
```{
"consumer": "CONSUMER_NAME",
"state": "PROVIDER_STATE"
}```
The following flag is required when running the CLI:
•Does my test only endpoint need to access a body in the request that I can pass in- the full url of the endpoint which sets the active consumer and provider state.--provider-states-setup-url
CONSUMER_NAME
and PROVIDER_STATE
or is the url just supposed to pass up those values as parameters in order to pass along w/ --provider-states-setup-url
?
Once I correctly parse the consumer and state, what do I need to do in my controller to properly load the provider state?
Thank you in advance for any and all assistance.Steve T
11/16/2022, 4:32 AMSteve T
11/16/2022, 5:57 AM