Sachin Mylavarapu
07/20/2023, 9:15 AMMatt (pactflow.io / pact-js / pact-go)
next() which is probably why it’s hangingMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Sachin Mylavarapu
07/20/2023, 11:19 AMSachin Mylavarapu
07/20/2023, 11:19 AMSachin Mylavarapu
07/20/2023, 11:19 AMSachin Mylavarapu
07/20/2023, 11:19 AMMatt (pactflow.io / pact-js / pact-go)
State handler does not need headersno, I’m just saying I don’t know what it’s doing. The results of the call aren’t going anywhere, so I’m not sure the intent behind it
Sachin Mylavarapu
07/20/2023, 11:38 AMSachin Mylavarapu
07/20/2023, 11:57 AMSachin Mylavarapu
07/20/2023, 11:57 AMSachin Mylavarapu
07/20/2023, 1:07 PMSachin Mylavarapu
07/20/2023, 1:08 PMSachin Mylavarapu
07/20/2023, 2:55 PMMatt (pactflow.io / pact-js / pact-go)
Sachin Mylavarapu
07/21/2023, 4:33 AMSachin Mylavarapu
07/21/2023, 4:34 AMSachin Mylavarapu
07/21/2023, 4:34 AMSachin Mylavarapu
07/21/2023, 4:35 AMSachin Mylavarapu
07/21/2023, 4:35 AMSachin Mylavarapu
07/21/2023, 4:36 AMSachin Mylavarapu
07/21/2023, 4:36 AMSachin Mylavarapu
07/21/2023, 4:36 AMMatt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
given statement in BDD e.g.Matt (pactflow.io / pact-js / pact-go)
Matt (pactflow.io / pact-js / pact-go)
Sachin Mylavarapu
07/21/2023, 7:25 AMSachin Mylavarapu
07/21/2023, 7:26 AMSachin Mylavarapu
07/21/2023, 7:26 AMSachin Mylavarapu
07/21/2023, 7:27 AMSachin Mylavarapu
07/21/2023, 8:08 AMSachin Mylavarapu
07/21/2023, 8:08 AMSachin Mylavarapu
07/21/2023, 8:09 AMYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Sachin Mylavarapu
08/07/2023, 8:05 AMSachin Mylavarapu
08/07/2023, 8:05 AMSachin Mylavarapu
08/07/2023, 8:06 AMSachin Mylavarapu
08/07/2023, 8:07 AMMatt (pactflow.io / pact-js / pact-go)
signRequest()
.then((result) => {
signedHeadersReq = result.headers;
contentType = result.headers['Content-Type'];
host = result.headers['host'];
date = result.headers['x-amz-date'];
securityToken = result.headers['x-amz-security-token'];
contentSha256 = result.headers['x-amz-content-sha256'];
authorization = result.headers['authorization'];
})
.catch((error) => {
console.error('Error signing request:', error);
});
That’s a promise, and is currently not handled. So all of the code after it that relies on those values has already fired (probably) before this promise is complete. I’d look at that as a starting pointSachin Mylavarapu
08/07/2023, 9:35 AMSachin Mylavarapu
08/07/2023, 9:53 AMMatt (pactflow.io / pact-js / pact-go)
DEBUG (or perhaps even TRACE log level) to see what the request is sent to AWSYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Matt (pactflow.io / pact-js / pact-go)
['I post credentials token']: async () => {
await chai.request(requestUrl.hostname)
.post(requestUrl.pathname)
.set('Content-Type', contentType)
.set('host', host)
.set('x-amz-date', date)
.set('x-amz-security-token',securityToken)
.set('x-amz-content-sha256', contentSha256)
.set('authorization', authorization)
.send(JSON.stringify({ "details": "something to store" }))
}
I’m not sure what this is doing. This will be executed before the provider test, but it’s just dangling. It shouldn’t be hitting your AWS service, the Pact verifier will do thatYousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Yousaf Nabi (pactflow.io)
Sachin Mylavarapu
08/07/2023, 11:09 AMSachin Mylavarapu
08/07/2023, 11:09 AMSachin Mylavarapu
08/07/2023, 11:09 AMSachin Mylavarapu
08/07/2023, 1:59 PMSachin Mylavarapu
08/07/2023, 1:59 PMSachin Mylavarapu
08/07/2023, 3:24 PMSachin Mylavarapu
08/07/2023, 3:24 PMSachin Mylavarapu
08/08/2023, 7:24 AMSachin Mylavarapu
08/08/2023, 8:48 AM