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

No values are injected into response headers and response bodies from state callbacks #1060

Closed
sdobrovolschi opened this issue Mar 26, 2020 · 2 comments
Labels
bug Indicates an unexpected problem or unintended behavior

Comments

@sdobrovolschi
Copy link

sdobrovolschi commented Mar 26, 2020

Pact verification: pact-jvm-provider-junit5 version: 4.0.8

Pact fragment:

"response": {
        "status": 201,
        "headers": {
          "Location": "http://localhost:8080/accounts/4beb44f1-53f7-4281-a78b-12c06d682067"
        },
        "generators": {
          "header": {
            "Location": {
              "type": "ProviderState",
              "expression": "http://localhost:${port}/accounts/${accountId}"
            }
          }
        }
      }

The actual failure:

Expected header 'Location' to have value 'http://localhost:8080/accounts/4beb44f1-53f7-4281-a78b-12c06d682067' but was 'http://localhost:35071/accounts/0904b207-491a-4691-80fd-51c673e2f214'

It seems that value generators are not taken into account for responses.

Please note that it works well with pact-jvm-provider-junit

@uglyog uglyog added the bug Indicates an unexpected problem or unintended behavior label Apr 4, 2020
uglyog pushed a commit that referenced this issue Apr 4, 2020
@uglyog
Copy link
Member

uglyog commented Apr 5, 2020

Version 4.0.9 released.

@sdobrovolschi
Copy link
Author

Works as expected. Thank you very much.

uglyog pushed a commit that referenced this issue Apr 29, 2020
…e bodies from state callbacks #1060

(cherry picked from commit 2ed86d3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants