Exemple #1
0
 def test_wait_ok_run_fail(self):
     self.runner.set_runs(
         self.fixture_calls_initial() + fixture.call_wait(self.timeout) +
         fixture.call_status(
             fixture.state_complete(self.fixture_status_not_running)))
     assert_raise_library_error(
         lambda: self.simple_bundle_create(self.timeout),
         fixture.report_resource_not_running("B1", severities.ERROR),
     )
     self.runner.assert_everything_launched()
Exemple #2
0
 def test_wait_ok_not_running(self):
     self.runner.set_runs(
         self.fixture_calls_initial() + fixture.call_wait(self.timeout) +
         fixture.call_status(
             fixture.state_complete(self.fixture_status_not_running)))
     self.simple_bundle_update(self.timeout)
     self.env.report_processor.assert_reports([
         fixture.report_resource_not_running("B1", severities.INFO),
     ])
     self.runner.assert_everything_launched()
Exemple #3
0
 def test_disabled_wait_ok_not_running(self):
     self.runner.set_runs(fixture.call_dummy_metadata(
     ) + fixture.call_wait_supported() + fixture.calls_cib(
         self.fixture_resources_pre,
         self.fixture_resources_post_disabled,
         cib_base_file=self.upgraded_cib,
     ) + fixture.call_wait(10) + fixture.call_status(
         fixture.state_complete(self.fixture_status_primitive_not_running)))
     self.simplest_create(10, disabled=True)
     self.env.report_processor.assert_reports(
         [fixture.report_resource_not_running("A")])
     self.runner.assert_everything_launched()
Exemple #4
0
 def test_wait_ok_run_fail(self):
     self.runner.set_runs(fixture.call_dummy_metadata(
     ) + fixture.call_wait_supported() + fixture.calls_cib(
         self.fixture_resources_pre,
         self.fixture_resources_post_simple,
         cib_base_file=self.upgraded_cib,
     ) + fixture.call_wait(10) + fixture.call_status(
         fixture.state_complete(self.fixture_status_primitive_not_running)))
     assert_raise_library_error(
         lambda: self.simplest_create(10),
         fixture.report_resource_not_running("A", severities.ERROR),
     )
     self.runner.assert_everything_launched()