Questions tagged [pact]

Pact is a cross-language tool that provides Consumer Driven Contracts testing.

A Contract is a collection of agreements between a client (Consumer) and an API (Provider) that describes the interactions that can take place between them.

Consumer Driven Contracts is a pattern that drives the development of the Provider from its Consumers point of view.

Pact is a testing tool that guarantees those Contracts are satisfied.

pact.io

658 questions
2
votes
1 answer

Trying to initialize kadena token on testnet - readrow error Database error

I am receiving this error when trying to initialize a token contract on kadena. I am using free.mykeyset name in the define and enforce keysetname in read Calling transaction , tried using the signer "keysetname" as well as the full non k public…
2
votes
2 answers

Storing and retrieving a module reference in PACT

I have an interface which is implemented by a module. (interface my_interface (defun balance:decimal()) ) (module IMPL 'admin (implements my_interface) (defun balance:decimal() 1.1) ) In another module, I have a schema which includes a…
datoga
  • 103
  • 8
2
votes
1 answer

How to return a bad request (400, 500) with Pact in Go?

I'm working in the adoption of Pact in my company, but on Golang, we hit a hurdle on the basic case where a consumer as 2 states for one endpoint: Given("A product with id 1 exists"). Given("A product with id 2 doesn't exists"). Our trouble is on…
Édouard Lopez
  • 40,270
  • 28
  • 126
  • 178
2
votes
1 answer

OpenAPI Generator vs. CDC Testing with Pact

We're overhauling our frontend and backend service contract reliability and are investigating two tools/techniques that seem to conflict. Consumer and provider code generation from an OpenAPI Spec (OAS) with a tool like openapi generator vs.…
2
votes
1 answer

PACT - Contract deployment in Chainweaver, issue resolving for Fungible-v2.Account-Details

getting acquainted with chainweaver and pact for deploying. I cannot get to deployment, i have an error when forking anedak or coin.pact to deploy. I load fungible-v2 into my repl as it is required, and go to deploy with my admin-keyset as defined.…
2
votes
1 answer

How can I mint a very limited number of NFTs on Kadena blockchain using pact smart contract?

I want to mint only a few NFT tokens on Kadena blockchain that I want to use as a giveaway for full access to my platform. I do not want to create my own coin on Kadena for now. I have seen their Pact smart contract for KIP-0011 named…
Abd
  • 21
  • 3
2
votes
1 answer

How to use testnet with Zelcore?

How do I test on the Zelcore test net? In Chainweaver I can explicitly select testnet and have all the transactions go that way. However , I can't select "testnet" from Zelcore.
Kitty Kad
  • 412
  • 1
  • 7
2
votes
1 answer

Contract testing with Kafka in Python environment?

I am working with multiple applications that communicate asynchronously using Kafka. These applications are managed by several departments and contract testing is appropriate to ensure that the messages used during communication follow the expected…
Zeruno
  • 1,391
  • 2
  • 20
  • 39
2
votes
1 answer

How to pass multiple consumer names in pact provider JUnit test

Using the pact provider JUnit 5/Spring Boot support annotations, perhaps I am not searching well for the answer... I'm wondering if it's possible to annotate a pact provider verification test with multiple consumers using the @Consumer…
madeyejm
  • 472
  • 3
  • 14
2
votes
1 answer

How to add matching rules to a PACT when using a PACT-builder?

Using the PACT-builder for consumer in a consumer-driven test, I try to build a pact and generate the contract as a json file (in a target folder by default). @ExtendWith(PactConsumerTestExt.class) @PactTestFor(providerName = "foo-provider") class…
AVEH
  • 21
  • 2
2
votes
1 answer

How to force Pact producer to verify a specific contract version?

I have a consumer that generated the first version of the Pact contract and it uploaded it to the broker. The producer verified that the contract and the verification were published to the broker. Now I want to extend the contract. When I publish…
mgryszko
  • 556
  • 4
  • 12
2
votes
1 answer

How to turn Pact HTTP Request interactions into Curl

I've been looking for a way to turn interactions for my Pact tests into a cUrl to easy debugging but not sure how to do that please.
Francislainy Campos
  • 3,462
  • 4
  • 33
  • 81
2
votes
2 answers

How to verify PACT when data returns items with or without children (filled in or no existing array)

I'm using PACT and Java for contract tests and my issue is that I have an api where the items may come up like this: [ { "programCode": "ELA_NGL_G7_TX", "contentResources": [ { "tocPosition": 1827, "contentIdentifier":…
Francislainy Campos
  • 3,462
  • 4
  • 33
  • 81
2
votes
2 answers

Pact dependency stopping tests being run

Pact depends on a package called make-error-cause. In its index.js it declares a method, then a var immediately afterwards with the same name. Jest/Typescript does not like this. NOTHING we do will allow our test to run when ran with Jest, we…
notAChance
  • 1,360
  • 4
  • 15
  • 47
2
votes
0 answers

mvn returns no tests found message on running junit5 contract tests

I have a few pact tests written in junit5. I'm trying to run the tests using mvn surefire:test@pact-test but with no luck. I'm getting the message No tests to run. Please any help is much appreciated [INFO] Building provider1 1.0.0 [INFO]…
Denis S.
  • 451
  • 1
  • 5
  • 19