Document and test public hosting deployments
This commit is contained in:
1 parent
9e66510f7c
commit
4a955c7095
3 files changed
+317
-15
No files matched your search
@@ -74,6 +74,43 @@ class InstallerParametersTests(unittest.TestCase):
|
||||
self.assertEqual(plan.mail.host_key, str(path))
|
||||
self.assertEqual(plan.mail.port, 2222)
|
||||
|
||||
def test_remote_bootstrap_shares_a_host_between_roles(self):
|
||||
with tempfile.TemporaryDirectory() as folder:
|
||||
key = Path(folder) / "host.pub"
|
||||
key.write_text("ssh-ed25519 fixture-key\n")
|
||||
connection = {
|
||||
"mode": "remote-install",
|
||||
"host": "192.0.2.41",
|
||||
"host_key": str(key),
|
||||
"ssh_user": "operator",
|
||||
"ssh_identity": "/root/node-install-key",
|
||||
}
|
||||
plan = parse_plan(
|
||||
{
|
||||
"panel": {
|
||||
"hostname": "panel.example.net",
|
||||
"access": "acme",
|
||||
},
|
||||
"admin": ADMIN,
|
||||
"dns": connection,
|
||||
"mail": connection
|
||||
| {
|
||||
"mail_hostname": "mx.example.net",
|
||||
"tls": "acme",
|
||||
},
|
||||
}
|
||||
)
|
||||
self.assertEqual(plan.dns.host, plan.mail.host)
|
||||
self.assertEqual(plan.dns.ssh_user, "operator")
|
||||
self.assertEqual(plan.mail.host, "192.0.2.41")
|
||||
self.assertEqual(plan.mail.mail_hostname, "mx.example.net")
|
||||
self.assertEqual(
|
||||
plan.mail.key,
|
||||
"/etc/letsencrypt/live/mx.example.net/privkey.pem",
|
||||
)
|
||||
self.assertIn("192.0.2.41", plan.description())
|
||||
self.assertNotIn("/root/node-install-key", plan.description())
|
||||
|
||||
def test_password_file_must_be_private_and_regular(self):
|
||||
with tempfile.TemporaryDirectory() as folder:
|
||||
path = Path(folder) / "password"
|
||||
|
||||
Reference in new issue
Block a user