mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2026-11-10 12:47:04 +00:00
test(domains): read the primary domain from default.env in every test
The hardcoded-primary-domain lint exempted tests/ and scripts/tests/, so test fixtures kept their own copy of the domain and would drift from INFINITO_DOMAIN the moment it changes. The lint now scans both trees, and a unit test pins its scope: only default.env, Markdown, inventories/, .claude/ and build/ may name the domain. Python tests take the value from default_domain_primary(), and the workspace helper builds its dashboard and Matomo URLs from INFINITO_DOMAIN once the repo .env is loaded. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
e8cb94e246
commit
e2beab9f1c
34 files changed
+371
-290
No files matched your search
@@ -14,8 +14,10 @@ import unittest
|
||||
from pathlib import Path
|
||||
|
||||
from utils.cache.files import PROJECT_ROOT
|
||||
from utils.domains.default_primary import default_domain_primary
|
||||
|
||||
SAMPLER = PROJECT_ROOT / "scripts" / "tests" / "deploy" / "ci" / "dns53-sampler.sh"
|
||||
DOMAIN = default_domain_primary()
|
||||
|
||||
HEADER = (
|
||||
" sl local_address rem_address st tx_queue rx_queue tr tm->when "
|
||||
@@ -107,8 +109,8 @@ class ZoneProbeNameTests(unittest.TestCase):
|
||||
|
||||
def test_the_owned_zone_becomes_a_probe_name(self):
|
||||
self.assertEqual(
|
||||
self._zone("no-resolv\naddress=/infinito.test/192.168.244.10\n"),
|
||||
"rescue-probe.infinito.test",
|
||||
self._zone(f"no-resolv\naddress=/{DOMAIN}/192.168.244.10\n"),
|
||||
f"rescue-probe.{DOMAIN}",
|
||||
)
|
||||
|
||||
def test_a_config_without_a_zone_yields_nothing(self):
|
||||
|
||||
Reference in new issue
Block a user