summaryrefslogtreecommitdiff
path: root/smoketest/scripts/cli
diff options
context:
space:
mode:
authorsarthurdev <965089+sarthurdev@users.noreply.github.com>2025-08-13 22:35:59 +0200
committersarthurdev <965089+sarthurdev@users.noreply.github.com>2025-08-13 22:35:59 +0200
commit87285fb3d69cb601beb9ab84fb693f7384f97f54 (patch)
tree358d0b693ebd96de5bea0e7ba3ba09afef8ba028 /smoketest/scripts/cli
parent471441d9d6541401c5236399da0b7a56a7dd0ead (diff)
downloadvyos-1x-87285fb3d69cb601beb9ab84fb693f7384f97f54.tar.gz
vyos-1x-87285fb3d69cb601beb9ab84fb693f7384f97f54.zip
haproxy: T7715: Add rule matching on subdomains
Diffstat (limited to 'smoketest/scripts/cli')
-rwxr-xr-xsmoketest/scripts/cli/test_load-balancing_haproxy.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/smoketest/scripts/cli/test_load-balancing_haproxy.py b/smoketest/scripts/cli/test_load-balancing_haproxy.py
index a63a3e7f1..2bc11638e 100755
--- a/smoketest/scripts/cli/test_load-balancing_haproxy.py
+++ b/smoketest/scripts/cli/test_load-balancing_haproxy.py
@@ -202,6 +202,7 @@ class TestLoadBalancingReverseProxy(VyOSUnitTestSHIM.TestCase):
rule_ten = '10'
rule_twenty = '20'
rule_thirty = '30'
+ rule_forty = '40'
send_proxy = 'send-proxy'
max_connections = '1000'
@@ -216,6 +217,9 @@ class TestLoadBalancingReverseProxy(VyOSUnitTestSHIM.TestCase):
self.cli_set(base_path + ['service', frontend, 'rule', rule_twenty, 'set', 'backend', bk_second_name])
self.cli_set(base_path + ['service', frontend, 'rule', rule_thirty, 'url-path', 'end', '/test'])
self.cli_set(base_path + ['service', frontend, 'rule', rule_thirty, 'set', 'backend', bk_second_name])
+ self.cli_set(base_path + ['service', frontend, 'rule', rule_forty, 'domain-name', domain_bk_second])
+ self.cli_set(base_path + ['service', frontend, 'rule', rule_forty, 'set', 'backend', bk_second_name])
+ self.cli_set(base_path + ['service', frontend, 'rule', rule_forty, 'wildcard-domain'])
self.cli_set(back_base + [bk_first_name, 'mode', mode])
self.cli_set(back_base + [bk_first_name, 'server', bk_first_name, 'address', bk_server_first])
@@ -248,6 +252,8 @@ class TestLoadBalancingReverseProxy(VyOSUnitTestSHIM.TestCase):
self.assertIn(f'use_backend {bk_second_name} if {rule_twenty}', config)
self.assertIn(f'acl {rule_thirty} path -i -m end /test', config)
self.assertIn(f'use_backend {bk_second_name} if {rule_thirty}', config)
+ self.assertIn(f'acl {rule_forty} hdr(host) -i -m end .{domain_bk_second}', config)
+ self.assertIn(f'use_backend {bk_second_name} if {rule_forty}', config)
# Backend
self.assertIn(f'backend {bk_first_name}', config)