@@ -779,17 +779,16 @@ def test_check_cluster_configuration(self, ssh):
779779 print (f"ERROR: Couldn't find element temp_crm_config[rsc_defaults]" )
780780 return False
781781 lst = elem .text .split ('\n ' )
782+ if not lst :
783+ print (f'ERROR: temp_crm_config[rsc_defaults] is empty' )
784+ return False
782785 for a in ['migration-threshold' ]:
783786 if a not in lst :
784787 lst .append (a )
785- lst .sort ()
786- lst2 = LongLiterals .RSC_DEFAULT_ATTRIBUTES .split ('\n ' )
787- lst2 .sort ()
788- if lst != lst2 :
789- print (f"ERROR: temp_crm_config[rsc_defaults] has WRONG values." )
790- print (f" Expected: { lst } " )
791- print (f" Exist: { lst2 } " )
792- return False
788+ for a in lst :
789+ if a not in LongLiterals .RSC_DEFAULT_ATTRIBUTES .split ('\n ' ):
790+ print (f'ERROR: temp_crm_config[rsc_defaults] has the WRONG option: { a } ' )
791+ return False
793792
794793 elem = self .find_element (By .NAME , 'temp_crm_config[op_defaults]' )
795794 if not elem :
@@ -849,7 +848,7 @@ def test_check_cluster_configuration(self, ssh):
849848 time .sleep (1 )
850849
851850 # ["<resource name>", ["<option1>", "<option2>,..."]]
852- for check_options in [ ["no-quorum-policy" , ["stop" , "freeze" , "ignore" , "demote" , "suicide" ]],
851+ for check_options in [ ["no-quorum-policy" , ["stop" , "fence" , " freeze" , "ignore" , "demote" , "suicide" ]],
853852 ["stonith-action" , ["reboot" , "off" , "poweroff" ]],
854853 ["node-health-strategy" , ["none" , "migrate-on-red" , "only-green" , "progressive" , "custom" ]],
855854 ["placement-strategy" , ["default" , "utilization" , "minimal" , "balanced" ]]]:
@@ -859,13 +858,13 @@ def test_check_cluster_configuration(self, ssh):
859858 return False
860859
861860 lst = elem .text .split ('\n ' )
862- lst .sort ()
863- check_options [1 ].sort ()
864- if lst != check_options [1 ]:
865- print (f'ERROR: { check_options [0 ]} has WRONG options.' )
866- print (f" Expected: { lst } " )
867- print (f" Exist: { check_options [1 ]} " )
861+ if not lst :
862+ print (f'ERROR: crm_config[crm_config][{ check_options [0 ]} ] is empty' )
868863 return False
864+ for a in lst :
865+ if a not in check_options [1 ]:
866+ print (f'ERROR: crm_config[crm_config][{ check_options [0 ]} ] has the WRONG option: { a } ' )
867+ return False
869868 print (f"INFO: Resource options are correct" )
870869
871870 time .sleep (self .timeout_scale )
0 commit comments