-
-
Notifications
You must be signed in to change notification settings - Fork 352
Open
Labels
triageThis issue is yet to be triaged by a maintainerThis issue is yet to be triaged by a maintainerupstreamIndicates that an issue relates to an upstream problem (such as in pact-reference)Indicates that an issue relates to an upstream problem (such as in pact-reference)
Description
In the Provider test, I am setting a number value in the request body. However when the test runs its converts it from an Integer to String.
In my consumer everything works and contract generated correctly:
I have the following line in my request body
accountId: fromProviderState('${accountId}', accountId)
In the debug logs I can see it populating correctly with correct type
Calling match_values for path $.accountId
Comparing '1686819389' to '1686819389' using Type -> Ok(())
Comparing 'Number([1686819389](tel:1686819389))' to 'Number([1686819389](tel:1686819389))' at path '$.accountId' -> Ok(())
body: '{…….. ,"accountId":1686819389}'
In my provider:
int accountId = 2;
providerStateParameters.put(ACCOUNT_ID, accountId);
In the debug logs:
****I set my account id as: 1689080143238***
body: PRESENT({………..,"accountId":"1689080143238"})
Both consumer (pact-js) and provider (pact-jvm) are on the latest version
Metadata
Metadata
Assignees
Labels
triageThis issue is yet to be triaged by a maintainerThis issue is yet to be triaged by a maintainerupstreamIndicates that an issue relates to an upstream problem (such as in pact-reference)Indicates that an issue relates to an upstream problem (such as in pact-reference)
Type
Projects
Status
New Issue