Update Actions and deploy using the configured Pages URL
CI / test (3.9) (push) Canceled after 0s
CI / test (3.x) (push) Canceled after 0s
Pages / build (push) Canceled after 0s
Pages / deploy (push) Canceled after 0s

This commit is contained in:
MeghdadFadaee committed 2026-11-04 21:59:48 +03:30
1 parent 1a445e94a3
commit 4902720c80
6 files changed
+64 -18

No files matched your search

+19
View File
@@ -48,6 +48,25 @@ class BuildTests(unittest.TestCase):
with tarfile.open(Path(directory) / 'output' / release['archive']) as package:
self.assertFalse(any('local-secret' in name for name in package.getnames()))
def test_custom_domain_updates_all_public_install_urls(self):
with tempfile.TemporaryDirectory() as directory:
output = Path(directory)
release = builder.build(output, 'http://status.example.org/tools/shell-gleam/')
canonical = 'https://status.example.org/tools/shell-gleam'
self.assertEqual(release['site_url'], canonical)
for name in ('index.html', 'app.js', 'setup.sh'):
text = (output / name).read_text()
self.assertIn(canonical, text)
self.assertNotIn(builder.DEFAULT_SITE_URL, text)
def test_invalid_site_url_is_rejected_before_writing(self):
with tempfile.TemporaryDirectory() as directory:
output = Path(directory) / 'output'
for url in ('file:///etc', 'https://example.org/\';touch', 'https://example.org/\nnext'):
with self.subTest(url=url), self.assertRaises(ValueError):
builder.build(output, url)
self.assertFalse(output.exists())
def test_source_root_cannot_be_output(self):
with self.assertRaises(ValueError):
builder.build(ROOT, 'https://example.github.io/shell-gleam')