mboudreau
2018-03-26 10:39
has joined #pact-node

mboudreau
2018-04-30 23:17
@matt.fellows what's your thoughts on this security hole workaround?

matt.fellows
2018-04-30 23:17
has joined #pact-node

mboudreau
2018-05-02 05:10
/github unsubscribe pact-foundation/pact-node commits

sgleadow
2018-05-09 07:07
has joined #pact-node

slack1
2018-05-09 20:00
has joined #pact-node

brentbarker9
2018-05-09 20:57
has joined #pact-node

rgshah781988
2018-05-16 07:26
has joined #pact-node

mboudreau
2018-05-29 22:20
welp, that was easy :slightly_smiling_face:

matt.fellows
2018-05-30 02:39
:slightly_smiling_face:

mboudreau
2018-05-31 10:07
@matt.fellows could you review this PR please?

g.r.mccann
2018-05-31 10:39
has joined #pact-node

matt.fellows
2018-05-31 10:44
Will do @mboudreau

matt.fellows
2018-05-31 10:45
Likely this weekend, I'm unfortunately having to drive to my client at the moment, so no train time to do the things as I had before

mboudreau
2018-05-31 10:49
It's really not big...

matt.fellows
2018-05-31 13:25
LGTM:rocket:

dervis4
2018-06-07 08:32
has joined #pact-node

liran.tal
2018-07-05 05:23
has joined #pact-node

bsayers
2018-07-11 08:01
has joined #pact-node

matt.fellows
2018-07-13 05:58
@mboudreau haven?t changed anything recently have we?


matt.fellows
2018-07-13 05:58
Weirdly, publish failed but build was green?

matt.fellows
2018-07-13 05:59
OK, looks like this was it. Man, lots of working for just bumping a version :smile:

mboudreau
2018-07-13 06:39
jebus, security breach at npm?

mboudreau
2018-07-13 06:40
I can create a new api key and put it in the repo if you don't know how

matt.fellows
2018-07-13 07:06
all good, it?s done sir

mboudreau
2018-07-13 07:06
thanks :slightly_smiling_face:

matt.fellows
2018-07-13 07:06
:smile:

matt.fellows
2018-07-13 07:06
np

antonello
2018-08-04 11:55
has joined #pact-node

david.dyke
2018-08-06 06:35
has joined #pact-node

antonios.klimis
2018-08-08 09:43
has joined #pact-node

kurst03
2018-08-09 00:29
has joined #pact-node

codypumper
2018-08-09 20:20
has joined #pact-node

tjones
2018-08-10 06:57
has joined #pact-node

tjones
2018-08-10 06:58
@mboudreau - would you mind if I finish off the `can-i-deploy` branch that you started in `pact-node`? I have some time to spend on it, but don't want to step on your toes

mboudreau
2018-08-10 11:36
Go for it. I'm on vacation right now

nathanrobert.smith
2018-08-13 12:35
has joined #pact-node

david.dyke
2018-09-05 03:24
I'm just implementing verification of pacts on a new node based microservice, there are no pacts on my broker because the microservice is new and my tests fail because of it. Therefore I'm in a chicken and egg situation. I can't deploy my new provider microservice until I have a consumer, but I can't deploy my consumer microservice until I have a provider. Is there a way to not error if no pacts exist?

zackary.mccolgan
2018-09-20 17:12
has joined #pact-node

liran.tal
2018-09-30 19:02
@matt.fellows is there a more convenient way to access the `can-i-deploy` util (which belongs to pact-broker) than to use the `find ./ -name pact-broker` trick? maybe it can be easily symlinked as a binary for pact-node or something?

matt.fellows
2018-09-30 21:33
There is an issue in pact node to do just this.

matt.fellows
2018-09-30 21:34
But short answer is no

matt.fellows
2018-09-30 21:34
It should be pretty straightforward


fraser.crichton.devel
2018-10-04 23:23
has joined #pact-node

liran.tal
2018-10-06 20:07
thanks @tjones, I?ll take a look

liran.tal
2018-10-06 20:08
Should the `Verified` export from pact-node be able to work with a broker URL that is available on HTTP-only? Has this been tested?

liran.tal
2018-10-06 20:08
Since I?m getting an issue of `Unable to find pacts for this provider` which I saw was opened recently too with regards to SSL and self-signed certs.

matt.fellows
2018-10-07 05:37
@liran.tal it definitely should work with http only. If it?s not that?s either an issue with the setup, or a bug in our code

liran.tal
2018-10-07 05:40
I'm working with the pact broker docker setup, is there an easy way for me to debug what's going on? I'm pretty sure I spelled the provider just fine

matt.fellows
2018-10-07 05:40
hmm

matt.fellows
2018-10-07 05:41
probably the easiest way is to tail the logs, which I assume you?re doing? I think the default logs are set to `DEBUG` too, which should be pretty verbose

liran.tal
2018-10-07 07:06
actually I?m not seeing anything from the broker container, only from nginx: `nginx_1 | 172.24.0.1 - - [07/Oct/2018:06:37:35 +0000] "GET / HTTP/1.1" 200 2118 "-" "-" "-"`

kashikar.harsh
2018-10-08 11:29
has joined #pact-node

kashikar.harsh
2018-10-08 11:29
hi all Facing an issue with pact verification, getting below error Pact verification failed! Actual interactions do not match expected interactions for mock MockService. I understand this is because the request is executed before the interactions were added however I have added done to my interactions, still getting this error

mboudreau
2018-10-08 11:32
hi harsh, can you post a code sample? Kinda hard to debug if we don't see anything :stuck_out_tongue:

kashikar.harsh
2018-10-08 11:36
Hi @mboudreau, this is the relevant code, lt me know if you need to have a look at entire source file

matt.fellows
2018-10-08 11:44
?we?ll need the whole thing, and probably more

matt.fellows
2018-10-08 11:45
more importantly, the pact log file

kashikar.harsh
2018-10-08 11:49
Please let me know if you need more information

matt.fellows
2018-10-08 11:53
OK so the error in the pact log is telling you what went wrong: you haven?t hit the pact mock server at `/apigw/v1/register`

matt.fellows
2018-10-08 11:53
You code `fetchRegisteredServices` might be running, but presumably it hasn?t been configured to hit the Pact mock server (which you?ve configured to be running at `http://localhost:1234`).

matt.fellows
2018-10-08 11:54
Make your code configurable so that you can switch out the API endpoint from the live one to the mock one and you should be good

kashikar.harsh
2018-10-08 11:54
nope, it is running against the actual API endpoint

kashikar.harsh
2018-10-08 11:54
I am not mocking provider here

matt.fellows
2018-10-08 11:55
Yes, that?s why it?s failing

matt.fellows
2018-10-08 11:55
Pact needs to be the mock

kashikar.harsh
2018-10-08 11:55
ahh

matt.fellows
2018-10-08 11:55
:slightly_smiling_face:

kashikar.harsh
2018-10-08 11:55
thanks for the clarification

matt.fellows
2018-10-08 11:55
np

kashikar.harsh
2018-10-08 11:55
follow-up question is

matt.fellows
2018-10-08 11:55
Pact needs to be able to know what is going on, so that a) it can properly write the pact to file and b) to confirm your assumptions about your code are correct

kashikar.harsh
2018-10-08 11:56
I want this to run as part of CI, and there are many check-ins going on which will trigger these contract tests in parallel

kashikar.harsh
2018-10-08 11:57
how can I tell mock to use different port for each trigger?

kashikar.harsh
2018-10-08 11:57
is there a known solution for this?

matt.fellows
2018-10-08 11:59
there are plenty of ways to generate random ports


matt.fellows
2018-10-08 11:59
is that what you mean?

kashikar.harsh
2018-10-08 11:59
is this the standard way of doing it in CI?

