summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>2016-04-08 14:00:45 +1200
committerGarming Sam <garming@samba.org>2016-05-03 08:10:10 +0200
commit81f4e5383f1035716da0e9683521492e14cc250b (patch)
treefbe4b70f7a724cfc8d3fd3b78d4855a3d8068af9 /source4
parentb59b22a117f7fc42b66328fbbcd69e9432c19d43 (diff)
downloadsamba-81f4e5383f1035716da0e9683521492e14cc250b.tar.gz
VLV: test using restrictive expressions
This tests what happens with the VLV if the results are subject to an expression. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/tests/python/vlv.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/source4/dsdb/tests/python/vlv.py b/source4/dsdb/tests/python/vlv.py
index 02831590335..660d5b6cdc6 100644
--- a/source4/dsdb/tests/python/vlv.py
+++ b/source4/dsdb/tests/python/vlv.py
@@ -415,6 +415,14 @@ class VLVTests(samba.tests.TestCase):
self.assertCorrectResults(results, expected_order,
offset, before, after)
+ def test_server_vlv_with_expression(self):
+ """What happens when we run the VLV with an expression?"""
+ expressions = ["(objectClass=*)",
+ "(cn=%s)" % self.users[-1]['cn'],
+ "(roomNumber=%s)" % self.users[0]['roomNumber'],
+ ]
+ self.run_index_tests_with_expressions(expressions)
+
def test_server_vlv_with_failing_expression(self):
"""What happens when we run the VLV on an expression that matches
nothing?"""
@@ -471,6 +479,14 @@ class VLVTests(samba.tests.TestCase):
self.assertEquals(expected_results, results)
+ def test_vlv_gte_with_expression(self):
+ """What happens when we run the VLV with an expression?"""
+ expressions = ["(objectClass=*)",
+ "(cn=%s)" % self.users[-1]['cn'],
+ "(roomNumber=%s)" % self.users[0]['roomNumber'],
+ ]
+ self.run_gte_tests_with_expressions(expressions)
+
def test_vlv_gte_with_failing_expression(self):
"""What happens when we run the VLV on an expression that matches
nothing?"""