|
45 | 45 | check_configuration, mirror_project, run_command, get_repos_for_project, \
|
46 | 46 | HOOKS_PROPERTY, PROXY_PROPERTY, IGNORED_REPOS_PROPERTY, \
|
47 | 47 | 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 |
49 | 50 | from opengrok_tools.utils.patterns import COMMAND_PROPERTY, PROJECT_SUBST
|
50 | 51 |
|
51 | 52 |
|
@@ -119,13 +120,25 @@ def test_invalid_config_option():
|
119 | 120 | assert not check_configuration({"nonexistent": True})
|
120 | 121 |
|
121 | 122 |
|
122 |
| -def test_valid_config(): |
| 123 | +def test_valid_config_proxy(): |
123 | 124 | assert check_configuration({
|
124 | 125 | PROJECTS_PROPERTY: {"foo": {PROXY_PROPERTY: True}},
|
125 | 126 | PROXY_PROPERTY: "proxy"
|
126 | 127 | })
|
127 | 128 |
|
128 | 129 |
|
| 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 | + |
129 | 142 | def test_empty_project_config():
|
130 | 143 | assert check_project_configuration({'foo': None})
|
131 | 144 |
|
|
0 commit comments