GitHub
10/11/2023, 2:54 AM<https://github.com/pact-foundation/pact-python/tree/master|master>
by JP-Ellis
<https://github.com/pact-foundation/pact-python/commit/6509894c686941ad2792ce819cc10ce65c76f9af|6509894c>
- chore: fix hatch test scripts
<https://github.com/pact-foundation/pact-python/commit/2d3914338453620472d181ab8bc9348b251592de|2d391433>
- chore(test): add pytest options in root
<https://github.com/pact-foundation/pact-python/commit/aa69a201f4a4cf080cbdd06c100e186e1ef7239f|aa69a201>
- fix(test): ignore internal deprecation warnings
pact-foundation/pact-pythonGitHub
10/11/2023, 5:29 AMSandy
10/11/2023, 8:16 PMheader = ['Authorization: Bearer ejy.....']
verifier.verify_pacts(interactions, headers=header, log_dir='/var/tmp/', log_level='DEBUG')
I am getting following error
Failure/Error: replay_interaction, options[:request_customizer]
EOFError: end of file reached
#<venv_path>/pact/lib/ruby/lib/ruby/3.2.0/forwardable.rb240in ``custom_request``
Am i missing any setting? This used to work fine when the service was authenticated using SPNEGOBeth (pactflow.io/Pact Broker/pact-ruby)
GitHub
10/11/2023, 10:54 PMBeth (pactflow.io/Pact Broker/pact-ruby)
GitHub
10/11/2023, 10:54 PMBeth (pactflow.io/Pact Broker/pact-ruby)
GitHub
10/11/2023, 10:55 PMBeth (pactflow.io/Pact Broker/pact-ruby)
GitHub
10/11/2023, 10:56 PMpulls
, commits
, releases
, deployments
Beth (pactflow.io/Pact Broker/pact-ruby)
GitHub
10/11/2023, 10:56 PMpulls
, releases
, deployments
Beth (pactflow.io/Pact Broker/pact-ruby)
GitHub
10/11/2023, 10:56 PMGitHub
10/12/2023, 4:12 AMGitHub
10/24/2023, 12:20 AMRuth
10/30/2023, 8:57 PMCody Jenkins
11/01/2023, 2:39 AMGitHub
11/03/2023, 2:44 AMGitHub
11/03/2023, 3:21 AMGitHub
11/03/2023, 3:21 AMGitHub
11/03/2023, 4:00 AMRadek Stolarczyk
11/21/2023, 12:23 PM@ExtendWith(PactConsumerTestExt.class)
@PactTestFor(providerName = "ProviderCDCT",
providerType = ProviderType.ASYNCH,
pactVersion = PactSpecVersion.V3)
public class ConsumerContractTest {
@Pact(consumer = "ConsumerCDCT")
public MessagePact createMyPact(MessagePactBuilder builder) {
Map<String, String> metadata = new HashMap<>();
metadata.put("content-type", "application/json");
DslPart sqsBody = new PactDslJsonBody()
.stringType("messageId", "1")
.stringValue("receiptHandle", "testRadek")
.stringType("eventSource", "aws:sqs")
.stringType("awsRegion", "us-east-1")
.object("messageAttributes")
.closeObject();
return builder
.expectsToReceive("a message with information")
.withMetadata(metadata)
.withContent(sqsBody)
.toPact();
}
//This method is needed to create the pact files.
@Test
@PactTestFor(pactMethod = "createMyPact")
public void testMyMethod(List<Message> messages) {
}
}
My Provider Class:
@PactBroker(scheme = "https", host = "",
authentication = @PactBrokerAuth(token = ""))
@Provider("ProviderCDCT")
@Consumer("ConsumerCDCT")
public class ProviderContractTest {
private final ObjectMapper objectMapper = new ObjectMapper();
@BeforeEach
public void setUp(PactVerificationContext context) {
context.setTarget(new MessageTestTarget(List.of("Provider")));
System.setProperty("pact.verifier.publishResults",
System.getenv("PACT_BROKER_PUBLISH_VERIFICATION_RESULTS") == null ? "true" : "true");
}
@TestTemplate
@ExtendWith(PactVerificationInvocationContextProvider.class)
void testTemplate(PactVerificationContext context) {
context.verifyInteraction();
}
@PactVerifyProvider("a message with information")
public MessageAndMetadata providerMessage() throws Exception {
Map<String, String> metadata = new HashMap<>();
metadata.put("content-type", "application/json");
Map<String, Object> mainMessage = new HashMap<>();
mainMessage.put("messageId", "");
mainMessage.put("receiptHandle", "testRadek");
mainMessage.put("eventSource", "aws:sqs");
mainMessage.put("awsRegion", "us-east-1");
mainMessage.put("messageAttributes", new HashMap<>());
return new MessageAndMetadata(objectMapper.writeValueAsBytes(mainMessage), metadata);
}
}
Slackbot
11/21/2023, 12:23 PMGitHub
11/22/2023, 10:23 PMGitHub
11/22/2023, 11:33 PMGitHub
11/26/2023, 10:51 PMLukasz
11/29/2023, 6:54 AMpavan kumar s
11/30/2023, 11:08 AM