Files
coredns/.github/workflows/go.test.yml
houyuwushang 5aa4dc2941 plugin/dynupdate: add durable authenticated RFC 2136 updates (#8520)
* plugin/dynupdate: add authenticated RFC 2136 updates

Signed-off-by: houyuwushang <liuluoqianqiu@outlook.com>

* plugin/dynupdate: fix README test fixtures

Signed-off-by: houyuwushang <liuluoqianqiu@outlook.com>

* test: format README fixture map

Signed-off-by: houyuwushang <liuluoqianqiu@outlook.com>

* plugin/dynupdate: persist updates and bound writable zones

Signed-off-by: houyuwushang <liuluoqianqiu@outlook.com>

* plugin/dynupdate: preserve middleware and fix interoperability fixtures

Signed-off-by: houyuwushang <liuluoqianqiu@outlook.com>

* test(dynupdate): validate Kea lifecycle and bounded zone costs

Signed-off-by: houyuwushang <liuluoqianqiu@outlook.com>

* plugin/dynupdate: reject duplicate directives and harden client fixtures

Signed-off-by: houyuwushang <liuluoqianqiu@outlook.com>

* plugin/dynupdate: fix update routing and startup validation

Signed-off-by: houyuwushang <liuluoqianqiu@outlook.com>

---------

Signed-off-by: houyuwushang <liuluoqianqiu@outlook.com>
2026-09-22 00:53:26 -07:00

166 lines
4.9 KiB
YAML

name: Go Tests
on:
push:
branches:
- master
pull_request:
permissions:
contents: read
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: .go-version
id: go
- name: Build
run: go build -v ./...
- name: Test
run: |
( cd request; go test -race ./... )
( cd core; go test -race ./... )
( cd coremain; go test -race ./... )
- name: Build manual-registration mode
run: go build -tags=coredns_manual_registration ./...
- name: Test manual-registration mode
run: go test -race -tags=coredns_manual_registration ./core/dnsserver ./coremain
test-windows:
name: Test Windows
runs-on: windows-latest
steps:
- name: Check out code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: .go-version
id: go
- name: Build
run: go build -v ./...
- name: Test
shell: bash
run: |
( cd request; go test -race ./... )
( cd core; go test -race ./... )
( cd coremain; go test -race ./... )
- name: Build manual-registration mode
run: go build -tags=coredns_manual_registration ./...
- name: Test manual-registration mode
run: go test -race -tags=coredns_manual_registration ./core/dnsserver ./coremain
test-plugins:
name: Test Plugins
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Check out code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: .go-version
id: go
- name: Build
run: go build -v ./...
- name: Test
shell: bash
run: ( cd plugin; go test -race ./... )
test-e2e:
name: Test e2e
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install Go
uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0
with:
go-version-file: .go-version
id: go
- name: Build
run: go build -v ./...
- name: Install clients for DDNS interoperability tests
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends bind9-dnsutils kea-dhcp-ddns-server
nsupdate -V
kea-dhcp-ddns -v
# Keep the distribution AppArmor profile and use its allowed paths.
sudo systemctl stop kea-dhcp-ddns-server
sudo install -d -m 0700 -o "$(id -u)" -g "$(id -g)" /etc/kea/coredns-tests
sudo install -d -m 0755 -o "$(id -u)" -g "$(id -g)" /run/kea
sudo install -m 0600 -o "$(id -u)" -g "$(id -g)" /dev/null /run/kea/logger_lockfile
test ! -e /run/kea/kea-dhcp-ddns.kea-dhcp-ddns.pid
- name: Test
env:
COREDNS_KEA_CONFIG_DIR: /etc/kea/coredns-tests
KEA_PIDFILE_DIR: /run/kea
KEA_LOCKFILE_DIR: /run/kea
run: |
( cd test; go test -race ./... )
test-makefile-release:
name: Test Makefile.release
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Install dependencies
run: sudo apt-get install make curl
- name: Test Makefile.release release
run: make GITHUB_ACCESS_TOKEN=x release -f Makefile.release
- name: Test Makefile.release release/github-push (dry-run)
run: make GITHUB_ACCESS_TOKEN=x -n release github-push -f Makefile.release
- name: Test Makefile.docker release/github-push (dry-run)
run: make VERSION=x DOCKER=x -n release docker-push -f Makefile.docker
- name: Prepare Docker build
run: |
for arch in amd64 arm arm64 mips64le ppc64le s390x riscv64 loong64; do
mkdir -p build/docker/$arch
cp build/linux/$arch/coredns build/docker/$arch/
done
- name: Test Makefile.docker build
run: make VERSION=x DOCKER=x -f Makefile.docker docker-build