Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Body payload rules - JSONError #97

Open
eruvanos opened this issue Aug 4, 2020 · 0 comments
Open

Body payload rules - JSONError #97

eruvanos opened this issue Aug 4, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@eruvanos
Copy link

eruvanos commented Aug 4, 2020

We do have a pact, that contains some non-JSON body.

{
  "consumer": {
    "name": "Pot"
  },
  "provider": {
    "name": "Rainbow"
  },
  "interactions": [
    {
      "description": "return word",
      "providerState": "entry exists",
      "request": {
        "method": "GET",
        "path": "/doc/dc98ea69-d442-abcd-ba6b-5ee0815b1882",
        "headers": {
          "Accept": "application/msword",
        }
      },
      "response": {
        "status": 200,
        "headers": {
          "content-type": "application/msword"
        },
        "body": "RE9DVU1FTlRfQ09OVEVOVA=="
      }
    }
  ],
  "metadata": {
    "pactSpecification": {
      "version": "2.0.0"
    }
  }
}

The verify fails with JSON exception from this line.

Regarding the docs-"Body payload rules" the verify should at least compare the two body values.

By the way: Is there a chance to support binary comparison, by giving base64 encoded values?

@eruvanos eruvanos changed the title Body payload rules Body payload rules - JSONError Aug 4, 2020
@r1chardj0n3s r1chardj0n3s added the bug Something isn't working label Mar 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants