diff options
Diffstat (limited to 'test_lib')
| -rw-r--r-- | test_lib/transport.c | 8 | ||||
| -rw-r--r-- | test_lib/transport_test.h | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/test_lib/transport.c b/test_lib/transport.c index 004bace..08153df 100644 --- a/test_lib/transport.c +++ b/test_lib/transport.c @@ -3,7 +3,7 @@ struct ExpectedRequest *nextResult = NULL; -enum ReturnCode transport_request(char *url, enum HttpMethod method, char *token, char *reqBody, struct SizedBlock *retBody) { +enum ReturnCode transport_request(char *url, enum HttpMethod method, char *token, char *filename, char *reqBody, struct SizedBlock *retBody) { assert(nextResult != NULL); assert(strcmp(nextResult->url, url) == 0); if(nextResult->reqBody == NULL) { @@ -20,6 +20,12 @@ enum ReturnCode transport_request(char *url, enum HttpMethod method, char *token assert(strcmp(nextResult->token, token) == 0); } + if(nextResult->filename == NULL) { + assert(nextResult->filename == NULL); + } else { + assert(filename != NULL); + assert(strcmp(nextResult->filename, filename) == 0); + } memcpy(retBody, &nextResult->retBody, sizeof(struct SizedBlock)); diff --git a/test_lib/transport_test.h b/test_lib/transport_test.h index ed6783b..0aa0c5c 100644 --- a/test_lib/transport_test.h +++ b/test_lib/transport_test.h @@ -5,7 +5,9 @@ struct ExpectedRequest { bool ignore; char *url; + enum HttpMethod method; char *token; + char *filename; char *reqBody; struct SizedBlock retBody; |
