Skip to content

Commit

Permalink
tests: small fix for import-orig-rpm component test
Browse files Browse the repository at this point in the history
Merge behaviour in newer git versions (> v2.16) is slightly different.

This broke one test with an error something like:
Traceback (most recent call last):
  File "tests/component/rpm/test_import_orig_rpm.py", line 243, in test_misc_options
    eq_(len(repo.get_commits(until='pack')), 3)
AssertionError: 2 != 3

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
  • Loading branch information
marquiz authored and agx committed Sep 20, 2018
1 parent 2f6a432 commit a656995
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/component/rpm/test_import_orig_rpm.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@ def test_noninteractive(self):
def test_misc_options(self):
"""Test various options of git-import-orig-rpm"""
repo = ComponentTestGitRepository.create('.')
# Force --no-ff for merges because default behavior is slightly
# different in newer git versions (> 2.16)
repo.set_config("branch.pack.mergeoptions", "--no-ff")

# Import one orig with default options to get upstream and
# packaging branch
orig = os.path.join(DATA_DIR, 'gbp-test-1.0.tar.bz2')
Expand Down

0 comments on commit a656995

Please sign in to comment.