summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-05-04 15:24:54 +0200
committerGünther Deschner <gd@samba.org>2010-05-04 15:49:31 +0200
commiteee803372ae948a578fdda668fb8a2fe3c195788 (patch)
tree0ee7e2c0dcf6b8aabf9c3360104e9561754cb939
parentab1d9a923c0e6b5b2df56adad7c915edfbcbc15d (diff)
downloadsamba-eee803372ae948a578fdda668fb8a2fe3c195788.tar.gz
samba-eee803372ae948a578fdda668fb8a2fe3c195788.tar.bz2
samba-eee803372ae948a578fdda668fb8a2fe3c195788.zip
s4-smbtorture: add test_netprintdestenum to RAP-PRINTING.
Guenther
-rw-r--r--source4/torture/rap/printing.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/source4/torture/rap/printing.c b/source4/torture/rap/printing.c
index b3119cf0e9..62d5da98d7 100644
--- a/source4/torture/rap/printing.c
+++ b/source4/torture/rap/printing.c
@@ -472,6 +472,29 @@ static bool test_netprintjobsetinfo(struct torture_context *tctx,
return true;
}
+static bool test_netprintdestenum(struct torture_context *tctx,
+ struct smbcli_state *cli)
+{
+ struct rap_NetPrintDestEnum r;
+ int i;
+ uint16_t levels[] = { 0, 1, 2, 3 };
+
+ for (i=0; i < ARRAY_SIZE(levels); i++) {
+
+ r.in.level = levels[i];
+ r.in.bufsize = 8192;
+
+ torture_comment(tctx,
+ "Testing rap_NetPrintDestEnum level %d\n", r.in.level);
+
+ torture_assert_ntstatus_ok(tctx,
+ smbcli_rap_netprintdestenum(cli->tree, lp_iconv_convenience(tctx->lp_ctx), tctx, &r),
+ "smbcli_rap_netprintdestenum failed");
+ }
+
+ return true;
+}
+
static bool test_rap_print(struct torture_context *tctx,
struct smbcli_state *cli)
{
@@ -499,6 +522,7 @@ struct torture_suite *torture_rap_printing(TALLOC_CTX *mem_ctx)
torture_suite_add_1smb_test(suite, "rap_printjob_getinfo", test_netprintjobgetinfo);
torture_suite_add_1smb_test(suite, "rap_printjob_setinfo", test_netprintjobsetinfo);
torture_suite_add_1smb_test(suite, "rap_printjob", test_netprintjob);
+ torture_suite_add_1smb_test(suite, "rap_printdest_enum", test_netprintdestenum);
return suite;
}