Ejemplo n.º 1
0
 def test_wait_ok_not_running(self):
     (self.config.runner.pcmk.load_state(
         resources=self.fixture_status_not_running))
     simple_bundle_update(self.env_assist.get_env())
     self.env_assist.assert_reports([
         fixture.report_resource_not_running("B1", severities.INFO),
     ])
Ejemplo n.º 2
0
 def test_wait_ok_run_fail(self):
     (self.config.env.push_cib(
         resources=fixture_resources_bundle_simple,
         wait=TIMEOUT).runner.pcmk.load_state(
             resources=self.fixture_status_not_running))
     self.env_assist.assert_raise_library_error(
         lambda: simple_bundle_create(self.env_assist.get_env()), [
             fixture.report_resource_not_running("B1", severities.ERROR),
         ])
Ejemplo n.º 3
0
 def test_group_not_running(self):
     resources_state = fixture.complete_state_resources(
         etree.fromstring("""
         <resources>
             <group id="G" number_resources="2">
                 <resource id="R1" role="Started" nodes_running_on="1">
                      <node name="node1" id="1" cached="false" />
                  </resource>
                 <resource id="R2" role="Stopped" nodes_running_on="0">
                  </resource>
             </group>
         </resources>
     """))
     self.config.runner.pcmk.load_state(
         resources=etree_to_str(resources_state))
     resource.group_add(
         self.env_assist.get_env(),
         "G",
         ["R1", "R2"],
         wait=self.timeout,
     )
     self.env_assist.assert_reports([
         fixture.report_resource_not_running("G"),
     ])