You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a pact file which has been badly generated by a consumer test written in javascript which has duplicate headers in one interaction's request e.g.:
When I run pact-provider-verifier --enable-pending on that pact (which has been uploaded on a pact broker beforehand), I get this error:
in `check_for_invalid': Duplicate header found (Content-Type and content-type. Please use a comma separated single value when multiple headers with the same name are required. (Pact::DuplicateHeaderError)
Full stack trace
/Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-support-1.20.0/lib/pact/consumer_contract/headers.rb:45:in `check_for_invalid': Duplicate header found (Content-Type and content-type. Please use a comma separated single value when multiple headers with the same name are required. (Pact::DuplicateHeaderError) from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-support-1.20.0/lib/pact/consumer_contract/headers.rb:10:in `block in initialize' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-support-1.20.0/lib/pact/consumer_contract/headers.rb:9:in `each_pair' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-support-1.20.0/lib/pact/consumer_contract/headers.rb:9:in `initialize' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-support-1.20.0/lib/pact/shared/request.rb:15:in `new' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-support-1.20.0/lib/pact/shared/request.rb:15:in `initialize' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-support-1.20.0/lib/pact/consumer_contract/request.rb:24:in `initialize' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-support-1.20.0/lib/pact/consumer_contract/request.rb:20:in `new' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-support-1.20.0/lib/pact/consumer_contract/request.rb:20:in `from_hash' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-support-1.20.0/lib/pact/consumer_contract/interaction_v3_parser.rb:52:in `parse_request_with_non_string_body' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-support-1.20.0/lib/pact/consumer_contract/interaction_v3_parser.rb:35:in `parse_request' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-support-1.20.0/lib/pact/consumer_contract/interaction_v3_parser.rb:15:in `call' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-support-1.20.0/lib/pact/consumer_contract/interaction_parser.rb:20:in `parse_v3_interaction' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-support-1.20.0/lib/pact/consumer_contract/interaction_parser.rb:11:in `call' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-support-1.20.0/lib/pact/consumer_contract/interaction.rb:22:in `from_hash' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-support-1.20.0/lib/pact/consumer_contract/http_consumer_contract_parser.rb:16:in `block in call' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-support-1.20.0/lib/pact/consumer_contract/http_consumer_contract_parser.rb:16:in `each' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-support-1.20.0/lib/pact/consumer_contract/http_consumer_contract_parser.rb:16:in `each_with_index' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-support-1.20.0/lib/pact/consumer_contract/http_consumer_contract_parser.rb:16:in `each' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-support-1.20.0/lib/pact/consumer_contract/http_consumer_contract_parser.rb:16:in `collect' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-support-1.20.0/lib/pact/consumer_contract/http_consumer_contract_parser.rb:16:in `call' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-support-1.20.0/lib/pact/consumer_contract/consumer_contract.rb:45:in `block in from_hash' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-support-1.20.0/lib/pact/consumer_contract/consumer_contract.rb:44:in `each' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-support-1.20.0/lib/pact/consumer_contract/consumer_contract.rb:44:in `from_hash' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-support-1.20.0/lib/pact/consumer_contract/consumer_contract.rb:52:in `from_json' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-1.64.0/lib/pact/provider/rspec.rb:27:in `honour_pactfile' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-1.64.0/lib/pact/provider/pact_spec_runner.rb:136:in `block in initialize_specs' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-1.64.0/lib/pact/provider/pact_spec_runner.rb:128:in `each' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-1.64.0/lib/pact/provider/pact_spec_runner.rb:128:in `initialize_specs' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-1.64.0/lib/pact/provider/pact_spec_runner.rb:35:in `run' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-1.64.0/lib/pact/cli/run_pact_verification.rb:70:in `run_with_pact_uri_object' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-1.64.0/lib/pact/cli/run_pact_verification.rb:51:in `run_specs' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-1.64.0/lib/pact/cli/run_pact_verification.rb:21:in `call' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-1.64.0/lib/pact/cli/run_pact_verification.rb:13:in `call' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-provider-verifier-1.38.0/lib/pact/provider_verifier/app.rb:181:in `verify_pact' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-provider-verifier-1.38.0/lib/pact/provider_verifier/app.rb:50:in `block in pacts_pass_verification?' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-provider-verifier-1.38.0/lib/pact/provider_verifier/app.rb:49:in `collect' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-provider-verifier-1.38.0/lib/pact/provider_verifier/app.rb:49:in `pacts_pass_verification?' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-provider-verifier-1.38.0/lib/pact/provider_verifier/app.rb:41:in `call' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-provider-verifier-1.38.0/lib/pact/provider_verifier/app.rb:34:in `call' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-provider-verifier-1.38.0/lib/pact/provider_verifier/cli/verify.rb:49:in `verify' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/thor-1.3.0/lib/thor/command.rb:28:in `run' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/thor-1.3.0/lib/thor/invocation.rb:127:in `invoke_command' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/thor-1.3.0/lib/thor.rb:527:in `dispatch' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/thor-1.3.0/lib/thor/base.rb:584:in `start' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/vendor/ruby/3.2.0/gems/pact-provider-verifier-1.38.0/lib/pact/provider_verifier/cli/custom_thor.rb:17:in `start' from /Users/romain.letendart/.virtualenvs/cool-project/lib/python3.11/site-packages/pact/lib/app/pact-provider-verifier.rb:33:in `<main>'
⚠️ But then pact-provider-verifier just stops with a non-zero exit status code even though the pact is marked as:
"verificationProperties": {
"pending": true,
Configuration
Using pact-provider-verifier (1.38.0) through pact-python==2.2.2
Context
I have a pact file which has been badly generated by a consumer test written in javascript which has duplicate headers in one interaction's request e.g.:
When I run
pact-provider-verifier --enable-pending
on that pact (which has been uploaded on a pact broker beforehand), I get this error:in `check_for_invalid': Duplicate header found (Content-Type and content-type. Please use a comma separated single value when multiple headers with the same name are required. (Pact::DuplicateHeaderError)
Full stack trace
pact-provider-verifier
just stops with a non-zero exit status code even though the pact is marked as:Configuration
pact-provider-verifier (1.38.0)
throughpact-python==2.2.2
Gemfile.lock
The text was updated successfully, but these errors were encountered: