Skip to content

Commit 2138504

Browse files
Vladimir Kotalahornace
authored andcommitted
add basic incoming_check tests
1 parent d405815 commit 2138504

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

tools/src/test/python/test_mirror.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@
4545
check_configuration, mirror_project, run_command, get_repos_for_project, \
4646
HOOKS_PROPERTY, PROXY_PROPERTY, IGNORED_REPOS_PROPERTY, \
4747
PROJECTS_PROPERTY, DISABLED_CMD_PROPERTY, DISABLED_PROPERTY, \
48-
CMD_TIMEOUT_PROPERTY, HOOK_TIMEOUT_PROPERTY, DISABLED_REASON_PROPERTY
48+
CMD_TIMEOUT_PROPERTY, HOOK_TIMEOUT_PROPERTY, DISABLED_REASON_PROPERTY, \
49+
INCOMING_PROPERTY
4950
from opengrok_tools.utils.patterns import COMMAND_PROPERTY, PROJECT_SUBST
5051

5152

@@ -119,13 +120,25 @@ def test_invalid_config_option():
119120
assert not check_configuration({"nonexistent": True})
120121

121122

122-
def test_valid_config():
123+
def test_valid_config_proxy():
123124
assert check_configuration({
124125
PROJECTS_PROPERTY: {"foo": {PROXY_PROPERTY: True}},
125126
PROXY_PROPERTY: "proxy"
126127
})
127128

128129

130+
def test_valid_config_incoming():
131+
assert check_configuration({
132+
PROJECTS_PROPERTY: {"foo": {INCOMING_PROPERTY: True}},
133+
INCOMING_PROPERTY: "False"
134+
})
135+
136+
137+
def test_project_config_incoming_valid():
138+
assert check_project_configuration({'foo': {INCOMING_PROPERTY: "T"}})
139+
assert check_project_configuration({'foo': {INCOMING_PROPERTY: "F"}})
140+
141+
129142
def test_empty_project_config():
130143
assert check_project_configuration({'foo': None})
131144

0 commit comments

Comments
 (0)