Hello! I have two tests on my provider side, of wh...
# pact-jvm
m
Hello! I have two tests on my provider side, of which one runs green and the other fails with a "header missing" message. The expected headers are both the same in the .json pact file, same on pactflow, same when I try them on the real swagger ui. How can I best debug to find the cause? Thanks in advance 🙏
1
Tests & failure message:
The tests themselves:
y
doesn't look like your provider response is working for the second test, no content type and body is null
also looks like you are returning a personDto, same for both, but you expect
persons
? should it be array of the person object.
m
The failing one returns a Page<PersonDto> Page = org.springframework.data.domain.Page
y
ahh my apologies Manu 👍
m
Indeed it seems the body is null and therefore the content type is missing
Green now - mocking the Page was a bit complicated. Thanks for the help @Yousaf Nabi (pactflow.io) 🙂
y
wahey 🙌