kashikar.harsh
2018-10-08 11:59
I am not sure about best practices, hence asking

matt.fellows
2018-10-08 12:00
well, one way is to always run within a docker container and use the same port (but don?t expose it to the host). This should prevent conflicts

matt.fellows
2018-10-08 12:00
the other is to grab a random port

kashikar.harsh
2018-10-08 12:01
ok, we are using docker so I will have to check how to achieve what you are saying with docker

kashikar.harsh
2018-10-08 12:01
is there a documentation for this?

kashikar.harsh
2018-10-08 12:01
Also, how to handle parameters in interactions?


kashikar.harsh
2018-10-08 12:02
After doing the change you suggested, I am getting below error

kashikar.harsh
2018-10-08 12:02
Expected "serviceName" but got "YxsrBDjrdYnE" at $.body.service_name

matt.fellows
2018-10-08 12:03
The error message is pretty clear - you expected `serviceName` but got something else


matt.fellows
2018-10-08 12:03
you mean query strings?

kashikar.harsh
2018-10-08 12:03
Thanks

matt.fellows
2018-10-08 12:04
np

matt.fellows
2018-10-08 12:04
if so, you want the `query` key (sibling of `status`, `path` etc.)

matt.fellows
2018-10-08 12:05
I have to run, but see how you go. There are lots of examples in the repo you might want to look through if running into issues, as well as previous issues

matt.fellows
2018-10-08 12:05
good luck!

kashikar.harsh
2018-10-08 12:06
Thanks a lot @matt.fellows

kashikar.harsh
2018-10-08 12:46
Again getting the same error with mock provider as well :disappointed:

kashikar.harsh
2018-10-08 12:47
First it logs missing interactions, however subsequently it logs that the matching request is found

kashikar.harsh
2018-10-08 12:47
it also writes a pact file

kashikar.harsh
2018-10-08 12:47
however tests are marked as failed

mboudreau
2018-10-08 13:36
just because pact got the interaction doesn't mean the test will pass. It depends very much on your test code

kashikar.harsh
2018-10-08 13:39
my question is that why it is saying missing request

kashikar.harsh
2018-10-08 13:39
?

kashikar.harsh
2018-10-08 14:43
Can someone please guide me what I am missing here?

kashikar.harsh
2018-10-08 14:50
I have written a very straight forward expect condition to keep it simple

kashikar.harsh
2018-10-08 14:50
expect(res.status).to.equal(200)

kashikar.harsh
2018-10-08 14:50
still it is failing

matt.fellows
2018-10-08 19:49
It looks like your test code is calling verify before the test case runs. It seems to hit the mock server in the wrong sequence

matt.fellows
2018-10-08 19:51
I think the top level it block (that runs verify) is running before you're describe block. You also only ever register the interaction once at the top level, which looks to be incorrect. You probably want to group each test with it's own register and test assertion

matt.fellows
2018-10-08 19:52
Look at the examples in the repository for best practices in simplifying this setup

kashikar.harsh
2018-10-11 06:59
Any pointers to debug this error

kashikar.harsh
2018-10-11 06:59
Uncaught Error: Unhandled Promise Rejection: TypeError: re.exec is not a function

tjones
2018-10-22 03:39
where is it being triggered?

kashikar.harsh
2018-10-22 10:24
I managed to figure this out, in response to one of the request I was using open api spec which was causing this issue.

kashikar.harsh
2018-10-22 10:24
Thanks for responding :slightly_smiling_face:

tjones
2018-10-23 05:21
@mboudreau Did the publish work correctly? I can see it in the travis log, but not in npm. I thought npm publishes were immediate..

mboudreau
2018-10-23 06:02
it says 6.20.0 for me :slightly_smiling_face:

matt.fellows
2018-10-23 06:06
I got the notification too

liran.tal
2018-10-26 07:58
with regards to provider contract testing - I guess it seems redundant to do the pact verifier as part of a testing suite?? - there?s anyway one method that works through all the interactions (i.e: pact.verify()) - due to the above we need to manually add timeouts (i.e: jest.setTimeout(30000)) for the test case because to download the contracts, spin up the runner, and verify everything all in one assertion takes more time than is usually set for a test case. it might be just convenient to use a test framework if its already there and just wrap it but probably not adding any further value than that?

matt.fellows
2018-10-26 10:53
> - there?s anyway one method that works through all the interactions (i.e: pact.verify()) We have some ideas of how to improve this too, because it would be much nicer to get granular feedback on each of the tests. In fact, Pact Go does this (but it?s easier there, because _most_ people just use the in-build `testing` package unlike Node, where there are 100's of test fraameworks to support) > it might be just convenient to use a test framework if its already there and just wrap it but probably not adding any further value than that? I?m not sure I follow, could you perhaps give an example of what you mean?

liran.tal
2018-10-26 11:24
about the first point with all the interactions - yeah that would be pretty interesting to be able to have a single test case for each interaction testing. thinking out loud, maybe pact can return an iterator of all interactions to verify, and then we can iterate it and build the test cases dynamically. maybe something like: ``` pact.verifierInteractions().forEach((interaction) => { test('interaction X', () => { interaction.verify() }) }); ``` would be great to see other alternatives too for this problem as the above isn?t ideal either.

liran.tal
2018-10-26 11:25
in my second bullet I meant that because there?s a test framework, we can wrap the pact.verify() inside a test case and because it fails, the test framework will catch it, error out, set exit status code to non-zero etc. Although in general, I could just have a plain test.js file with no test framework to run pact.verify() and call it like `node test.js`

matt.fellows
2018-10-26 11:45
gotcha

jeffm
2018-11-02 22:41
has joined #pact-node

nic
2018-11-06 13:10
has joined #pact-node

hima.sanagavarapu
2018-11-09 16:19
has joined #pact-node

hima.sanagavarapu
2018-11-09 16:25
Hi, I am new to contract tests and I am trying to write contract tests in NodeJS. I am following pact documentation, which has 3 links for JS support. Three links talks little bit differently. Can you give me right link

liran.tal
2018-11-09 19:17
@hima.sanagavarapu you can check the example projects in pact-js: https://github.com/pact-foundation/pact-js/tree/master/examples/ there are multiple types of checks to get you started with what you might be familiar more

liran.tal
2018-11-09 19:17
and also welcome :slightly_smiling_face:

nic
2018-11-19 17:44
hey - just wondering if anyone is now successfully running pact-node stuff on docker alpine images? I'm still having issues with the standalone ruby not working


nic
2018-11-19 17:45
I've followed the steps in this issue https://github.com/pact-foundation/pact-js/issues/154 to add glibc to my alpine image but it hasn't helped

nic
2018-11-20 09:17
@matt.fellows any ideas?

matt.fellows
2018-11-21 05:16
Hey Nic, sorry I?ve been travelling with very intermittent/poor WiFi access. I?ll take a quick look now

nic
2018-11-21 07:06
no worries, I know this has come up before. last time I just ended up switching to a glibc based distro to get it working but we?re pushing this out to production now and people are unhappy with huge docker images kicking around.

borsuk.artem034
2018-11-21 15:35
has joined #pact-node

jjlehva
2018-12-13 08:05
has joined #pact-node

jdesouza
2019-01-03 17:06
has joined #pact-node

yousafn
2019-01-04 11:09
has joined #pact-node

ilya.markevich1991
2019-01-05 21:08
has joined #pact-node

vitaliy.grigoruk
2019-02-01 09:48
has joined #pact-node

rjmcguinness
2019-02-08 09:52
has joined #pact-node

rafael.anachoreta
2019-02-19 16:41
has joined #pact-node

rafael.anachoreta
2019-02-19 16:55
hello! how am I supposed to use `latest` in `canDeploy()`? I?ve tried adding the participant and latest, but I keep getting ``` TypeError: Must provide the same number of pacticipant and version ``` ``` const checkProvider = { pactBroker: "http://localhost", pacticipant: ["service"], latest: ["f54201e8"], //tried true, "", "master" }; ``` and when I add the pacticipant version to the mix I get `Error: A version number and latest flag cannot both be specified for service`

mboudreau
2019-02-19 22:10
hm, can you create a github issue? I can have a peek at it, but there might be something wrong with the code itself after a quick glance. Thanks.

rafael.anachoreta
2019-02-20 08:47
will do it a bit later :slightly_smiling_face: cheers

m.r.green
2019-02-25 09:06
has joined #pact-node

kajan.siva
2019-02-25 14:51
has joined #pact-node

sergiy
2019-03-17 14:34
has joined #pact-node

vtambourine
2019-03-28 13:56
has joined #pact-node

vtambourine
2019-03-28 13:56
Hi everyone, It might be weird question, but why you ignore `package-lock.json` file?

matt.fellows
2019-03-28 19:38
do you mean, why does pact-node not check it in?

anothonyvong
2019-03-28 20:55
has joined #pact-node

vtambourine
2019-03-28 21:00
Yes, exactly.

matt.fellows
2019-03-28 21:13
I think historically it was an issue, there is probably evidence of this in our issues register. It might not be relevant now

mboudreau
2019-03-28 22:13
Yeah, we were seeing issues with optional and peer dependencies not loading properly because npm failed to account for that in package-lock

matt.fellows
2019-03-28 23:04
Is it causing you issues now? It probably could be added back in now, as Michel has changed the way we install the package to be more cross-OS compatible. It was a constant pain point

mboudreau
2019-03-28 23:05
yep, it's a good point, but it will only affect contributors though

mboudreau
2019-03-28 23:06
I mean, even still, our package.json is extremely specific with versions

matt.fellows
2019-03-28 23:10
yep

matt.fellows
2019-03-28 23:10
I?m keen to understand if it _is_ causing issues

mboudreau
2019-03-28 23:11
you mean the package-lock file?>

mboudreau
2019-03-28 23:11
probably not anymore, hopefully...

matt.fellows
2019-03-28 23:13
ya

ian.mcwilliams
2019-04-16 14:48
has joined #pact-node

marc
2019-04-17 13:28
has joined #pact-node

ian.mcwilliams
2019-04-29 12:05
@ian.mcwilliams has left the channel

pascal.wilbrink
2019-04-29 20:34
has joined #pact-node

bethskurrie
2019-05-03 08:30
has joined #pact-node

rafael.anachoreta
2019-05-08 15:31
hey! I?m trying to run the can-i-deploy tools on my CI environment (Jenkins), and it correctly fails for a newly created consumer pact ``` [2019-05-08T15:22:03.137Z] WARN: pact-node@8.2.0/1208 on 14007e90723d: Pact exited with code 1. [2019-05-08T15:22:03.137Z] ERROR: pact-node@8.2.0/1208 on 14007e90723d: can-i-deploy did not return success message: Computer says no ¯\_(?)_/¯ CONSUMER | C.VERSION | PROVIDER | P.VERSION | SUCCESS? -------------------------|-----------|--------------|-----------|--------- consumer | d01f352 | provider | ??? | ??? There is no verified pact between version d01f352 of consumer and any version of provider ``` However, the Jenkins step does not actually fail, making me believe the error code is not being thrown


rafael.anachoreta
2019-05-08 15:34
any pointers on what could be going on?

matt.fellows
2019-05-08 22:15
hmmm

matt.fellows
2019-05-08 22:15
I?ll have to take a look. I wasn?t across the detail of this implementation, but I know there were some challenges

matt.fellows
2019-05-08 22:16
We?d obviously appreciate any fix if you can get to the bottom of it, but if you need to move quickly you could consider using the CLI tools directly for this purpose: https://github.com/pact-foundation/pact-ruby-standalone/releases

matt.fellows
2019-05-08 22:16
I don?t see a huge benefit in using the JS interface for this sort of thing, but I can see why people use it

matt.fellows
2019-05-08 22:19
You could consider using this docker image if that?s your thing: https://hub.docker.com/r/pactfoundation/pact-cli

mboudreau
2019-05-08 23:35
yeah, that's a good point. I think there was a light refactor and we lost the ability to exit out with an error code. @rafael.anachoreta are you using the CLI?

rafael.anachoreta
2019-05-09 07:50
sorry, different timezones for us I think :smile: I?m using the pact-node library and running it via node ``` const pact = require('@pact-foundation/pact-node'); const checkProvider = { ... }; pact.canDeploy(checkProvider); ```

matt.fellows
2019-05-09 07:52
What does canDeploy return? E.g. You might want to wrap it in an exit if it returns a rejected promise

rafael.anachoreta
2019-05-09 07:53
yeah it is a promise and catching it works I could throw the exit code from the catch block I guess

rafael.anachoreta
2019-05-09 07:57
I?ll try that and get back to you

matt.fellows
2019-05-09 07:57
:thumbsup:

matt.fellows
2019-05-09 07:58
OK, how do you think it should behave if not rejecting a promise? I?m not sure having it exit is the right thing to do

rafael.anachoreta
2019-05-09 07:58
it does claim to exit with code 1, which got me very confused `[2019-05-08T15:22:03.137Z] WARN: pact-node@8.2.0/1208 on 14007e90723d: Pact exited with code 1.`

matt.fellows
2019-05-09 07:59
ah, that?s the underlying Ruby process. I can see why that might be confusing


rafael.anachoreta
2019-05-09 08:28
ok so I think my problem was my lack of understanding on how Jenkins handles errors being thrown :thinking_face: I?ve made it so that my node scripts now exit when the promise is rejected and that solved it for me :slightly_smiling_face:

rafael.anachoreta
2019-05-09 08:29
thanks a lot still, do you think it is worth removing the ?exited with code 1? message? I can create an issue

rafael.anachoreta
2019-05-17 14:52
hey, me again :blush: I?m trying to use the can-i-deploy with on a node script, but now I?m having a Promise fail despite the verification passing :thinking_face: ``` [90m [36mcan-i-deploy did not return success message: Computer says yes \o/ CONSUMER | C.VERSION | PROVIDER | P.VERSION | SUCCESS? -------------------------|-----------|--------------|-------------|--------- consumer | 20c56aa | provider | unspecified | true [32mAll required verification results are published and successful[0m [39m [39mVerification failed! Error: Computer says yes \o/ CONSUMER | C.VERSION | PROVIDER | P.VERSION | SUCCESS? -------------------------|-----------|--------------|-------------|--------- consumer | 20c56aa | provider | unspecified | true [32mAll required verification results are published and successful[0m at ChildProcess.<anonymous> (/home/jenkins/workspace/te-service_iss26703-pact-ci-CULJR5ZNTXCJCA2PK3B4E3S4DS27Z6RXMCODFEKGL4CVV7KK6O4Q/node_modules/@pact-foundation/pact-node/src/can-deploy.js:63:40) at Object.onceWrapper (events.js:317:30) at emitTwo (events.js:131:20) at ChildProcess.emit (events.js:214:7) at maybeClose (internal/child_process.js:925:16) at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ```

rafael.anachoreta
2019-05-17 14:53
Here is my `can-i-deploy.js`: ``` const pact = require('@pact-foundation/pact-node'); const { commit } = require('./utils'); const checkProvider = { pactBroker: 'http://my-broker', participant: 'consumer', participantVersion: commit, //gets the commit hash retryWhileUnknown: 5, retryInterval: 10, }; pact.canDeploy(checkProvider).catch(err => { console.error('Verification failed!', err); return process.exit(1); }); ```

rafael.anachoreta
2019-05-17 14:53
What am I missing? Should I file a bug?


matt.fellows
2019-05-18 03:08
That certainly looks like a bug to me

matt.fellows
2019-05-18 03:10
I think _this_ PR might be there to address it


matt.fellows
2019-05-19 00:17
Hi @rafael.anachoreta, I?ve pushed out the latest updates to `pact-node` just now. Version `8.3.2` should be out soon

rafael.anachoreta
2019-05-20 07:48
whooo! That did it! :bow: thanks a lot again

matt.fellows
2019-05-20 07:49
:+1: awesome, you're welcome!

sankalan13
2019-05-23 05:18
has joined #pact-node

diandra
2019-05-28 00:22
has joined #pact-node

shalygai.a
2019-05-29 16:05
has joined #pact-node

phall
2019-06-03 13:16
has joined #pact-node

sgleadow
2019-06-10 23:09
@sgleadow has left the channel

aniela.cole
2019-06-12 16:25
has joined #pact-node

aniela.cole
2019-06-12 18:15
HI, I am using pact-node version `8.5.0` and looks like my provider api is returning `503 Service Temporarily Unavailable` My code: ```module.exports = (consumer) => { const options = { consumer: 'My consumer', provider: 'My provider', providerBaseUrl: 'https://someqabasepath.mycompany.com', pactBrokerUrl: 'https://myteampactbroker.pact.dius.com.au', providerVersion: '1.0.0', pactBrokerToken: '', validateSSL: false, consumerVersionTag: ['test'], publishVerificationResult: true, }; return new Verifier(options).verifyProvider(); }; ``` When requesting *through postman* the URL `providerBaseUrl + api path` I am getting 200. Am I missing something here?

phall
2019-06-12 19:57
I believe the providerBaseUrl should be in the form http://localhost:1234 - i.e. pointing to your local system running the pact provider code.

aniela.cole
2019-06-12 21:17
Yes, got it. wonder why it doesn't work using a deployed endpoint...

aniela.cole
2019-06-12 22:02
Also, using versions ``` "@pact-foundation/pact": "^7.0.2", "@pact-foundation/pact-node": "^6.20.0",``` it worked

matt.fellows
2019-06-12 22:09
It should definitely work pointing to a deployed endpoint, but it?s not recommended (when it comes to managing provider states that will be problematic)

matt.fellows
2019-06-12 22:10
And yes, you need the `@pact-foundation/pact` dependency (which uses `@pact-foundation/pact-node` under the hood)

aniela.cole
2019-06-12 22:20
yes, let me rephrase that, using `"@pact-foundation/pact": "^7.0.2"` it works, using `"@pact-foundation/pact": "^8.2.4"` it doesn't work....

matt.fellows
2019-06-12 22:21
This doesn?t sound right. If you enable `DEBUG` logs you should get some more information as to why it?s failing. If it?s a bug we can fix it.

matt.fellows
2019-06-12 22:22
It should definitely be able to talk to an external URL

aniela.cole
2019-06-12 22:24
I will DM you with the logs

matt.fellows
2019-06-12 22:30
thx

goncalo
2019-06-18 13:34
has joined #pact-node

whitehorse5353
2019-06-27 16:56
has joined #pact-node

whitehorse5353
2019-06-27 16:58
Hi @All, i am having a weird issue my query param is around 2588 char length of base65 encoded string some home pact breaks the url query param into two portions and fails my test any idea anyone ?

whitehorse5353
2019-06-27 17:00
versions of my package

whitehorse5353
2019-06-27 17:00
@pact-foundation/pact: 5.9.1 @pact-foundation/pact-node: 6.19.7

doxuantien
2019-06-28 03:35
has joined #pact-node

phall
2019-07-22 15:55
Has anyone seen this issue: ```Error while installing binary: Checksum rejected for file 'pact-1.63.0-osx.tar.gz' with checksum pact-1.63.0-osx.tar.gz.checksum``` I see the same issue happening on linux.

igordezky
2019-07-22 23:27
has joined #pact-node

matt.fellows
2019-07-22 23:30
Locally or on CI?

matt.fellows
2019-07-22 23:31
I've seen this when building pact node locally. You need to first compile the typescript project and then you're gold

matt.fellows
2019-07-22 23:31
Not as a consumer of package

phall
2019-07-23 13:18
It was both locally and CI. I ?fixed? it by deleting package-lock and re-generating it.

matt.fellows
2019-07-23 13:50
:+1:

pkuang
2019-08-05 19:34
has joined #pact-node

chuck
2019-08-19 01:03
has joined #pact-node

chuck
2019-08-19 01:04
I?ve been working on trying to setup an initial consumer pact, but I get this after creating the provider every time, ``` [2019-08-15T18:11:01.490Z] ERROR: pact-node@9.0.2/10536 on Chucks-MacBook-Pro.local: Pact Binary Error: /bin/sh: ./standalone/darwin-1.69.0/bin/pact-mock-service: No such file or directory ``` Can?t seem to find any related issues, but I?m running node v10.15.3 and this seems like this is a system issue?

matt.fellows
2019-08-19 05:41
Looks like the install hasn't worked correctly. There should be a binary with that name in node_modules. Can you check to see if it exists somewhere in the folder structure?

matt.fellows
2019-08-19 05:42
Just also confirming (pretty sure it's the case) that you're bit running this in docker?

matt.fellows
2019-08-19 05:42
Just double check the install output of pact-node (dependency of Pact) worked as expected and there were no errors

chuck
2019-08-19 14:04
I am not, just running it locally

chuck
2019-08-19 14:07
I see it in my node modues, but that path perhaps is the issue?

chuck
2019-08-19 14:22
uninstalled everything and now seems to run. Sorry, I should have tried that to begin with. Thank you!

matt.fellows
2019-08-19 22:14
Hehe all good!

kashikar.harsh
2019-08-20 14:05
Hey All

kashikar.harsh
2019-08-20 14:06
I am looking for adding support for non http based contracts in Python, I can see that this is already added in node

kashikar.harsh
2019-08-20 14:06
can someone please share some basic outline on how this is implemented

kashikar.harsh
2019-08-20 14:07
in the pact file, I do not see reference to provider method, how does provider know which method to call?


matt.fellows
2019-08-20 22:05
The interaction description is mapped to a function to invoke

jing.song
2019-08-29 23:59
has joined #pact-node

kashikar.harsh
2019-09-05 05:33
Hey guys, Just wanted to gather some thoughts on one of the use case we are trying to solve, any suggestions are much appreciated *Use Case:* We are already using pact to validate api contracts and now want to go one step ahead. The requirement is to check if as part of current release developments, are there any new APIs exposed and if so are there new contract tests written for them. The challenge is to detect if new APIs are written as part feature development and I am looking forward to any suggestions around that. One possible way is to go through all the code changes between previous release and now and get a diff, then run a regex to match pattern e.g. .get('/checkDate',), Looking for any feedback on above approach or if anyone has already solved this use case and can share how to go about it, it will help. Thank you everyone

matt.fellows
2019-09-11 05:59
:tada:

kiranpatel11
2019-09-16 21:11
has joined #pact-node

angela.gloyna
2019-09-26 06:03
has joined #pact-node

catrionamcgarvey
2019-09-29 00:22
has joined #pact-node

matt.fellows
2019-10-15 02:10
@tjones just going through the pact node stuff and noticed something which has been there a while - should `snyk` be a `devDependency` instead of a runtime one?

matt.fellows
2019-10-15 02:10
I?m guessing the latter, but it?s not. And I think it was the cause (or a transitive cause) of the related pact-js on Node v12 last week

tjones
2019-10-15 03:11
Hm. I'm not sure. `synk` is there because of their auto-PR process - it patches vulnerabilities that haven't been fixed in the packages yet. I think this means it needs to run after the install, so it needs to be a dependency

lwillmeth
2019-10-15 17:31
has joined #pact-node

stevi.deter
2019-10-21 20:28
has joined #pact-node

vitaliy.grigoruk
2019-10-22 15:11
Is there any particular reason why `snyk` is a runtime dependency for pact-node? It is definitely a devDependency

matt.fellows
2019-10-22 20:07
I asked this same question the other day. I believe it's supposed to be a dev one, but wasn't 100% confident. It's caused some issues recently so want to get it right.

matt.fellows
2019-10-22 20:08
I think it being a runtime dependency means it does some extra magic when installing in a target project (e.g. proxying bad dependencies) but not sure if it's intended to be that way

vitaliy.grigoruk
2019-10-22 20:27
I can?t think about any use-case why this should be a runtime dependency to be honest? I guess it was just added there by mistake

matt.fellows
2019-10-22 20:31
Good to know. I'll trawl through their docs today and get your PR in if I don't find any contrary evidence

matt.fellows
2019-10-22 20:31
Thank you

matt.fellows
2019-10-22 20:31
There's an issue on JS repo somewhere to track this

brandontylerwilliams
2019-10-27 20:33
has joined #pact-node

srinivasan.anusha
2019-10-28 22:51
has joined #pact-node

andreas
2019-11-01 09:47
has joined #pact-node

brendan.j.donegan
2019-11-21 16:01
has joined #pact-node

brendan.j.donegan
2019-11-21 16:02
Hi, just today I have started seeing this error when running Pact tests inside a Docker container - `Pact Binary Error: /bin/sh: 1: ./standalone/linux-x64-1.70.2/bin/pact-mock-service: not found`

matt.fellows
2019-11-21 22:34
Hmmm has something changed? Anything in your install logs which looks spurious?

brendan.j.donegan
2019-11-22 09:16
The thing is I `ls` the path in node_modules/@pact-foundation/pact-node and it exists

matt.fellows
2019-11-22 09:17
Are you running Alpine? If so, check the docs out for it as there are some extra things you need to do

sankalan13
2019-11-25 07:32
Hey guys I am using a node microservice architecture in GCP with Spanner databases. For running my provider side verification, I need to setup data in my database. I was wondering if I should be using the Spanner or if I should setup a test database like Sqlite and then run all data setup in that test database. I am banking towards setting up a test database but the developers are suggesting me to use Spanner. I can't make up my mind. What do you guys think I should do?

matt.fellows
2019-11-25 08:39
It doesn't matter too much. You should have tests for your repository layer anyway, so it's not about testing your query patterns. If it's simple enough to seed a spanner database in docker, then stick with that. If it's easier to go with sqlite or another in memory db then that's ok.

matt.fellows
2019-11-25 08:40
So go with what's easiest and tests what you need.

matt.fellows
2019-11-25 08:41
Fwiw I tend to stick with a real DB to save developers and testers from learning a new thing. Bit it can depend on how easy is it to swap it out. Does spanner implement a full SQL compatible interface? If not, it's questionable how good the mock is

sankalan13
2019-11-25 09:02
Spanner does implement a full SQL compatible interface. I was worried about using spanner for the following reasons: 1. Running tests from CI and communicating with a DB that is in GCP would increase my latency 2. It would be difficult to teardown my tests in Spanner because I'd have to delete the database entries I create, in a sqlite I can just destroy the db and create it again when I rerun the tests

sankalan13
2019-11-25 09:02
What do you mean by having tests for my repository layer? Do you mean having unit tests?

sankalan13
2019-11-25 09:04
Also when I run my provider verifier in CI, I would have to run my provider server. Would that be wise to do in Jenkins? or should I run the verifier as a job in my kubernetes cluster?

brendan.j.donegan
2019-11-25 11:16
our image is based off ubuntu. i've established that this happens when the tests run twice on the same build agent, so something must not be getting cleaned up

sankalan13
2019-11-25 11:47
Hey guys I am doing a GET request with a body. My pact file is defined as such: ``` "interactions": [ { "description": "a request to retrieve user account data", "providerState": "it has one user", "request": { "method": "GET", "path": "/account-service/v1.0.0/getAccountInfo", "headers": { "Content-Type": "application/json" }, "body": { "userId": "xxxxx-xxxxx-xxxxx-xxxxx" } }, "response": { "status": 200, "headers": { }, "body": { "phoneNo": xxxxxxxxxxxx, "countryAreaCode": xx } }``` When I am verifying this on the provider side, my GET is not going with a body but is going with a query string: /account-service/v1.0.0/getAccountInfo?%7B%22userId%22%3A%22xxxx-xxxxx-xxxxx-xxxxx%22%7D. Because of this, my code that checks for the schema ['userId': 'xxxx-xxxx-xxxx-xxxx'] is failing as it is not receiving a body. Please verify if this is a bug, I will raise an issue for resolution. :slightly_smiling_face:

sankalan13
2019-11-25 11:48
Decided on going ahead with a lightweight database like sqlite to reduce the latency that comes as an overhead with using Spanner for CI tests.

sankalan13
2019-11-25 12:01
Please ignore. Found the issue already logged: https://github.com/pact-foundation/pact-net/issues/185

sankalan13
2019-11-25 12:02
The error persists on pact-foundation/pact npm package as well.

john.hamlett
2019-11-25 14:30
has joined #pact-node

john.hamlett
2019-11-25 14:35
Hello, I am unable to publish pacts to my pact-broker ```let publisher = require('@pact-foundation/pact-node') let path = require('path') let opts = { pactFilesOrDirs: [path.resolve(process.cwd(), 'pacts')], pactBroker: 'http://spun-up instance', consumerVersion: '2.0.1', } publisher.publishPacts(opts).then(() => console.log('Pacts successfully published'))``` When I run in debug I get less than helpful messages ```C02ZH0DALVCF:bsb-ec-bcp-next-ui john.hamlett$ node .pact/pactPublish.js [2019-11-25T14:32:51.128Z] INFO: pact-node@10.2.2/2416 on C02ZH0DALVCF: Publishing Pacts to Broker [2019-11-25T14:32:51.129Z] INFO: pact-node@10.2.2/2416 on C02ZH0DALVCF: Publishing pacts to broker at: http://mybroker.com [2019-11-25T14:32:51.130Z] DEBUG: pact-node@10.2.2/2416 on C02ZH0DALVCF: Starting pact binary with '/bin/sh,-c,./standalone/darwin-1.72.2/bin/pact-broker publish '/Users/john.hamlett/repos/ecommerce/bsb-ec-bcp-next-ui/pacts' --broker-base-url 'http://mybroker.com' --consumer-app-version '2.0.0',{"cwd":"/Users/john.hamlett/repos/ecommerce/bsb-ec-bcp-next-ui/node_modules/@pact-foundation/pact-node","detached":true,"env":{"TERM_PROGRAM":"vscode","NVM_CD_FLAGS":"","TERM":"xterm-256color","SHELL":"/bin/bash","TMPDIR":"/var/folders/23/33tswn_s2vv5740s88z955bh8ccgb7/T/","Apple_PubSub_Socket_Render":"/private/tmp/com.apple.launchd.SiNUdL0D8F/Render","TERM_PROGRAM_VERSION":"1.41.0-insider","SDKMAN_PLATFORM":"Darwin","NVM_DIR":"/Users/john.hamlett/.nvm","USER":"john.hamlett","SDKMAN_CANDIDATES_API":"https://api.sdkman.io/2","SSH_AUTH_SOCK":"/private/tmp/com.apple.launchd.hNknl19EG7/Listeners","__CF_USER_TEXT_ENCODING":"0x10C63D67:0x0:0x0","PATH":"/Users/john.hamlett/.nvm/versions/node/v13.1.0/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/john.hamlett/.sdkman/candidates/java/current/bin:/Users/john.hamlett/.nvm/versions/node/v13.1.0/bin","PWD":"/Users/john.hamlett/repos/ecommerce/bsb-ec-bcp-next-ui","JAVA_HOME":"/Users/john.hamlett/.sdkman/candidates/java/current","LANG":"en_US.UTF-8","SDKMAN_VERSION":"5.7.4+362","XPC_FLAGS":"0x0","XPC_SERVICE_NAME":"0","SHLVL":"2","HOME":"/Users/john.hamlett","LOGNAME":"john.hamlett","SDKMAN_DIR":"/Users/john.hamlett/.sdkman","NVM_BIN":"/Users/john.hamlett/.nvm/versions/node/v13.1.0/bin","SDKMAN_CANDIDATES_DIR":"/Users/john.hamlett/.sdkman/candidates","COLORTERM":"truecolor","_":"/Users/john.hamlett/.nvm/versions/node/v13.1.0/bin/node"}}' [2019-11-25T14:32:51.134Z] DEBUG: pact-node@10.2.2/2416 on C02ZH0DALVCF: Created './standalone/darwin-1.72.2/bin/pact-broker publish '/Users/john.hamlett/repos/ecommerce/bsb-ec-bcp-next-ui/pacts' --broker-base-url 'http://mybroker.com' --consumer-app-version '2.0.0'' process with PID: 2417 [2019-11-25T14:32:51.828Z] DEBUG: pact-node@10.2.2/2416 on C02ZH0DALVCF: Publishing bsb-ec-bcp-next-ui/bsb-ec-user-model-service pact to pact broker at http://mybroker.com The latest version of this pact can be accessed at the following URL (use this to configure the provider verification): [2019-11-25T14:32:51.833Z] ERROR: pact-node@10.2.2/2416 on C02ZH0DALVCF: Could not publish pact: Publishing bsb-ec-bcp-next-ui/bsb-ec-user-model-service pact to pact broker at http://mybroker.com The latest version of this pact can be accessed at the following URL (use this to configure the provider verification):``` I did delete the old pact though the UI, is there something else I need to do?

brendan.j.donegan
2019-11-25 17:21
Updating to 9.5.0 for pact seemed to have solved this issue

tjones
2019-11-26 00:12
Looks like the URL isn't coming back from the broker

tjones
2019-11-26 00:12
does the pact appear in the broker after you run this?

john.hamlett
2019-11-26 02:55
No, it does not

john.hamlett
2019-11-26 02:59
Figured it out, seems like I needed to use https not http

sankalan13
2019-11-26 04:21
Is the space in the broker URL intentional?

sankalan13
2019-11-26 04:22
Also you can set verbose to true in opts and try, it will help in debugging.

ambergkim
2019-11-26 06:23
has joined #pact-node

sankalan13
2019-11-26 10:11
Hi @bethskurrie Is there any chance we can resolve this issue? I cannot change all the implemented GET APIs. The workaround for me will be to write a custom middleware that parses and extracts the body from the query string and then send the GET request with the body. This might not be a very stable way to implement this. Please help :disappointed:

bethskurrie
2019-11-26 20:30
@sankalan13 I'm sorry, the underlying Ruby library does not support GET requests with bodies.

bethskurrie
2019-11-26 20:34
Pact js wraps the underlying pact CLI. If turning on verbose doesn't help, try calling the CLI directly.

bethskurrie
2019-11-26 20:37
I've already had a good look into this, and there's nothing I can do unfortunately.

ben.quinteros
2019-11-26 22:37
has joined #pact-node

megha.agrawal
2019-11-27 18:06
has joined #pact-node

josue.guerrero
2020-01-17 14:51
has joined #pact-node

aaronmckaynz
2020-02-26 05:15
has joined #pact-node

aaronmckaynz
2020-02-26 05:23
@aaronmckaynz has left the channel

ckkinay
2020-02-26 09:35
has joined #pact-node

matt.fellows
2020-02-28 02:48
So I tried to fix the tar issue on the train. This build works perfectly locally, but travis is not happy and I?m confused: https://travis-ci.org/pact-foundation/pact-node/jobs/656023906

matt.fellows
2020-02-28 06:56
OK, so on the return ride home, I found the issues with https://pact-foundation.slack.com/archives/C9VE9AP9P/p1582858120001300

matt.fellows
2020-02-28 06:57
Basically, the tests are state dependent - because I had already had the standalone binaries extracted, the piece of code responsible for extracting never fired, so I got a false positive. Going to fix that

matt.fellows
2020-02-28 06:58
Also, as noted by others, I need two libraries - one for .zip and the other for .tar.gz


bethskurrie
2020-02-28 07:08
:+1:

tjones
2020-03-03 00:59
Nice work on a quick fix for this, @matt.fellows!

tyler.rasor
2020-03-05 12:59
has joined #pact-node

aaron
2020-03-09 21:36
has joined #pact-node

bsigney
2020-03-13 05:11
has joined #pact-node

adadache
2020-03-20 15:04
has joined #pact-node

matt.fellows
2020-03-23 03:01
:raised_hands:

jwortmann719
2020-03-25 11:18
has joined #pact-node

waquino
2020-03-29 21:23
has joined #pact-node

davidpihlaja
2020-03-30 19:09
has joined #pact-node

ina.lopez
2020-04-01 21:16
has joined #pact-node

lbraymusso
2020-04-02 05:43
has joined #pact-node

rahulpandey8920
2020-04-12 19:28
has joined #pact-node

ina.lopez
2020-04-13 17:18
Is there js library that does this: ```./pact-broker create-version-tag ./pact-broker describe-version```

matt.fellows
2020-04-13 20:35
I don't think so, but quite honestly I'm not sure why I'd use it over the CLI itself. If you didn't notice already, pact node (and therefore pact js) already packages them in their distro, so you can just do `npx pact-broker ...`

ina.lopez
2020-04-13 20:58
It rather confusing to have done tests, publishing, candeploy, verify using js libs and then these 2 are like orphans :slightly_smiling_face:

matt.fellows
2020-04-13 21:20
Fair point.

matt.fellows
2020-04-13 21:20
It wouldn?t be hard to add to the library, feel free to raise an issue/enhancement and somebody will pick it up.

matt.fellows
2020-04-13 21:21
FWIW I see zero value in the JS interface. I?m stuck with an annoying travis issue that is preventing me from removing the last user-facing reference to `pact-node` in examples and standard usage - publishing the contract

matt.fellows
2020-04-13 21:22
But after I do that, the only JS interface 99% of people should be using is Pact JS (`pact`)

matt.fellows
2020-04-13 21:22
Supporting a mirror of the CLI options in JS just seems like unnecessary, duplicitous work and I?ve never really encountered a good reason to have it in JS. I?d be happy to hear more on your case

tjones
2020-04-16 02:57
I?m interested in this! Can you tell me more about what you?ve built that is calling those options directly from javascript?

tjones
2020-04-16 02:58
I?m asking because I tend to think that the best practices should be to use the DSL that pact-js provides for test / verification, then using the binaries directly during CI

tjones
2020-04-16 02:59
I?m worried that the pact-node documentation leads people down the path of implementing their own pact process handlers, which means there?s a lot of work required to get pact up and running, and I don?t think provides much benefit

tjones
2020-04-16 02:59
however, if there?s a clear reason that it?s nicer to call all of this stuff from JS, then I?d like to consider building it all into the DSL

tjones
2020-04-16 03:00
Certainly we could support some stuff in a much nicer way for javascript (eg configuration via package.json)

ina.lopez
2020-04-21 19:57
Hi Tim, all I was saying is that I have commands in Jenkins that just call scripts with information hidden from Jenkinsfile and then you have create-version-tag :)

tjones
2020-04-22 00:42
What does `posttest:pact` look like? Wouldn?t that be the call to the binary? What is stopping you putting the `pact-broker ....` line in as an npm target?

leonardo.k.magalhaes
2020-04-29 21:33
has joined #pact-node

ppaduch
2020-05-13 20:10
has joined #pact-node

paul.davies
2020-05-27 04:07
has joined #pact-node

aaronmckaynz
2020-05-29 02:32
has joined #pact-node

phil.endsley
2020-06-05 05:09
has joined #pact-node

v.scherr
2020-06-08 15:45
has joined #pact-node

v.scherr
2020-06-08 15:46
Im writing a small programm for a University project. I'd like to test it with the pact framewok. Unfortunately, no Pact.json file is created for me, although there are no errors. My Consumer iss written in Javascript. Below you can see the source code of my javascript file, the console output and my package.json file: ```const {Pact} = require('@pact-foundation/pact'); const axios = require('axios'); const path = require('path'); jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000 describe('Pact Consumer', () => { const provider = new Pact({ consumer: 'consumer', provider: 'producer', port: 1234, cors:true, log: path.resolve(process.cwd(), 'logs', 'pact.log'), dir: path.resolve(process.cwd(), 'pacts'), logLevel: 'INFO', }); beforeAll(() => provider.setup()); describe('consumer', () => { beforeAll ((done) => provider.addInteraction({ uponReceiving: "a request for JSON data", withRequest: { method: "GET", path: "/test", headers: { Accept: "application/json" }, }, willRespondWith: { status: 200, headers: { "Content-Type": "application/json","Access-Control-Allow-Origin": '*' }, body: { name: 'Scherr', surname: 'Valerian', age: 28, }, }, }) .then(done, error => done.fail(error)), ); }); describe('test', () => { it('should return the correct data', () => { axios.get('localhost:8888/test').then(response => { expect(response[0].name).toBe('Scherr'); expect(response[0].surname).toBe('Valerian'); expect(response[0].age).toBe(28); }) }); }); afterEach(() => { provider.verify(); }); afterAll(done => { provider.finalize().then(done, done.fail); }); }); ``` Console output:`"C:\Program Files\nodejs\node.exe" C:\Users\vsche\IdeaProjects\testscenario\webservice\node_modules\jasmine\bin\jasmine.js --reporter=C:\Users\vsche\.IntelliJIdea2019.3\config\plugins\IdeaJasmine\lib\intellij_reporter.js C:/Users/vsche/IdeaProjects/testscenario/webservice/spec/WebService.spec.js --filter=test` [2020-06-08T15:05:38.629Z] INFO: pact-node@10.9.5/8152 on DESKTOP-FH2DU0O: Creating Pact Server with options: {"consumer":"consumer","cors":true,"dir":"C:\\Users\\vsche\\IdeaProjects\\testscenario\\pacts","host":"127.0.0.1","log":"C:\\Users\\vsche\\IdeaProjects\\testscenario\\logs\\pact.log","pactFileWriteMode":"overwrite","port":1234,"provider":"producer","spec":2,"ssl":false} [2020-06-08T15:05:39.679Z] INFO: pact@9.11.0/8152 on DESKTOP-FH2DU0O: Setting up Pact with Consumer "consumer" and Provider "producer" using mock service on Port: "1234" [2020-06-08T15:05:39.700Z] INFO: pact@9.11.0/8152 on DESKTOP-FH2DU0O: Pact File Written [2020-06-08T15:05:39.701Z] INFO: pact-node@10.9.5/8152 on DESKTOP-FH2DU0O: Removing Pact process with PID: 13428 [2020-06-08T15:05:41.800ZPact verification failed!] INFOPopsicleError: Unable to connect to "http://127.0.0.1:1234/interactions" : pact-node@10.9.5/8152 on DESKTOP-FH2DU0O: Caused by: Error: connect ECONNREFUSED 127.0.0.1:1234 Deleting Pact Server with options: {"consumer":"consumer","cors":true,"dir":"C:\\Users\\vsche\\IdeaProjects\\testscenario\\pacts","host":"127.0.0.1","log":"C:\\Users\\vsche\\IdeaProjects\\testscenario\\logs\\pact.log","pactFileWriteMode":"overwrite","port":1234,"provider":"producer","spec":2,"ssl":false} Thanks in advance for any help

matt.fellows
2020-06-08 23:27
I?ve responded on Stack Overflow

karol.szymanowski
2020-06-09 08:08
has joined #pact-node

cristian.schez
2020-06-09 11:21
has joined #pact-node

r.iglesias
2020-06-12 10:34
has joined #pact-node

naeem95m
2020-06-25 16:17
has joined #pact-node

ag.robinson
2020-06-27 15:41
has joined #pact-node

samycici
2020-06-29 15:30
has joined #pact-node

wesleythomaswilliams
2020-07-06 16:00
has joined #pact-node

jason
2020-07-14 10:16
has joined #pact-node

paul.stitt
2020-07-23 09:24
has joined #pact-node

ashish_garg5
2020-08-06 09:36
has joined #pact-node

ashish_garg5
2020-08-06 09:38
Hi, I am using Angular 8 and facing issue while downloading pact dependencies. want to know which version is compatible with Angular 8. Thanks.

matt.fellows
2020-08-06 09:38
Well we're going to need more information than that. What's the specific problem?

matt.fellows
2020-08-06 09:39
We don't have any known compatibility problems with angular. It's works with node versions we test against (currently 10 to 14)

ashish_garg5
2020-08-06 11:46
It works now after i deleted the node_modules and did the npm install again. Thanks.

ashish_garg5
2020-08-07 11:38
Hi All, I am trying to pass query parameter in my withRequest while generating pact but getting regex mismatch error. query: Matchers.term({ generate: 'id=test', matcher: '/id=.*/' }) Not sure how exactly i have to pass matcher value so that it accepts all id's. Please help. Thanks.

matt.fellows
2020-08-07 12:25
Query take an object of key/value pairs, where each key is the name of the param. The value may be a primitive (e.g. test) or a matcher.

steve.mackinnon
2020-08-10 03:54
has joined #pact-node

amod.shankar
2020-08-13 13:00
has joined #pact-node

amod.shankar
2020-08-13 13:08
Hi, I am trying to install pact-node in Angular App(Angular 8.) My organisation uses a local issuer certificate to fetch the npm packages from their own artifactory using that certificate. I installed karma-pact, pact-web successfully, but the *pact-node* installation is throwing error. Following is a brief log: *Error while installing binary: Postinstalled Failed Unexpectedly: Error downloading binary from https://github.com/pact-foundation/pact-ruby-standalone/releases/download/v1.86.0/pact-1.86.0-win32.zip: Error: Error while installing binary: Error: unable to get local issuer certificate* Basically, it is unable to find the pact-ruby-standalone binary through my company's artifactory. The artifactory is essentially a mirror to git repositories, so ideally there shouldn't be issues. Even so, why is it redirecting to a public address to fetch the binary? Any leads will be of great help. Thanks in advance.


matt.fellows
2020-08-13 13:14
You'll need to install the standalone binary manually

ruchika.lakhina
2020-08-14 15:42
has joined #pact-node

ruchika.lakhina
2020-08-14 15:44
Hi, Is there any @pact-foundation/pact-node that is compatible with Node 4?

matt.fellows
2020-08-14 21:33
Maybe but it would be really old too

matt.fellows
2020-08-14 21:34
Youd have to look at the GitHub release changelog to marry up the Travis releases

matt248
2020-08-18 08:27
has joined #pact-node

iannsantos8
2020-08-20 18:23
has joined #pact-node

heytaco
2020-08-25 03:57
has joined #pact-node

heytaco
2020-08-25 03:57
Hi there! My name is HeyTaco!, and you can use me to give people tacos to show your appreciation. My tacos will spread joy through Slack!

ruchika.lakhina
2020-08-28 15:49
Hi, Is there any pact-node dependency version compatible with karma 0.13.x?

matt.fellows
2020-08-29 01:45
that seems like a really old version. The current version is 5.1.1 so i?d say if it works it?d be quite lucky. We haven?t tested it so it?s going to depend on the api

ruchika.lakhina
2020-09-01 10:12
Can pact tests be written for angular js projects?

matt.fellows
2020-09-01 10:12
Of course.

matt.fellows
2020-09-01 10:13
Is there something suggesting it can't?

ruchika.lakhina
2020-09-01 11:18
Do we have some examples of angularjs projects available that are using pact?


matt.fellows
2020-09-01 11:19
But no examples in the wild. Is there something you?re struggling with? There really should be (basically) no angular specific things in your pact tests - aside from the HTTP client that from memory angular provides, the concepts work no matter what UI framework you use


matt.fellows
2020-09-01 11:20
Also, you probably want #pact-js channel (more people, this is really an upstream dependency and you don?t really need to use pact-node directly)

maciej.olko
2020-09-11 08:42
has joined #pact-node

karasiewicz.business
2020-09-11 14:02
has joined #pact-node

thomas.hibbard
2020-09-23 18:15
has joined #pact-node

ruth
2020-10-05 18:54
has joined #pact-node

dothetan.040490
2020-10-08 04:05
has joined #pact-node

giadinhluong
2020-10-14 02:44
has joined #pact-node

dothetan.040490
2020-10-15 02:22
@dothetan.040490 has left the channel

longlevan
2020-10-23 03:37
has joined #pact-node

guppy0356.nakira
2020-10-26 10:20
has joined #pact-node

carlosalmeida.xon
2020-10-28 12:02
has joined #pact-node

darshan
2020-10-28 13:11
has joined #pact-node

jamescourtoy
2020-11-03 15:26
has joined #pact-node

serhatburakyildirim
2020-11-23 10:16
has joined #pact-node

patrick.hendron
2020-12-03 10:02
has joined #pact-node

smatheson
2020-12-16 22:17
has joined #pact-node

writetojoshma
2020-12-19 15:48
has joined #pact-node

omer.moradd
2020-12-21 07:18
has joined #pact-node

omer.moradd
2020-12-21 07:21
Hi all :) I am new to Pact.js and after some reading, I found it awesome! exactly the thing we were looking for in the company. We work with NestJS a lot, and I thought that creating an NPM Package that brings those two great technologies together will be nice I would love to hear what you guys think of it! NPM: https://www.npmjs.com/package/nestjs-pact Github: http://www.github.com/omermorad/nestjs-pact

