Noor Hashem
02/21/2023, 3:33 PMError retrieving <https://applyboard>.<name>.io status=401 Unauthorized. Please see <https://docs.pactflow.io/docs/login-help> for more information. (Pact::Error)
I have already followed the steps outlined here: https://docs.pactflow.io/docs/login-help/#getting-a-401-unauthorized-when-publishing-or-verifying-pacts
Package should be up to date, i'm using pact gem version 1.32. Using the read/write token from pactflow. And I followed the provider code in pact_helper.spec here: https://docs.pactflow.io/#configuring-your-api-tokenMatt (pactflow.io / pact-js / pact-go)
Noor Hashem
02/21/2023, 10:31 PMMatt (pactflow.io / pact-js / pact-go)
Authorization: Bearer xyz
header in thereMatt (pactflow.io / pact-js / pact-go)
Noor Hashem
02/21/2023, 11:52 PMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Noor Hashem
02/22/2023, 3:45 PMbundle exec rake pact:verify
to try and verify pacts. In the Rakefile i've added : require 'pact/tasks'
My pact_helper.rb file looks like:
require 'pact/provider/rspec'
require "./spec/pact/provider_states_for_order_item_categories"
Pact.service_provider "monolith" do
app_version "7c264ed3c871a8d34e7f9e56cd18aec441e0be06"
publish_verification_results 'true'
honours_pacts_from_pact_broker do
verbose true
pact_broker_base_url "https://<ORG>.<http://pactflow.io|pactflow.io>", { token: "<READ/WRITE TOKEN>" }
end
end
Then in the spec/pact/provider_states_for_order_item_categories.rb
I have:
equire "rails_helper"
Pact.provider_states_for "testDemo_platform_payment_service" do
provider_state "All order item categories are present" do
set_up do
student = create(:student)
sign_in student
end
end
end
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Noor Hashem
02/22/2023, 11:06 PMMatt (pactflow.io / pact-js / pact-go)
bundle update
will tell you how far off the mark you might beBeth (pactflow.io/Pact Broker/pact-ruby)