Decouple keep-query-ip from drop-query-ip to fix filtering (#405) #740
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: tests powerdns | |
on: | |
push: | |
paths-ignore: | |
- 'docs/**' | |
- 'README.md' | |
branches: | |
- main | |
pull_request: | |
paths-ignore: | |
- 'docs/**' | |
- 'README.md' | |
branches: | |
- main | |
jobs: | |
dnsdist: | |
runs-on: ubuntu-22.04 | |
env: | |
COLLECTOR_USER: pdns | |
strategy: | |
matrix: | |
go-version: [ '1.19', '1.20' ] | |
dnsdist: [ '17', '18' ] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- uses: actions/setup-python@v4 | |
- name: build binary | |
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o go-dnscollector *.go | |
- name: Deploy dnsdist docker image | |
run: | | |
sudo docker run -d --network="host" --name=dnsdist --volume=$PWD/testsdata/powerdns/dnsdist_protobuf.conf:/etc/dnsdist/conf.d/dnsdist.conf:z -v /tmp/:/tmp/ powerdns/dnsdist-${{ matrix.dnsdist }} | |
until (dig -p 5553 www.github.com @127.0.0.1 | grep NOERROR); do sleep 5.0; done | |
- name: Test dns query | |
run: | | |
sudo python3 -m pip install dnspython | |
sudo -E python3 -m unittest tests.dnsquery_powerdns -v | |
recursor: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
go-version: [ '1.19', '1.20' ] | |
recursor: [ '47', '48' ] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-go@v3 | |
with: | |
go-version: ${{ matrix.go-version }} | |
- uses: actions/setup-python@v4 | |
- name: build binary | |
run: CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o go-dnscollector *.go | |
- name: Deploy recursor docker image | |
run: | | |
sudo docker run -d --network="host" --name=recursor --volume=$PWD/testsdata/powerdns/pdns_recursor.lua:/etc/powerdns/recursor.lua:z --volume=$PWD/testsdata/powerdns/pdns_recursor.conf:/etc/powerdns/recursor.conf:z powerdns/pdns-recursor-${{ matrix.recursor }} | |
until (dig -p 5553 www.github.com @127.0.0.1 | grep NOERROR); do sleep 5.0; done | |
- name: Test send query | |
run: | | |
sudo python3 -m pip install dnspython | |
sudo -E python3 -m unittest tests.dnsquery_powerdns -v |