summaryrefslogtreecommitdiff
path: root/smoketest
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@vyos.io>2024-04-19 13:47:07 +0200
committerGitHub <noreply@github.com>2024-04-19 13:47:07 +0200
commit89b56ef6da19ccff2df508e4e4a04d4feff0e04e (patch)
tree66c07495d04bbc62ae18acc9de880ece6f6616ab /smoketest
parent8bb55a50d08b114562bac4e4d46dc3310055c771 (diff)
parent785616393557c4e3f616287de81b61a68ba177ac (diff)
downloadvyos-1x-89b56ef6da19ccff2df508e4e4a04d4feff0e04e.tar.gz
vyos-1x-89b56ef6da19ccff2df508e4e4a04d4feff0e04e.zip
Merge pull request #3325 from nvollmar/haproxy-http-check
T6246: basic haproxy http-check configuration
Diffstat (limited to 'smoketest')
-rwxr-xr-xsmoketest/scripts/cli/test_load-balancing_reverse-proxy.py15
1 files changed, 15 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 d21fc762b..8ccf2cf97 100755
--- a/smoketest/scripts/cli/test_load-balancing_reverse-proxy.py
+++ b/smoketest/scripts/cli/test_load-balancing_reverse-proxy.py
@@ -298,6 +298,21 @@ class TestLoadBalancingReverseProxy(VyOSUnitTestSHIM.TestCase):
with self.assertRaises(ConfigSessionError) as e:
self.cli_commit()
+ def test_05_lb_reverse_proxy_backend_http_check(self):
+ # Setup base
+ self.base_config()
+
+ # Set http-check
+ self.cli_set(base_path + ['backend', 'bk-01', 'http-check', 'method', 'get'])
+ self.cli_set(base_path + ['backend', 'bk-01', 'http-check', 'uri', '/health'])
+ self.cli_set(base_path + ['backend', 'bk-01', 'http-check', 'expect', 'status 200'])
+ self.cli_commit()
+
+ # Test http-check
+ config = read_file(HAPROXY_CONF)
+ self.assertIn('option httpchk', config)
+ self.assertIn('http-check send meth GET uri /health', config)
+ self.assertIn('http-check expect status 200', config)
if __name__ == '__main__':
unittest.main(verbosity=2)