Skip to content

Commit e768d70

Browse files
Gaurav AradhyeSrikanteswaraRao Talluri
authored andcommitted
CLOUDSTACK-8261: test_haproxy.py - Remove the code checking AppCookle and LbCookie Stickiness policies
Signed-off-by: SrikanteswaraRao Talluri <talluri@apache.org>
1 parent 8bfda97 commit e768d70

1 file changed

Lines changed: 19 additions & 22 deletions

File tree

test/integration/component/test_haproxy.py

Lines changed: 19 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,8 @@ def test_01_create_sticky_policy_default_values(self):
357357
self.virtual_machine,
358358
self.virtual_machine_2])
359359

360-
methods = ["SourceBased", "AppCookie", "LBCookie"]
360+
#TODO: Add code to check the AppCookie and LbCookie Stickiness policies
361+
methods = ["SourceBased"]
361362
for method in methods:
362363
self.debug("Creating stickiness policy for the LB rule: %s" %
363364
lb_rule.id)
@@ -390,10 +391,9 @@ def test_02_create_sticky_policy_custom_values(self):
390391

391392
lb_methods = ["roundrobin", "leastconn", "source"]
392393

393-
configs = {"SourceBased": {"tablesize": '100k'},
394-
"AppCookie": {"request-learn": "true"},
395-
"LBCookie": {"nocache": "true"}}
394+
configs = {"SourceBased": {"tablesize": '100k'}}
396395

396+
#TODO: Add code to check the AppCookie and LbCookie Stickiness policies
397397
for lb_method in lb_methods:
398398
self.debug("Creating a load balancing rule on IP %s and algo %s" %
399399
(self.public_ip.ipaddress.ipaddress, lb_method))
@@ -491,9 +491,8 @@ def test_04_delete_lb_rule(self):
491491

492492
lb_methods = ["roundrobin", "leastconn", "source"]
493493

494-
configs = {"SourceBased": {"tablesize": '100k'},
495-
"AppCookie": {"request-learn": "true"},
496-
"LBCookie": {"nocache": "true"}}
494+
#TODO: Add code to check the AppCookie and LbCookie Stickiness policies
495+
configs = {"SourceBased": {"tablesize": '100k'}}
497496
for lb_method in lb_methods:
498497
for method, params in configs.items():
499498
self.debug("Creating load balancing rule on IP %s & algo %s" %
@@ -562,9 +561,8 @@ def test_05_error_alerts_after_create(self):
562561
# 4. No errors should be shown in the logs and alerts
563562

564563
lb_methods = ["roundrobin", "leastconn", "source"]
565-
configs = {"SourceBased": {"tablesize": '100k'},
566-
"AppCookie": {"request-learn": "true"},
567-
"LBCookie": {"nocache": "true"}}
564+
#TODO: Add code to check the AppCookie and LbCookie Stickiness policies
565+
configs = {"SourceBased": {"tablesize": '100k'}}
568566
for lb_method in lb_methods:
569567
for method, params in configs.items():
570568
self.debug("Creating load balancing rule on IP %s & algo %s" %
@@ -628,9 +626,8 @@ def test_06_release_ip(self):
628626

629627
lb_methods = ["roundrobin", "leastconn", "source"]
630628

631-
configs = {"SourceBased": {"tablesize": '100k'},
632-
"AppCookie": {"request-learn": "true"},
633-
"LBCookie": {"nocache": "true"}}
629+
#TODO: Add code to check the AppCookie and LbCookie Stickiness policies
630+
configs = {"SourceBased": {"tablesize": '100k'}}
634631

635632
for lb_method in lb_methods:
636633
for method, params in configs.items():
@@ -699,14 +696,14 @@ def test_07_delete_account(self):
699696
self.virtual_machine,
700697
self.virtual_machine_2])
701698

702-
policies = self.configure_Stickiness_Policy(lb_rule, method="LbCookie")
699+
policies = self.configure_Stickiness_Policy(lb_rule, method="SourceBased")
703700
policy = policies.stickinesspolicy[0]
704701

705702
self.debug("Policy: %s" % str(policy))
706703
self.debug("Validating the stickiness policy")
707704
self.validate_Stickiness_Policy(
708705
lb_rule,
709-
"LbCookie",
706+
"SourceBased",
710707
self.public_ip.ipaddress.ipaddress)
711708

712709
# removing account from cleanup list as we're deleting account
@@ -751,7 +748,7 @@ def test_08_create_policy_router_stopped(self):
751748
self.debug("Stopping the router: %s" % router.name)
752749
Router.stop(self.apiclient, id=router.id)
753750

754-
policies = self.configure_Stickiness_Policy(lb_rule, method="LbCookie")
751+
policies = self.configure_Stickiness_Policy(lb_rule, method="SourceBased")
755752
policy = policies.stickinesspolicy[0]
756753

757754
self.debug("Starting the router: %s" % router.name)
@@ -761,7 +758,7 @@ def test_08_create_policy_router_stopped(self):
761758
self.debug("Validating the stickiness policy")
762759
self.validate_Stickiness_Policy(
763760
lb_rule,
764-
"LbCookie",
761+
"SourceBased",
765762
self.public_ip.ipaddress.ipaddress)
766763
return
767764

@@ -788,14 +785,14 @@ def test_09_create_policy_router_destroy(self):
788785
self.account.name)
789786
router = self.get_router(self.account)
790787

791-
policies = self.configure_Stickiness_Policy(lb_rule, method="LbCookie")
788+
policies = self.configure_Stickiness_Policy(lb_rule, method="SourceBased")
792789
policy = policies.stickinesspolicy[0]
793790

794791
self.debug("Policy: %s" % str(policy))
795792
self.debug("Validating the stickiness policy")
796793
self.validate_Stickiness_Policy(
797794
lb_rule,
798-
"LbCookie",
795+
"SourceBased",
799796
self.public_ip.ipaddress.ipaddress)
800797

801798
self.debug("Destroying the router: %s" % router.name)
@@ -823,14 +820,14 @@ def test_10_create_policy_enable_disable_vpn(self):
823820
self.virtual_machine,
824821
self.virtual_machine_2])
825822

826-
policies = self.configure_Stickiness_Policy(lb_rule, method="LbCookie")
823+
policies = self.configure_Stickiness_Policy(lb_rule, method="SourceBased")
827824
policy = policies.stickinesspolicy[0]
828825

829826
self.debug("Policy: %s" % str(policy))
830827
self.debug("Validating the stickiness policy")
831828
self.validate_Stickiness_Policy(
832829
lb_rule,
833-
"LbCookie",
830+
"SourceBased",
834831
self.public_ip.ipaddress.ipaddress)
835832

836833
self.debug("Enabling VPN on Public Ip: %s" %
@@ -840,7 +837,7 @@ def test_10_create_policy_enable_disable_vpn(self):
840837
self.debug("Validating the stickiness policy after enabling VPN")
841838
self.validate_Stickiness_Policy(
842839
lb_rule,
843-
"LbCookie",
840+
"SourceBased",
844841
self.public_ip.ipaddress.ipaddress)
845842
return
846843

0 commit comments

Comments
 (0)