diff options
author | Daniil Baturin <daniil@vyos.io> | 2024-04-16 17:06:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-16 17:06:37 +0200 |
commit | c0eec365e2e35afe8162304d065f944ff0c42575 (patch) | |
tree | eeb4ee4e22837ed9453b439a77c155198f655081 /smoketest | |
parent | 42082cba2f0e8c01da006bca45c3fdfa7d85c7ec (diff) | |
parent | aafe22d08bb38a579dd5075fd27a1b88beeca791 (diff) | |
download | vyos-1x-c0eec365e2e35afe8162304d065f944ff0c42575.tar.gz vyos-1x-c0eec365e2e35afe8162304d065f944ff0c42575.zip |
Merge pull request #3315 from Embezzle/T6242
T6242: load-balancing reverse-proxy: Ability for ssl backends to not verify server certificates
Diffstat (limited to 'smoketest')
-rwxr-xr-x | smoketest/scripts/cli/test_load-balancing_reverse-proxy.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_load-balancing_reverse-proxy.py b/smoketest/scripts/cli/test_load-balancing_reverse-proxy.py index 97304da8b..d21fc762b 100755 --- a/smoketest/scripts/cli/test_load-balancing_reverse-proxy.py +++ b/smoketest/scripts/cli/test_load-balancing_reverse-proxy.py @@ -280,6 +280,24 @@ class TestLoadBalancingReverseProxy(VyOSUnitTestSHIM.TestCase): self.cli_set(base_path + ['backend', 'bk-01', 'ssl', 'ca-certificate', 'smoketest']) self.cli_commit() + def test_04_lb_reverse_proxy_backend_ssl_no_verify(self): + # Setup base + self.configure_pki() + self.base_config() + + # Set no-verify option + self.cli_set(base_path + ['backend', 'bk-01', 'ssl', 'no-verify']) + self.cli_commit() + + # Test no-verify option + config = read_file(HAPROXY_CONF) + self.assertIn('server bk-01 192.0.2.11:9090 send-proxy ssl verify none', config) + + # Test setting ca-certificate alongside no-verify option fails, to test config validation + self.cli_set(base_path + ['backend', 'bk-01', 'ssl', 'ca-certificate', 'smoketest']) + with self.assertRaises(ConfigSessionError) as e: + self.cli_commit() + if __name__ == '__main__': unittest.main(verbosity=2) |