Esempio n. 1
0
    def test_inject_files_skipped_when_cloud_init_installed(self):
        instance = _get_fake_instance(
                image_xenapi_skip_agent_inject_files_at_boot="True")
        agent = self._create_agent(instance)
        self.mox.StubOutWithMock(agent, "inject_file")

        files = [("path1", "content1"), ("path2", "content2")]

        self.mox.ReplayAll()

        agent.inject_files(files)
Esempio n. 2
0
    def test_inject_files_skipped_when_cloud_init_installed(self):
        instance = _get_fake_instance(
            image_xenapi_skip_agent_inject_files_at_boot="True")
        agent = self._create_agent(instance)
        self.mox.StubOutWithMock(agent, "inject_file")

        files = [("path1", "content1"), ("path2", "content2")]

        self.mox.ReplayAll()

        agent.inject_files(files)
Esempio n. 3
0
    def test_inject_files(self):
        instance = _get_fake_instance()
        agent = self._create_agent(instance)
        self.mox.StubOutWithMock(agent, "inject_file")

        files = [("path1", "content1"), ("path2", "content2")]
        agent.inject_file(*files[0])
        agent.inject_file(*files[1])

        self.mox.ReplayAll()

        agent.inject_files(files)
Esempio n. 4
0
    def test_inject_files(self):
        instance = _get_fake_instance()
        agent = self._create_agent(instance)
        self.mox.StubOutWithMock(agent, "inject_file")

        files = [("path1", "content1"), ("path2", "content2")]
        agent.inject_file(*files[0])
        agent.inject_file(*files[1])

        self.mox.ReplayAll()

        agent.inject_files(files)