~ubuntu-branches/ubuntu/quantal/kdepimlibs/quantal-proposed

« back to all changes in this revision

Viewing changes to kldap/tests/testkldap.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2010-05-24 02:37:35 UTC
  • mfrom: (1.1.45 upstream)
  • Revision ID: james.westby@ubuntu.com-20100524023735-pzdgb22z38mhikzi
Tags: 4:4.4.80-0ubuntu1
* New upstream beta release:
  - Switch to dpkg-source 3.0 (quilt) format
  - Bump KDE build-depends
  - Disable 02_increase_fail_timeout.diff
  - Update 03_hide_akonadi_progressbar.diff
  - Add shared-desktop-ontologies to build-depends
  - Update various install files

Show diffs side-by-side

added added

removed removed

Lines of Context:
155
155
  LdapUrl url;
156
156
  bool critical;
157
157
 
158
 
  url.setUrl( "ldap://cn=manager,dc=kde,dc=org:password@localhost:3999/dc=kde,dc=org?cn,mail?sub?(objectClass=*)?x-dir=base" );
 
158
  url.setUrl( "ldap://cn=manager,dc=kde,dc=org:password@localhost:3999/"
 
159
              "dc=kde,dc=org?cn,mail?sub?(objectClass=*)?x-dir=base" );
159
160
  url.parseQuery();
160
161
 
161
162
  QCOMPARE( url.user(), QString::fromLatin1( "cn=manager,dc=kde,dc=org" ) );
188
189
  if ( ( ret = op.bind_s() ) ) {
189
190
    kDebug() << "Could not bind to server. Error was:" << conn.ldapErrorString();
190
191
  }
 
192
  QEXPECT_FAIL( "", "Will fail since no server is available for testing", Abort );
191
193
  QCOMPARE( ret, 0 );
192
194
}
193
195
 
206
208
    qApp->processEvents();
207
209
  }
208
210
 
 
211
  QEXPECT_FAIL( "", "Will fail since no server is available for testing", Abort );
209
212
  QCOMPARE( success, true );
210
213
 
211
214
  kDebug() << "Search found" << m_objects.size() << "matching entries";
257
260
  if ( ( ret = op.bind_s() ) ) {
258
261
    kDebug() << "Could not bind to server. Error was:" << conn.ldapErrorString();
259
262
  }
 
263
  QEXPECT_FAIL( "", "Will fail since no server is available for testing", Abort );
260
264
  QCOMPARE( ret, 0 );
261
265
 
262
266
  // Let's use this connection with the model
280
284
  LdapUrl url;
281
285
  bool critical;
282
286
 
283
 
  url.setUrl("ldap://cn=manager,dc=kde,dc=org:password@localhost:3999/dc=kde,dc=org?cn,mail?sub?(objectClass=*)?x-dir=base");
 
287
  url.setUrl("ldap://cn=manager,dc=kde,dc=org:password@localhost:3999"
 
288
             "/dc=kde,dc=org?cn,mail?sub?(objectClass=*)?x-dir=base");
284
289
  url.parseQuery();
285
290
 
286
291
  QCOMPARE( url.user(), QString::fromLatin1("cn=manager,dc=kde,dc=org") );
298
303
  QCOMPARE( url.dn(), QString::fromLatin1("ou=People,dc=kde,dc=org") );
299
304
 
300
305
  LdapServer server;
301
 
//  url.setUrl("ldaps://cn=manager,dc=kde,dc=org:passwor@localhost:3999/dc=kde,dc=org????x-timelimt=5,x-sizelimit=6,x=pagesize=7,binddn=cn=apple,ou=berry");
302
 
url.setUrl("ldaps://cn=manager,dc=kde,dc=org:password@localhost:3999/dc=kde,dc=org??base??x-timelimit=5");
 
306
//  url.setUrl("ldaps://cn=manager,dc=kde,dc=org:passwor@localhost:3999/"
 
307
               "dc=kde,dc=org????x-timelimt=5,x-sizelimit=6,x=pagesize=7,binddn=cn=apple,ou=berry");
 
308
url.setUrl("ldaps://cn=manager,dc=kde,dc=org:password@localhost:3999/"
 
309
           "dc=kde,dc=org??base??x-timelimit=5");
303
310
url.parseQuery();
304
311
server.setUrl( url );
305
312
QCOMPARE( url.query(), QString::fromLatin1("??base??x-timelimit=5") );
407
414
  result = op.result( msgid );
408
415
  kDebug() << "error code" << conn.ldapErrorCode() << "str:" << conn.ldapErrorString();
409
416
 
410
 
  msgid = op.compare( "ou=People,dc=gyurco,dc=localdomain", "objectClass", QByteArray("inetOrgPerson") );
 
417
  msgid = op.compare( "ou=People,dc=gyurco,dc=localdomain", "objectClass",
 
418
                      QByteArray("inetOrgPerson") );
411
419
  kDebug() << "search msgid" << msgid;
412
420
  result = op.result( msgid );
413
421
  kDebug() << "error code" << conn.ldapErrorCode() << "str:" << conn.ldapErrorString();