summaryrefslogtreecommitdiffstats
path: root/source4
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-04-30 11:57:40 +0200
committerGünther Deschner <gd@samba.org>2010-04-30 13:44:41 +0200
commit2df2cef437d19d2cb7675aa8297eaa24a8706bee (patch)
treef425d1f4fd2fcb6c0f32ccdad88d5f56bda3c749 /source4
parent7f1775e8604b405d89b578b0f04081c8273c7217 (diff)
downloadsamba-2df2cef437d19d2cb7675aa8297eaa24a8706bee.tar.gz
samba-2df2cef437d19d2cb7675aa8297eaa24a8706bee.tar.xz
samba-2df2cef437d19d2cb7675aa8297eaa24a8706bee.zip
s4-smbtorture: add test_netprintq to RAP-PRINTING.
Guenther
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/rap/printing.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/source4/torture/rap/printing.c b/source4/torture/rap/printing.c
index ebb80d3465..d05188c692 100644
--- a/source4/torture/rap/printing.c
+++ b/source4/torture/rap/printing.c
@@ -210,6 +210,46 @@ static bool test_netprintjob(struct torture_context *tctx,
return true;
}
+static bool test_netprintq_pause(struct torture_context *tctx,
+ struct smbcli_state *cli,
+ const char *PrintQueueName)
+{
+ struct rap_NetPrintQueuePause r;
+
+ r.in.PrintQueueName = PrintQueueName;
+
+ torture_comment(tctx, "Testing rap_NetPrintQueuePause(%s)\n", r.in.PrintQueueName);
+
+ torture_assert_ntstatus_ok(tctx,
+ smbcli_rap_netprintqueuepause(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ "smbcli_rap_netprintqueuepause failed");
+
+ return true;
+}
+
+static bool test_netprintq(struct torture_context *tctx,
+ struct smbcli_state *cli)
+{
+ struct rap_NetPrintQEnum r;
+ int i;
+
+ r.in.level = 5;
+ r.in.bufsize = 8192;
+
+ torture_assert_ntstatus_ok(tctx,
+ smbcli_rap_netprintqenum(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ "failed to enum printq");
+
+ for (i=0; i < r.out.count; i++) {
+
+ torture_assert(tctx,
+ test_netprintq_pause(tctx, cli, r.out.info[i].info5.PrintQueueName),
+ "failed to pause print queue");
+ }
+
+ return true;
+}
+
static bool test_rap_print(struct torture_context *tctx,
struct smbcli_state *cli)
{
@@ -233,6 +273,7 @@ struct torture_suite *torture_rap_printing(TALLOC_CTX *mem_ctx)
torture_suite_add_1smb_test(suite, "rap_printq_enum", test_netprintqenum);
torture_suite_add_1smb_test(suite, "rap_printq_getinfo", test_netprintqgetinfo);
torture_suite_add_1smb_test(suite, "rap_printjob", test_netprintjob);
+ torture_suite_add_1smb_test(suite, "rap_printq", test_netprintq);
return suite;
}