Skip to content

Commit 4ed11dc

Browse files
Vladimir Kotalahornace
authored andcommitted
check for the actual return code from the "false" binary
1 parent dd7a246 commit 4ed11dc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tools/src/test/python/test_mirror.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131
import pytest
3232
import requests
33+
import subprocess
3334
from mockito import verify, patch, spy2, mock, ANY, when, unstub
3435

3536
import opengrok_tools.mirror
@@ -593,7 +594,8 @@ def test_mirroring_custom_sync_error(false_binary):
593594
repository = GitRepository("git", mock(), repository_root, 'test-1', {
594595
'sync': false_binary
595596
}, None, None, None)
596-
assert 1 == repository.sync()
597+
ret = subprocess.run([false_binary])
598+
assert ret.returncode == repository.sync()
597599

598600

599601
def test_mirroring_sync_invoke_original_command():

0 commit comments

Comments
 (0)