Default cloner depth = 0 (unlimited)

Signed-off-by: Václav Valíček <valicek1994@gmail.com>
This commit is contained in:
Václav Valíček 2022-08-06 02:10:48 +02:00
parent e95b2b01fe
commit ebc5b68ddd
Signed by: valicek
GPG Key ID: FF05BDCA0C73BB31
4 changed files with 4 additions and 5 deletions

View File

@ -21,7 +21,7 @@ class DefaultClonerConfig:
@property @property
def cloner_submodule_depth(self) -> int: def cloner_submodule_depth(self) -> int:
return 50000 return 0
def has_property(self, prop: str) -> bool: def has_property(self, prop: str) -> bool:
if prop == "has_property": if prop == "has_property":

View File

@ -52,7 +52,7 @@ def test_cloner_submodules():
def test_cloner_submodule_depth(): def test_cloner_submodule_depth():
x = ClonerConfig() x = ClonerConfig()
assert x.cloner_submodule_depth == 50000 assert x.cloner_submodule_depth == 0
x._ClonerConfig__values['cloner_submodule_depth'] = -1 x._ClonerConfig__values['cloner_submodule_depth'] = -1
assert x.cloner_submodule_depth == -1 assert x.cloner_submodule_depth == -1
@ -87,4 +87,3 @@ def test_set_property():
# integer conversion # integer conversion
x._set_property("cloner_interval", 60) x._set_property("cloner_interval", 60)
assert x.cloner_interval == 60 assert x.cloner_interval == 60

View File

@ -39,7 +39,7 @@ def test_empty_config(config_path: Path):
assert c.cloner_repo_url == "" assert c.cloner_repo_url == ""
assert c.cloner_interval == 0 assert c.cloner_interval == 0
assert c.cloner_submodules == True assert c.cloner_submodules == True
assert c.cloner_submodule_depth == 50000 assert c.cloner_submodule_depth == 0
def test_invalid_config(config_path: Path, caplog): def test_invalid_config(config_path: Path, caplog):

View File

@ -22,7 +22,7 @@ def test_values():
assert x.cloner_repo_url == "" assert x.cloner_repo_url == ""
assert x.cloner_interval == 0 assert x.cloner_interval == 0
assert x.cloner_submodules assert x.cloner_submodules
assert x.cloner_submodule_depth == 50000 assert x.cloner_submodule_depth == 0
def test_has_property(): def test_has_property():