def test_empty(self, mock_file_store):
        # FIXME: This does no validation
        mock_repo_file = mock.Mock()
        mock_repo_file.get_core.return_value = {}

        mock_file_store.load.return_value = mock_repo_file

        action = action_invoker.OstreeContentUpdateActionCommand()
        action.update_origin_file = mock.Mock()
        action.perform()
Esempio n. 2
0
    def update_content_hook(self, conduit):
        """
        Hook to update for any OSTree content we have.

        Args:
            conduit: A UpdateContentConduit
        """
        conduit.log.info("ostree update_content_hook plugin.")

        report = action_invoker.OstreeContentUpdateActionCommand(ent_source=conduit.ent_source).perform()
        conduit.reports.add(report)
    def update_content_hook(self, conduit):
        """
        Hook to update for any OSTree content we have.

        Args:
            conduit: A UpdateContentConduit
        """
        conduit.log.info("Updating OSTree content.")
        conduit.log.debug("ostree module: %s" % ostree)
        conduit.log.debug("dir(ostree): %s" % dir(ostree))
        conduit.log.debug("conduit.ent_source: %s" % conduit.ent_source)
        for ent in conduit.ent_source:
            conduit.log.debug("ent_source ent: %s" % ent)

        report = action_invoker.OstreeContentUpdateActionCommand(
            ent_source=conduit.ent_source).perform()
        conduit.reports.add(report)