From 433f1e7828cb2bf15abe374d7c0b2bc0fcc89153 Mon Sep 17 00:00:00 2001 From: Peter van Dijk Date: Fri, 12 Feb 2016 09:36:31 +0100 Subject: [PATCH] setup ldap, run tests --- .travis.yml | 20 ++++++++++++++++++++ modules/ldapbackend/testfiles/add.ldif | 24 ++++++++++++++++++++++++ 2 files changed, 44 insertions(+) create mode 100644 modules/ldapbackend/testfiles/add.ldif diff --git a/.travis.yml b/.travis.yml index b03b2a914..b2d46421d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -111,6 +111,22 @@ before_script: - echo -e "[pdns-sqlite3-1]\nDriver = SQLite3\nDatabase = ${PWD}/regression-tests/pdns.sqlite3\n\n[pdns-sqlite3-2]\nDriver = SQLite3\nDatabase = ${PWD}/regression-tests/pdns.sqlite32\n" > ${HOME}/.odbc.ini - export GODBC_SQLITE3_DSN=pdns-sqlite3-1 + # ldap-backend test setup + - sudo apt-get -qq --no-install-recommends install + slapd + ldap-utils + - mkdir /tmp/ldap-dns + - pushd /tmp/ldap-dns + - for schema in /etc/ldap/schema/{core,cosine}.schema ${TRAVIS_BUILD_DIR}/modules/ldapbackend/{dnsdomain2,pdns-domaininfo}.schema ; do echo include $schema ; done > ldap.conf + - mkdir slapd.d + - slaptest -f ldap.conf -F slapd.d + - sudo cp slapd.d/cn=config/cn=schema/cn={*dns*.ldif /etc/ldap/slapd.d/cn=config/cn=schema/ + - sudo chown -R openldap:openldap /etc/ldap/slapd.d/ + - sudo service slapd restart + - popd + - sudo -u openldap mkdir -p /var/lib/ldap/powerdns + - sudo ldapadd -Y EXTERNAL -H ldapi:/// -f ./modules/ldapbackend/testfiles/add.ldif + # remote-backend tests requirements - sudo apt-get -qq --no-install-recommends install ruby-json @@ -189,6 +205,10 @@ script: - cd .. - cd regression-tests + + - ./timestamp ./start-test-stop 5300 ldap-tree + - ./timestamp ./start-test-stop 5300 ldap-simple + - ./timestamp ./start-test-stop 5300 bind-both - ./timestamp ./start-test-stop 5300 bind-dnssec-both - ./timestamp ./start-test-stop 5300 bind-dnssec-nsec3-both diff --git a/modules/ldapbackend/testfiles/add.ldif b/modules/ldapbackend/testfiles/add.ldif new file mode 100644 index 000000000..88a233f89 --- /dev/null +++ b/modules/ldapbackend/testfiles/add.ldif @@ -0,0 +1,24 @@ +dn: olcDatabase=hdb,cn=config +objectClass: olcDatabaseConfig +objectClass: olcHdbConfig +olcDatabase: hdb +olcDbDirectory: /var/lib/ldap/powerdns +olcSuffix: o=power +olcLastMod: TRUE +olcRootDN: uid=testuser,o=power +olcDbCheckpoint: 512 30 +olcDbConfig: {0}set_cachesize 0 2097152 0 +olcDbConfig: {1}set_lk_max_objects 1500 +olcDbConfig: {2}set_lk_max_locks 1500 +olcDbConfig: {3}set_lk_max_lockers 1500 +olcDbIndex: objectClass eq +olcDbIndex: associatedDomain eq +olcRootPW: secret + +dn: o=power +objectClass: organization +o: power + +dn: uid=testuser,o=power +objectClass: account +uid: testuser \ No newline at end of file -- 2.40.0