fix: provision Debian cell with rogee SSH access

This commit is contained in:
2026-09-15 11:31:05 +08:00
parent 11b69fd309
commit fb21f56aec
3 changed files with 127 additions and 14 deletions
+13
View File
@@ -272,6 +272,19 @@ class AsteriskTests(unittest.TestCase):
with self.assertRaises(ValueError):
user_data.immutable_image("registry.example/asterisk:latest")
def test_bootstrap_enforces_rogee_key_only_ssh(self):
content = Path("deploy/asterisk_bootstrap.sh").read_text()
for marker in (
"ROGEE_USER=\"rogee\"",
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPoGJTH1JrXbWu+ZhIgaHMhume0oWQiWmadhTwbk75Ny rogee@ipao.vip",
"PasswordAuthentication no",
"KbdInteractiveAuthentication no",
"PermitRootLogin no",
"AllowUsers rogee",
"systemctl enable --now ssh",
):
self.assertIn(marker, content)
def test_codec_profile_is_rendered_without_global_fallback(self):
cfg = self.cfg()
cfg["primary"]["codec_profile"] = {