diff options
author | Jeremy Kerr <jk@ozlabs.org> | 2014-01-17 16:36:41 +0800 |
---|---|---|
committer | Jeremy Kerr <jk@ozlabs.org> | 2014-01-17 16:58:14 +0800 |
commit | d14bf38b9881c385478a460e3058d7cadee107fb (patch) | |
tree | 57eb1befbbbdc732b4c0715652081d59b5a55b21 /test/parser/test-pxe-ip-without-conf.c | |
parent | b1d15f894473d4b1e90ad273487a432bcd637195 (diff) | |
download | talos-petitboot-d14bf38b9881c385478a460e3058d7cadee107fb.tar.gz talos-petitboot-d14bf38b9881c385478a460e3058d7cadee107fb.zip |
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 <jk@ozlabs.org>
Diffstat (limited to 'test/parser/test-pxe-ip-without-conf.c')
-rw-r--r-- | test/parser/test-pxe-ip-without-conf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/parser/test-pxe-ip-without-conf.c b/test/parser/test-pxe-ip-without-conf.c index dd4cedd..ff3bf9e 100644 --- a/test/parser/test-pxe-ip-without-conf.c +++ b/test/parser/test-pxe-ip-without-conf.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, "C0A8"); + test_read_conf_embedded_url(test, "tftp://host/dir/C0A8"); test_set_event_source(test); test_set_event_param(test->ctx->event, "bootfile", "dir/pxe"); |