- auth-regress:
context: lmdb-nsec3-narrow
+ test-auth-api:
+ docker:
+ - image: debian:stretch
+ steps:
+ - auth-regress-setup
+ - run: apt-get -y -qq install virtualenv sqlite3
+ - run:
+ name: Run API tests
+ workdir: ~/project/regression-tests.api
+ command: |
+ PDNSSERVER="/opt/pdns-auth/sbin/pdns_server" \
+ PDNSUTIL="/opt/pdns-auth/bin/pdnsutil" \
+ SDIG="/opt/pdns-auth/bin/sdig" \
+ ZONE2SQL="/opt/pdns-auth/bin/zone2sql" \
+ ./runtests authoritative
+
build-recursor:
docker:
- image: debian:stretch
build-and-test-all:
jobs:
- build-auth
+ - test-auth-api:
+ requires:
+ - build-auth
- test-auth-regress-odbc-sqlite3:
requires:
- build-auth
WEBPORT = 5556
DNSPORT = 5300
APIKEY = '1234567890abcdefghijklmnopq-key'
-PDNSUTIL_CMD = ["../pdns/pdnsutil", "--config-dir=."]
+PDNSUTIL_CMD = [os.environ.get("PDNSUTIL", "../pdns/pdnsutil"), "--config-dir=."]
NAMED_CONF_TPL = """
# Generated by runtests.py
if daemon == 'authoritative':
+ zone2sql = os.environ.get("ZONE2SQL", "../pdns/zone2sql")
# Prepare sqlite DB with some zones.
run_check_call(["rm", "-f", SQLITE_DB])
- run_check_call(["make", "-C", "../pdns", "zone2sql"])
+ if zone2sql == "../pdns/zone2sql":
+ run_check_call(["make", "-C", "../pdns", "zone2sql"])
with open('../modules/gsqlite3backend/schema.sqlite3.sql', 'r') as schema_file:
run_check_call(["sqlite3", SQLITE_DB], stdin=schema_file)
with open('named.conf', 'w') as named_conf:
named_conf.write(NAMED_CONF_TPL)
with tempfile.TemporaryFile() as tf:
- p = subprocess.Popen(["../pdns/zone2sql", "--transactions", "--gsqlite", "--named-conf=named.conf"], stdout=tf)
+ p = subprocess.Popen([zone2sql, "--transactions", "--gsqlite", "--named-conf=named.conf"], stdout=tf)
p.communicate()
if p.returncode != 0:
raise Exception("zone2sql failed")