s4-smbtorture: more and stricter tests for printer and data keys in RPC-SPOOLSS.
[ira/wip.git] / source4 / torture / rpc / spoolss.c
index 2a74131119e3226e5cb10465d12ba614c2e1a3ae..396ed75d251785ecdaeba6d9c1b6bd138b14f19b 100644 (file)
@@ -2139,11 +2139,11 @@ static bool test_EnumPrinterData(struct torture_context *tctx, struct dcerpc_pip
 
                torture_assert_ntstatus_ok(tctx, status, "EnumPrinterData failed");
 
-               test_GetPrinterData(tctx, p, handle, r.out.value_name);
+               torture_assert(tctx, test_GetPrinterData(tctx, p, handle, r.out.value_name),
+                       talloc_asprintf(tctx, "failed to call GetPrinterData for %s\n", r.out.value_name));
 
-               test_GetPrinterDataEx(tctx,
-                       p, handle, "PrinterDriverData",
-                       r.out.value_name);
+               torture_assert(tctx, test_GetPrinterDataEx(tctx, p, handle, "PrinterDriverData", r.out.value_name),
+                       talloc_asprintf(tctx, "failed to call GetPrinterDataEx on PrinterDriverData for %s\n", r.out.value_name));
 
                r.in.enum_index++;
 
@@ -2439,6 +2439,10 @@ static bool test_OpenPrinterEx(struct torture_context *tctx,
                ret = false;
        }
 
+       if (!test_printer_keys(tctx, p, &handle)) {
+               ret = false;
+       }
+
        if (!test_PausePrinter(tctx, p, &handle)) {
                ret = false;
        }