File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -431,6 +431,32 @@ attributeTypes: ( 1.2.3.4.5.6.7.8 NAME 'objectSid' DESC 'objectSid' EQUALITY act
431431 require .Equal (t , "ldap: filter syntax error: invalid SID 'S-1-5-21-foo-1234567890-1234567890-1001': invalid uint value 'foo' at position: 3" , log .Entries [1 ].Message )
432432 },
433433 },
434+ {
435+ name : "no EQUALITY specified" ,
436+ input : `{ "files": [ "./schema.ldif", "./users.ldif" ] }` ,
437+ reader : & dynamictest.Reader {Data : map [string ]* dynamic.Config {
438+ "file:/schema.ldif" : {Raw : []byte (`
439+ dn:
440+ subschemaSubentry: cn=schema
441+
442+ dn: cn=schema
443+ attributeTypes: ( 2.5.4.3 NAME 'cn' DESC 'Common Name' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
444+ ` )},
445+ "file:/users.ldif" : {Raw : []byte ("dn: cn=user\n cn: UsEr" )},
446+ }},
447+ test : func (t * testing.T , h ldap.Handler , _ * test.Hook , err error ) {
448+ require .NoError (t , err )
449+
450+ rr := ldaptest .NewRecorder ()
451+ h .ServeLDAP (rr , ldaptest .NewRequest (0 , & ldap.SearchRequest {
452+ Scope : ldap .ScopeWholeSubtree ,
453+ Filter : "(cn=user)" ,
454+ }))
455+ res := rr .Message .(* ldap.SearchResponse )
456+
457+ require .Len (t , res .Results , 1 )
458+ },
459+ },
434460 }
435461
436462 for _ , tc := range testcases {
You can’t perform that action at this time.
0 commit comments