You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to create a contract pact at consumer end for a provider which returns ZIP file in response.
Currently response expectations in my pact method look like below.
.willRespondWith()
.status(HttpStatus.OK.code)
.headers(mapOf(HttpHeaders.CONTENT_TYPE to zipContent))
Is there way to set expectation for contents of zip file? For example, if I want set expectation that inside zip file there should be specific directory/filename is present. Not bothered about file contents, but if a file or directory is present or not inside the zip file.
Is there a way to set such expectations under pact contract?
Note - Reason I want this type of validation is my service is not directly consuming zip file, but its more interested in files inside zip file. I want to set some expectation like a specific directory or filename is present inside zip file.
I tried posting this message in multiple slack groups, but unfortunately didn't get much response. Any suggestions on how to handle such cases would be really helpful.
The text was updated successfully, but these errors were encountered:
@rholshausen , thank you for responding. How can we validate if body is valid zip file? Can you please provide any document or example for validating if its zip file. Or validating content-type header will suffice ?
Hi Team,
I am trying to create a contract pact at consumer end for a provider which returns ZIP file in response.
Currently response expectations in my pact method look like below.
Is there way to set expectation for contents of zip file? For example, if I want set expectation that inside zip file there should be specific directory/filename is present. Not bothered about file contents, but if a file or directory is present or not inside the zip file.
Is there a way to set such expectations under pact contract?
Note - Reason I want this type of validation is my service is not directly consuming zip file, but its more interested in files inside zip file. I want to set some expectation like a specific directory or filename is present inside zip file.
I tried posting this message in multiple slack groups, but unfortunately didn't get much response. Any suggestions on how to handle such cases would be really helpful.
The text was updated successfully, but these errors were encountered: