From dbce5c58fc60554c1fae6a8da9311930b5b7f523 Mon Sep 17 00:00:00 2001 From: William Harrison <87287585+wdhdev@users.noreply.github.com> Date: Mon, 13 Jan 2025 10:56:48 +0800 Subject: [PATCH] stop URL records being combined with other records --- tests/records.test.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/records.test.js b/tests/records.test.js index de5ecbadc..819c70d1a 100644 --- a/tests/records.test.js +++ b/tests/records.test.js @@ -83,7 +83,6 @@ t("All files should have valid record types", (t) => { t.true(validateRecordType(key), `${file}: Invalid record type: ${key}`); }); - // Specific record rules for CNAME, NS, and DS if (recordKeys.includes("CNAME") && !data.proxied) { t.is(recordKeys.length, 1, `${file}: CNAME records cannot be combined with other records unless proxied`); } @@ -98,7 +97,13 @@ t("All files should have valid record types", (t) => { if (recordKeys.includes("DS")) { t.true(recordKeys.includes("NS"), `${file}: DS records must be combined with NS records`); } + + if (recordKeys.includes("URL") { + t.true(!recordKeys.includes("A") && !recordKeys.includes("AAAA") && !recordKeys.includes("CNAME"), `${file}: URL records cannot be combined with A, AAAA, or CNAME records`); + } }); + + t.pass(); }); t("All files should not have duplicate record keys", (t) => {