summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
authorNicolas Vollmar <nvo@scaling.ch>2024-04-17 11:14:11 +0200
committerMergify <37929162+mergify[bot]@users.noreply.github.com>2024-04-19 11:48:35 +0000
commit5a8310147b858ab85ed5a00fa6cb1f2e856f6a0c (patch)
treedf34e2aa350271c4d7573d11b8cfffb41c49b6d4 /smoketest/scripts/cli
parent63eb47d62eff7a294e06b438a26f2c2997c53f5b (diff)
downloadvyos-1x-5a8310147b858ab85ed5a00fa6cb1f2e856f6a0c.tar.gz
vyos-1x-5a8310147b858ab85ed5a00fa6cb1f2e856f6a0c.zip
T6246: adds basic haproxy http-check configuration
(cherry picked from commit 785616393557c4e3f616287de81b61a68ba177ac)
Diffstat (limited to 'smoketest/scripts/cli')
-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)