]> git.ozlabs.org Git - petitboot/blobdiff - test/parser/test-grub2-multiple-resolve.c
test/parser: Update test cases as per new parser requesting conf files
[petitboot] / test / parser / test-grub2-multiple-resolve.c
index 3bf4eab5560b83a09aa222d00cad57369ffdeb6f..f24c07fabf27f48b444f353f5497e0cf16fed8bc 100644 (file)
@@ -19,7 +19,8 @@ void run_test(struct parser_test *test)
        struct discover_context *ctx;
        struct discover_device *dev;
 
-       test_read_conf_embedded(test);
+       test_read_conf_embedded(test, "/grub.cfg");
+
        test_run_parser(test, "grub2");
 
        ctx = test->ctx;
@@ -30,12 +31,16 @@ void run_test(struct parser_test *test)
        opt[1] = get_boot_option(ctx, 1);
 
        check_unresolved_resource(opt[0]->boot_image);
+       check_not_present_resource(opt[0]->initrd);
        check_unresolved_resource(opt[1]->boot_image);
+       check_not_present_resource(opt[1]->initrd);
 
-       dev = test_create_device(ctx, "external");
+       dev = test_create_device(test, "external");
        dev->uuid = "48c1b787-20ad-47ce-b9eb-b108dddc3535";
        test_hotplug_device(test, dev);
 
        check_resolved_local_resource(opt[0]->boot_image, dev, "/vmlinux");
+       check_not_present_resource(opt[0]->initrd);
        check_resolved_local_resource(opt[1]->boot_image, dev, "/vmlinux");
+       check_not_present_resource(opt[1]->initrd);
 }