Skip to content

Commit a656995

Browse files
marquizagx
authored andcommitted
tests: small fix for import-orig-rpm component test
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>
1 parent 2f6a432 commit a656995

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/component/rpm/test_import_orig_rpm.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,10 @@ def test_noninteractive(self):
222222
def test_misc_options(self):
223223
"""Test various options of git-import-orig-rpm"""
224224
repo = ComponentTestGitRepository.create('.')
225+
# Force --no-ff for merges because default behavior is slightly
226+
# different in newer git versions (> 2.16)
227+
repo.set_config("branch.pack.mergeoptions", "--no-ff")
228+
225229
# Import one orig with default options to get upstream and
226230
# packaging branch
227231
orig = os.path.join(DATA_DIR, 'gbp-test-1.0.tar.bz2')

0 commit comments

Comments
 (0)