selftest: add tests for smb notify, using the a special share
authorBjörn Baumbach <bb@sernet.de>
Mon, 20 Jul 2020 14:49:39 +0000 (16:49 +0200)
committerStefan Metzmacher <metze@samba.org>
Thu, 17 Dec 2020 13:59:38 +0000 (13:59 +0000)
That share will get the "honor change notify privilege = yes" option
once it's implemented. For now it's marked as knownfail.

Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>

Signed-off-by: Björn Baumbach <bb@sernet.de>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
selftest/knownfail.d/notify_privileged [new file with mode: 0644]
selftest/target/Samba3.pm
source4/selftest/tests.py

diff --git a/selftest/knownfail.d/notify_privileged b/selftest/knownfail.d/notify_privileged
new file mode 100644 (file)
index 0000000..44ff8cb
--- /dev/null
@@ -0,0 +1 @@
+^samba.tests.smb-notify.samba.tests.smb-notify.SMBNotifyTests.test_notify_privileged
index 8b1d809c9413d171c1ce5bb8241141c2a6e9b3b6..9c8b657e66da9c318a122d3da0fdb3a55af0ff43 100755 (executable)
@@ -2889,6 +2889,9 @@ sub provision($$)
        path = $prefix_abs/share
        vfs objects =
        server smb encrypt = off
+
+[notify_priv]
+       copy = tmp
        ";
 
        close(CONF);
index 9dc2df44bc4a1661e9184fb6505128a5fbc8b0ee..bc6bdb484ed645396457d5af3f31b66f21127833 100755 (executable)
@@ -481,6 +481,14 @@ for t in smbtorture4_testsuites("dlz_bind9."):
 
 planpythontestsuite("nt4_dc_smb1", "samba.tests.libsmb")
 
+planpythontestsuite("ad_member", "samba.tests.smb-notify",
+                    environ={'USERNAME':'$DC_USERNAME',
+                             'PASSWORD':'$DC_PASSWORD',
+                             'USERNAME_UNPRIV':'alice',
+                             'PASSWORD_UNPRIV':'Secret007',
+                             'STRICT_CHECKING':'0',
+                             'NOTIFY_SHARE':'notify_priv'})
+
 # Blackbox Tests:
 # tests that interact directly with the command-line tools rather than using
 # the API. These mainly test that the various command-line options of commands