Replace current failing tests mixed with custom roles with standard tests as described in Fedora CI docs: https://docs.fedoraproject.org/en-US/ci/how-to-add-dist-git-test/ Functionality of test_basic_zone.yml was ported to scripts/test_basic_zone.sh.
18 lines
615 B
Bash
Executable file
18 lines
615 B
Bash
Executable file
#!/bin/bash
|
|
# test basic system-wide functionality of Knot DNS
|
|
set -ex
|
|
|
|
# create zone file from examples
|
|
cp /usr/share/doc/knot/samples/example.com.zone /var/lib/knot/example.com.zone
|
|
# configure knot to serve example.com zone using dark sed magic
|
|
sed 's/^#\?\([ \t]*-[ \t]*domain:[ \t]\+example.com\)[ \t]*$/\1/' -i /etc/knot/knot.conf
|
|
|
|
# (re)start knotd
|
|
systemctl stop knot.service
|
|
systemctl start knot.service || systemctl status knot.service
|
|
|
|
# check valid query is answered
|
|
dig @127.0.0.1 example.com | grep NOERROR
|
|
|
|
# check query for non-existent zone is refused
|
|
dig @127.0.0.1 bad-example.com | grep REFUSED
|