diff options
author | Christian Breunig <christian@breunig.cc> | 2024-04-16 18:40:44 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-16 18:40:44 +0200 |
commit | 8f778f989d8fed30eec0a95d5b1fbb67594c67df (patch) | |
tree | 9821118961aa3ce924f6170287a95498d3262e5a /smoketest/scripts | |
parent | 5a481813c0590d1dd800772251c9ccb25f6faefc (diff) | |
parent | deb92e4661106283d7951570fc9ab243e74bccd9 (diff) | |
download | vyos-1x-8f778f989d8fed30eec0a95d5b1fbb67594c67df.tar.gz vyos-1x-8f778f989d8fed30eec0a95d5b1fbb67594c67df.zip |
Merge pull request #3318 from vyos/mergify/bp/sagitta/pr-3315
T6242: load-balancing reverse-proxy: Ability for ssl backends to not verify server certificates (backport #3315)
Diffstat (limited to 'smoketest/scripts')
-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) |