omer.morad
2020-12-22 07:49
has joined #pact-node

ruchika.lakhina
2021-01-05 14:54
ERROR: pact-node@10.11.1/114876 on W10468KWT2: Pact Binary Error: C:/Users/ruchika_lakhina/Documents/workspace-sts-3.9.9.RELEASE/CloudIQ/ppdd/temp/systems-plugin/node_modules/@pact-foundation/pact-node/standalone/win32-1.88.3/pact/lib/vendor/ruby/2.2.0/gems/pact-mock_service-3.6.2/lib/pact/mock_service/cli.rb:5:in `require': cannot load such file -- pact/mock_service/server/wait_for_server_up (LoadError) from C:/Users/ruchika_lakhina/Documents/workspace-sts-3.9.9.RELEASE/CloudIQ/ppdd/temp/systems-plugin/node_modules/@pact-foundation/pact-node/standalone/win32-1.88.3/pact/lib/vendor/ruby/2.2.0/gems/pact-mock_service-3.6.2/lib/pact/mock_service/cli.rb:5:in `<top (required)>' from C:/Users/ruchika_lakhina/Documents/workspace-sts-3.9.9.RELEASE/CloudIQ/ppdd/temp/systems-plugin/node_modules/@pact-foundation/pact-node/standalone/win32-1.88.3/pact/lib/app/pact-mock-service.rb:1:in `require' from C:/Users/ruchika_lakhina/Documents/workspace-sts-3.9.9.RELEASE/CloudIQ/ppdd/temp/systems-plugin/node_modules/@pact-foundation/pact-node/standalone/win32-1.88.3/pact/lib/app/pact-mock-service.rb:1:in `<main>' 24% building 124/126 modules 2 active ...kspace-sts-3.9.9.RELEASE\CloudIQ\ppdd\temp\systems-plugin\src\styles.scss[2021-01-05T14:51:47.199Z] WARN: pact-node@10.11.1/114876 on W10468KWT2: Pact exited with code 1. [2021-01-05T14:51:47.200Z] INFO: pact-node@10.11.1/114876 on W10468KWT2: Removing Pact process with PID: 116500 ERROR: The process "116500" not found. 69% building 784/796 modules 12 active ...gin\src\app\shared\grid\cells\location-cell\location-cell.component.scss05 01 2021 20:22:00.649:ERROR [pact]: Error while trying to run karma-pact: Error: Couldn't start Pact with PID: 116500 I am facing this error while running pact tests. Can someone help me with this?

matt.fellows
2021-01-05 21:45
Looks like the windows long path issue

matt.fellows
2021-01-05 21:46
Look at the GitHub issues for solutions, but simplest is to move your project closer to the root of the drive e.g. `c:/prj`

matt195
2021-01-06 10:34
has joined #pact-node

ruchika.lakhina
2021-01-06 18:03
Thanks ..it worked

info
2021-01-06 21:43
has joined #pact-node

henrik.rudstrom
2021-01-13 12:58
has joined #pact-node

patrick.hendron
2021-02-03 17:01
hey guys, is there functionality that allows for "OR" matcher e.g. a key value can return either a string || `null`

patrick.hendron
2021-02-03 17:07
e.g. `like("key": "string" || null)`


dany.marques90
2021-02-04 09:51
has joined #pact-node

slavick
2021-02-05 14:34
has joined #pact-node

sjdl
2021-02-09 22:14
has joined #pact-node

poward
2021-02-11 16:51
has joined #pact-node

patrick.hendron
2021-02-11 17:44
does pact only accept certain encoding methods when sending xml through a PACT mock? getting `Encoding::UndefinedConversionError - \"\\xE2\" from ASCII-8BIT to UTF-8` when sending xml with UTF-8

patrick.hendron
2021-02-11 18:44
sorry, please ignore this

stephenkilbourn
2021-02-12 15:33
has joined #pact-node

tausif2909
2021-02-23 13:18
has joined #pact-node

tausif2909
2021-02-23 13:35
I have the call at consumer side `api/assets/{assetId}`  where `assetId` is dynamic will be passed from provider side, How do I pass `{assetId}` value from provider side in `nodeJS` project.? can someone share the example ?

tjones
2021-02-24 10:37
Thanks to @dany.marques90 for this fix! :taco: for you!

dany.marques90
2021-02-24 10:38
Thanks a lot for the collaboration @tjones

matt.fellows
2021-02-28 22:58
@bethskurrie ^^

tjones
2021-03-01 00:31
FYI: We?re going to rename `@pact-foundation/pact-node` to `@pact-foundation/pact-core` to better reflect the purpose of the package. No action will be required from users, although if you?re developing tools that depend on `@pact-foundation/pact-node` you will see deprecation warnings until you update to the new package.

tjones
2021-03-12 05:07
I?m archiving this channel to keep all things pact-js in one place. Please join us in either #pact-js or #pact-js-development as appropriate.

tjones
2021-03-12 05:10
archived the channel