From d14bf38b9881c385478a460e3058d7cadee107fb Mon Sep 17 00:00:00 2001 From: Jeremy Kerr Date: Fri, 17 Jan 2014 16:36:41 +0800 Subject: test/parser: Check for full URLs in parser tests At present, we only match the 'file' portion of a URL in the parser tests, so we "serve" a file if just the filename (but not the scheme, hostname or path) matches the file we set with test_read_conf_embedded. This change introduces test_read_conf_embedded_url, which we can use to specify a full URL. In this case, the fake parser_request_file matches the entire URL before returning the file data. Signed-off-by: Jeremy Kerr --- test/parser/test-pxe-single.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test/parser/test-pxe-single.c') diff --git a/test/parser/test-pxe-single.c b/test/parser/test-pxe-single.c index 0bc6a59..56c404c 100644 --- a/test/parser/test-pxe-single.c +++ b/test/parser/test-pxe-single.c @@ -15,7 +15,7 @@ void run_test(struct parser_test *test) struct discover_boot_option *opt; struct discover_context *ctx; - test_read_conf_embedded(test, "conf.txt"); + test_read_conf_embedded_url(test, "tftp://host/dir/conf.txt"); test_set_event_source(test); test_set_event_param(test->ctx->event, "pxeconffile", -- cgit v1.2.1