env:
UBSAN_OPTIONS: "print_stacktrace=1:halt_on_error=1:suppressions=${{ github.workspace }}/build-scripts/UBSan.supp"
ASAN_OPTIONS: detect_leaks=0
+ LDAPHOST: ldap://ldapserver/
strategy:
matrix:
include:
- backend: remote
image: coscale/docker-sleep
+ env: {}
+ ports: []
- backend: gmysql
image: mysql:5
+ env:
+ MYSQL_ALLOW_EMPTY_PASSWORD: 1
+ ports:
+ - 3306:3306
- backend: gmysql
image: mariadb:10
+ env:
+ MYSQL_ALLOW_EMPTY_PASSWORD: 1
+ ports:
+ - 3306:3306
- backend: gpgsql
image: postgres:9
+ env:
+ POSTGRES_USER: runner
+ POSTGRES_HOST_AUTH_METHOD: trust
+ ports:
+ - 5432:5432
- backend: gsqlite3 # this also runs regression-tests.nobackend and pdnsutil test-algorithms
image: coscale/docker-sleep
+ env: {}
+ ports: []
- backend: lmdb
image: coscale/docker-sleep
+ env: {}
+ ports: []
- backend: bind
image: coscale/docker-sleep
+ env: {}
+ ports: []
- backend: geoip
image: coscale/docker-sleep
+ env: {}
+ ports: []
- backend: lua2
image: coscale/docker-sleep
+ env: {}
+ ports: []
- backend: tinydns
image: coscale/docker-sleep
+ env: {}
+ ports: []
- backend: authpy
image: coscale/docker-sleep
+ env: {}
+ ports: []
- backend: godbc_sqlite3
image: coscale/docker-sleep
+ env: {}
+ ports: []
- backend: godbc_mssql
image: mcr.microsoft.com/mssql/server:2017-GA-ubuntu
+ env:
+ ACCEPT_EULA: Y
+ SA_PASSWORD: 'SAsa12%%'
+ ports:
+ - 1433:1433
+ - backend: ldap
+ image: powerdns/ldap-regress:1.2.4-1
+ env:
+ LDAP_LOG_LEVEL: 0
+ CONTAINER_LOG_LEVEL: 4
+ ports:
+ - 389:389
+ - backend: geoip_mmdb
+ image: coscale/docker-sleep
+ env: {}
+ ports: []
fail-fast: false
services:
database:
image: ${{ matrix.image }}
- env:
- POSTGRES_USER: runner
- POSTGRES_HOST_AUTH_METHOD: trust
- MYSQL_ALLOW_EMPTY_PASSWORD: 1
- ACCEPT_EULA: Y
- SA_PASSWORD: 'SAsa12%%'
- ports:
- - 3306:3306
- - 5432:5432
- - 1433:1433
+ env: ${{ matrix.env }}
+ ports: ${{ matrix.ports }}
# FIXME: this works around dist-upgrade stopping all docker containers. dist-upgrade is huge on these images anyway. Perhaps we do want to run our tasks in a Docker container too.
options: >-
--restart always
tinydns=[],
authpy=[],
godbc_sqlite3=['libsqliteodbc'],
- godbc_mssql=['freetds-bin','tdsodbc']
+ godbc_mssql=['freetds-bin','tdsodbc'],
+ ldap=[],
+ geoip_mmdb=[]
)
@task(help={'backend': 'Backend to install test deps for, e.g. gsqlite3; can be repeated'}, iterable=['backend'], optional=['backend'])
geoip = [
'geoip',
'geoip-nsec3-narrow'
- # FIXME: also run this with the mmdb we ship
],
lua2 = ['lua2', 'lua2-dnssec'],
tinydns = ['tinydns'],
'godbc_mssql-nsec3-optout',
'godbc_mssql-nsec3-narrow'
],
+ ldap = [
+ 'ldap-tree',
+ 'ldap-simple',
+ 'ldap-strict'
+ ],
+ geoip_mmdb = ['geoip'],
)
godbc_mssql_credentials = {"username": "sa", "password": "SAsa12%%"}
f.write(godbc_config)
c.sudo('sed -i "s/libsqlite3odbc.so/\/usr\/lib\/x86_64-linux-gnu\/odbc\/libsqlite3odbc.so/g" /etc/odbcinst.ini')
+def setup_ldap_client(c):
+ c.sudo('DEBIAN_FRONTEND=noninteractive apt-get install -qq -y ldap-utils')
+ c.sudo('sh -c \'echo "127.0.0.1 ldapserver" | tee -a /etc/hosts\'')
+
@task
def test_auth_backend(c, backend):
pdns_auth_env_vars = 'PDNS=/opt/pdns-auth/sbin/pdns_server PDNS2=/opt/pdns-auth/sbin/pdns_server SDIG=/opt/pdns-auth/bin/sdig NOTIFY=/opt/pdns-auth/bin/pdns_notify NSEC3DIG=/opt/pdns-auth/bin/nsec3dig SAXFR=/opt/pdns-auth/bin/saxfr ZONE2SQL=/opt/pdns-auth/bin/zone2sql ZONE2LDAP=/opt/pdns-auth/bin/zone2ldap ZONE2JSON=/opt/pdns-auth/bin/zone2json PDNSUTIL=/opt/pdns-auth/bin/pdnsutil PDNSCONTROL=/opt/pdns-auth/bin/pdns_control PDNSSERVER=/opt/pdns-auth/sbin/pdns_server SDIG=/opt/pdns-auth/bin/sdig GMYSQLHOST=127.0.0.1 GMYSQL2HOST=127.0.0.1 MYSQL_HOST="127.0.0.1" PGHOST="127.0.0.1" PGPORT="5432"'
c.run(f'{pdns_auth_env_vars} GODBC_MSSQL_PASSWORD={godbc_mssql_credentials["password"]} GODBC_MSSQL_USERNAME={godbc_mssql_credentials["username"]} GODBC_MSSQL_DSN=pdns-mssql-docker GODBC_MSSQL2_PASSWORD={godbc_mssql_credentials["password"]} GODBC_MSSQL2_USERNAME={godbc_mssql_credentials["username"]} GODBC_MSSQL2_DSN=pdns-mssql-docker ./start-test-stop 5300 {variant}')
return
+ if backend == 'ldap':
+ setup_ldap_client(c)
+
+ if backend == 'geoip_mmdb':
+ with c.cd('regression-tests'):
+ for variant in backend_regress_tests[backend]:
+ c.run(f'{pdns_auth_env_vars} geoipdatabase=../modules/geoipbackend/regression-tests/GeoLiteCity.mmdb ./start-test-stop 5300 {variant}')
+ return
+
with c.cd('regression-tests'):
if backend == 'lua2':
c.run('touch trustedkeys') # avoid silly error during cleanup