diff --git a/git_upstream/commands/import.py b/git_upstream/commands/import.py index 7458e7c..3dc106a 100644 --- a/git_upstream/commands/import.py +++ b/git_upstream/commands/import.py @@ -134,6 +134,8 @@ class ImportCommand(LogDedentMixin, GitUpstreamCommand): def execute(self): + self.log.info("Starting execution of import command") + import_upstream = ImportUpstream( branch=self.args.branch, upstream=self.args.real_upstream_branch, diff --git a/git_upstream/tests/commands/import/test_import.py b/git_upstream/tests/commands/import/test_import.py index 50a9dea..cc42c38 100644 --- a/git_upstream/tests/commands/import/test_import.py +++ b/git_upstream/tests/commands/import/test_import.py @@ -64,6 +64,9 @@ class TestImportCommand(TestWithScenarios, BaseTestCase): self.assertThat(self.logger.output, Not(Contains("Successfully rebased and updated"))) + self.assertThat(self.logger.output, + Contains("Starting execution of import command")) + # perform sanity checks on results self._check_tree_state() diff --git a/git_upstream/tests/searchers/test_searchers.py b/git_upstream/tests/searchers/test_searchers.py index aa0758f..d25dd04 100644 --- a/git_upstream/tests/searchers/test_searchers.py +++ b/git_upstream/tests/searchers/test_searchers.py @@ -18,6 +18,7 @@ from pprint import pformat from testscenarios import TestWithScenarios from testtools.content import text_content +from testtools import matchers from git_upstream.lib.searchers import UpstreamMergeBaseSearcher from git_upstream.tests.base import BaseTestCase @@ -50,6 +51,11 @@ class TestUpstreamMergeBaseSearcher(TestWithScenarios, BaseTestCase): searcher = UpstreamMergeBaseSearcher(branch=self.branches['head'][0], patterns=pattern, repo=self.repo) + self.assertEqual( self.gittree._commits_from_nodes(reversed(self.expected_changes)), searcher.list(self.branches['upstream'][0])) + + self.assertThat(self.logger.output, + matchers.Contains("Searching for most recent merge " + "base with upstream branches")) diff --git a/git_upstream/tests/strategies/test_strategies.py b/git_upstream/tests/strategies/test_strategies.py index 9ea83ee..e88426a 100644 --- a/git_upstream/tests/strategies/test_strategies.py +++ b/git_upstream/tests/strategies/test_strategies.py @@ -20,6 +20,7 @@ from pprint import pformat from testscenarios import TestWithScenarios from testtools.content import text_content +from testtools import matchers from git_upstream.tests.base import BaseTestCase from git_upstream.tests.base import get_scenarios @@ -56,3 +57,7 @@ class TestStrategies(TestWithScenarios, BaseTestCase): self.assertEqual( self.gittree._commits_from_nodes(self.expected_changes), [c for c in strategy.filtered_iter()]) + + self.assertThat(self.logger.output, + matchers.Contains("Searching for most recent merge " + "base with upstream branches"))