diff options
| author | Daniil Baturin <daniil@vyos.io> | 2025-05-06 15:18:45 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-06 15:18:45 +0100 |
| commit | a0805e37e1f3935cb1cb016082797b4e664bb920 (patch) | |
| tree | 04596a066353084bc8920cf6a1e99a5bf830698a /src/tests/test_template.py | |
| parent | 1142072141a73596fc8aa0822e8893274632f202 (diff) | |
| parent | f40cf6064a02fbb6baae924e94b9183d6bd87474 (diff) | |
| download | vyos-1x-a0805e37e1f3935cb1cb016082797b4e664bb920.tar.gz vyos-1x-a0805e37e1f3935cb1cb016082797b4e664bb920.zip | |
Merge pull request #4480 from c-po/T7122-pki
T7122: pki: unable to switch from custom cert to ACME when HAProxy service is running with 'redirect-http-to-https' option
Diffstat (limited to 'src/tests/test_template.py')
| -rw-r--r-- | src/tests/test_template.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/tests/test_template.py b/src/tests/test_template.py index 6377f6da5..7cae867a0 100644 --- a/src/tests/test_template.py +++ b/src/tests/test_template.py @@ -190,3 +190,12 @@ class TestVyOSTemplate(TestCase): for group_name, group_config in data['ike_group'].items(): ciphers = vyos.template.get_esp_ike_cipher(group_config) self.assertIn(IKEv2_DEFAULT, ','.join(ciphers)) + + def test_get_default_port(self): + from vyos.defaults import internal_ports + + with self.assertRaises(RuntimeError): + vyos.template.get_default_port('UNKNOWN') + + self.assertEqual(vyos.template.get_default_port('certbot_haproxy'), + internal_ports['certbot_haproxy']) |
