From 1a750d78ea21a566aee36636c118566e8e6b0d1e Mon Sep 17 00:00:00 2001 From: missytake Date: Tue, 17 Dec 2024 22:06:09 +0100 Subject: [PATCH] CI: test all DNS records --- .github/workflows/test-and-deploy-ipv4only.yaml | 2 +- .github/workflows/test-and-deploy.yaml | 2 +- cmdeploy/src/cmdeploy/dns.py | 4 +++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-and-deploy-ipv4only.yaml b/.github/workflows/test-and-deploy-ipv4only.yaml index 37d684fd..2f25b25a 100644 --- a/.github/workflows/test-and-deploy-ipv4only.yaml +++ b/.github/workflows/test-and-deploy-ipv4only.yaml @@ -96,5 +96,5 @@ jobs: run: CHATMAIL_DOMAIN2=nine.testrun.org cmdeploy test --slow - name: cmdeploy dns - run: cmdeploy dns -v + run: cmdeploy dns -v --all diff --git a/.github/workflows/test-and-deploy.yaml b/.github/workflows/test-and-deploy.yaml index 53aa79a8..77fe556a 100644 --- a/.github/workflows/test-and-deploy.yaml +++ b/.github/workflows/test-and-deploy.yaml @@ -94,5 +94,5 @@ jobs: run: CHATMAIL_DOMAIN2=nine.testrun.org cmdeploy test --slow - name: cmdeploy dns - run: cmdeploy dns -v + run: cmdeploy dns -v --all diff --git a/cmdeploy/src/cmdeploy/dns.py b/cmdeploy/src/cmdeploy/dns.py index edf23067..ead1c895 100644 --- a/cmdeploy/src/cmdeploy/dns.py +++ b/cmdeploy/src/cmdeploy/dns.py @@ -55,11 +55,13 @@ def check_full_zone(sshexec, remote_data, out, zonefile, all) -> int: for line in required_diff: out(line) print() - returncode += 1 + returncode = 1 if recommended_diff and (all or not required_diff): out("WARNING: these recommended DNS entries are not set:\n") for line in recommended_diff: out(line) + if all: + returncode = 1 if not (recommended_diff or required_diff): out.green("Great! All your DNS entries are verified and correct.")