@@ -42,40 +42,6 @@ def test_search_constrained_attributes
42
42
assert_empty entry [ :mail ]
43
43
end
44
44
45
- # http://tools.ietf.org/html/rfc4511#section-4.5.1.4
46
- def test_search_size
47
- entries = @ldap . search ( base : "ou=People,dc=rubyldap,dc=com" , size : 2 )
48
-
49
- assert_equal 2 , entries . size
50
- end
51
-
52
- # See: test_search_size for what *should* work.
53
- #
54
- # This tests the currently broken behavior where searches are reported as
55
- # failed when the size limit has been reached. This is broken since the
56
- # sizeLimit parameter defines how many results to send back, and will result
57
- # in a sizeLimitExceeded result in cases where there are more results than
58
- # returned; not an error case, but also not a result code that is categorized
59
- # as a non-error result (http://tools.ietf.org/html/rfc4511#appendix-A.1).
60
- # The practical choice is to treat sizeLimitExceeded (and timeLimitExceeded)
61
- # as successful search terminating messages.
62
- def test_search_size_broken
63
- entries = [ ]
64
-
65
- returned = @ldap . search ( base : "ou=People,dc=rubyldap,dc=com" , size : 2 ) do |entry |
66
- entries << entry . dn
67
- end
68
- refute returned
69
-
70
- # reported as an "error" of sizeLimitExceeded
71
- result = @ldap . get_operation_result
72
- assert_equal 4 , result . code
73
- assert_equal Net ::LDAP ::ResultStrings [ 4 ] , result . message
74
-
75
- # received the right number of results
76
- assert_equal 2 , entries . size
77
- end
78
-
79
45
def test_search_attributes_only
80
46
entry = @ldap . search ( base : "uid=user1,ou=People,dc=rubyldap,dc=com" , attributes_only : true ) . first
81
47
@@ -96,6 +62,7 @@ def test_search_timeout
96
62
assert_equal entries , result
97
63
end
98
64
65
+ # http://tools.ietf.org/html/rfc4511#section-4.5.1.4
99
66
def test_search_with_size
100
67
entries = [ ]
101
68
0 commit comments