Пример #1
0
 def test_upgrade_cib(self):
     self.runner.set_runs(
         fixture_agent_load_calls() +
         fixture.calls_cib_load_and_upgrade(self.fixture_empty_resources) +
         fixture.calls_cib(
             self.fixture_resources_pre,
             self.fixture_resources_post_simple,
             self.upgraded_cib,
         ))
     self.simplest_create()
     self.runner.assert_everything_launched()
Пример #2
0
    def test_cib_upgrade(self):
        self.runner.set_runs(
            fixture.calls_cib_load_and_upgrade(self.fixture_cib_pre) +
            fixture.calls_cib(self.fixture_cib_pre,
                              self.fixture_resources_bundle_simple,
                              cib_base_file=self.cib_base_file))

        resource.bundle_create(self.env, "B1", "docker", {
            "image": "pcs:test",
        })

        self.env.report_processor.assert_reports([
            (severities.INFO, report_codes.CIB_UPGRADE_SUCCESSFUL, {}, None),
        ])
        self.runner.assert_everything_launched()
Пример #3
0
    def test_cib_upgrade(self):
        fixture_cib_pre = """
            <resources>
                <bundle id="B1">
                    <docker image="pcs:test" />
                </bundle>
            </resources>
        """
        self.runner.set_runs(
            fixture.calls_cib_load_and_upgrade(fixture_cib_pre) +
            fixture.calls_cib(fixture_cib_pre,
                              fixture_cib_pre,
                              cib_base_file=self.cib_base_file))

        resource.bundle_update(self.env, "B1")

        self.env.report_processor.assert_reports([
            (severities.INFO, report_codes.CIB_UPGRADE_SUCCESSFUL, {}, None),
        ])
        self.runner.assert_everything_launched()