@@ -2933,7 +2933,7 @@ class UpgradeRegressionTest(RegressionTest):
29332933 @property
29342934 def tests (self ):
29352935 """A list of Test instances to be run as part of this regression test."""
2936- resource_cib = """
2936+ resource_cib1 = """
29372937<resources>
29382938 <primitive id="mySmartFuse" class="ocf" provider="experiment" type="SmartFuse">
29392939 <operations>
@@ -2956,13 +2956,63 @@ class UpgradeRegressionTest(RegressionTest):
29562956 <instance_attributes id-ref="mySmartFuse-outputpower-instanceparams"/>
29572957 </primitive>
29582958</resources>
2959+ """
2960+ resource_cib2 = """
2961+ <cib crm_feature_set="3.19.5" validate-with="pacemaker-1.3" epoch="2" num_updates="0" admin_epoch="0">
2962+ <configuration>
2963+ <crm_config>
2964+ <cluster_property_set id="cib-bootstrap-options">
2965+ <nvpair id="cib-bootstrap-options-stonith-enabled" name="stonith-enabled" value="false"/>
2966+ </cluster_property_set>
2967+ </crm_config>
2968+ <nodes/>
2969+ <resources/>
2970+ <constraints/>
2971+ <rsc_defaults>
2972+ <meta_attributes id="build-resource-defaults">
2973+ <nvpair id="build-resource-stickiness" name="resource-stickiness" value="1"/>
2974+ </meta_attributes>
2975+ </rsc_defaults>
2976+ <acls>
2977+ <acl_role id="acl-role"/>
2978+ <acl_user id="acl-user">
2979+ <role_ref id="acl-role"/>
2980+ </acl_user>
2981+ </acls>
2982+ </configuration>
2983+ <status/>
2984+ </cib>
29592985"""
29602986
2987+ t882_tests3 = [
2988+ Test ("Run cibadmin with upgrade and force flags" , "cibadmin -u --force" ,
2989+ update_cib = True ),
2990+ ]
2991+
2992+ t882_tests0 = [
2993+ Test ("Run cibadmin with upgrade and force flags" , "cibadmin -u --force" ,
2994+ update_cib = True ),
2995+ ]
2996+
2997+ t882_tests1 = [
2998+ Test ("Run cibadmin with upgrade and force flags" , "cibadmin -u --force -x '{cts_cli_data}/cibadmin_invalid_schema.xml'" ,
2999+ update_cib = True ),
3000+ ]
3001+
3002+ t882_tests2 = [
3003+ Test ("Run cibadmin with upgrade and force flags" , "cibadmin -u --force -p" ,
3004+ update_cib = True , stdin = resource_cib2 ),
3005+ ]
3006+
29613007 basic_tests = [
3008+
3009+ TestGroup (t882_tests3 ,
3010+ env = {"CIB_file" : "{cts_cli_data}/cibadmin_invalid_schema.xml" }),
3011+
29623012 Test ("Set stonith-enabled=false" , "crm_attribute -n stonith-enabled -v false" ,
29633013 update_cib = True ),
29643014 Test ("Configure the initial resource" , "cibadmin -M -o resources -p" ,
2965- update_cib = True , stdin = resource_cib ),
3015+ update_cib = True , stdin = resource_cib1 ),
29663016 Test ("Upgrade to latest CIB schema (trigger 2.10.xsl + the wrapping)" ,
29673017 "cibadmin --upgrade --force -V -V" ,
29683018 update_cib = True ),
0 commit comments