For non-local parsers (ie, PXE), we need to have the conf_url set. This
change adds a function to provide the originating URL.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
void __test_read_conf_data(struct parser_test *test,
const char *buf, size_t len);
void test_read_conf_file(struct parser_test *test, const char *filename);
+void test_set_conf_source(struct parser_test *test, const char *url);
int test_run_parser(struct parser_test *test, const char *parser_name);
talloc_free(path);
}
+void test_set_conf_source(struct parser_test *test, const char *url)
+{
+ test->ctx->conf_url = pb_url_parse(test, url);
+ assert(test->ctx->conf_url);
+}
+
int test_run_parser(struct parser_test *test, const char *parser_name)
{
struct p_item* i;