From ebc5b68ddd78e366f1dd38f1fcf52d8406e6ff15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Val=C3=AD=C4=8Dek?= Date: Sat, 6 Aug 2022 02:10:48 +0200 Subject: [PATCH] Default cloner depth = 0 (unlimited) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Václav Valíček --- repo_cloner/lib/default_cloner_config.py | 2 +- tests/lib/test_cloner_config.py | 3 +-- tests/lib/test_cloner_config_parser.py | 2 +- tests/lib/test_default_cloner_config.py | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/repo_cloner/lib/default_cloner_config.py b/repo_cloner/lib/default_cloner_config.py index f55e423..652b814 100644 --- a/repo_cloner/lib/default_cloner_config.py +++ b/repo_cloner/lib/default_cloner_config.py @@ -21,7 +21,7 @@ class DefaultClonerConfig: @property def cloner_submodule_depth(self) -> int: - return 50000 + return 0 def has_property(self, prop: str) -> bool: if prop == "has_property": diff --git a/tests/lib/test_cloner_config.py b/tests/lib/test_cloner_config.py index efee077..53ccff9 100644 --- a/tests/lib/test_cloner_config.py +++ b/tests/lib/test_cloner_config.py @@ -52,7 +52,7 @@ def test_cloner_submodules(): def test_cloner_submodule_depth(): x = ClonerConfig() - assert x.cloner_submodule_depth == 50000 + assert x.cloner_submodule_depth == 0 x._ClonerConfig__values['cloner_submodule_depth'] = -1 assert x.cloner_submodule_depth == -1 @@ -87,4 +87,3 @@ def test_set_property(): # integer conversion x._set_property("cloner_interval", 60) assert x.cloner_interval == 60 - diff --git a/tests/lib/test_cloner_config_parser.py b/tests/lib/test_cloner_config_parser.py index d7be7f6..5a7a680 100644 --- a/tests/lib/test_cloner_config_parser.py +++ b/tests/lib/test_cloner_config_parser.py @@ -39,7 +39,7 @@ def test_empty_config(config_path: Path): assert c.cloner_repo_url == "" assert c.cloner_interval == 0 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): diff --git a/tests/lib/test_default_cloner_config.py b/tests/lib/test_default_cloner_config.py index 4b77ec3..3f22153 100644 --- a/tests/lib/test_default_cloner_config.py +++ b/tests/lib/test_default_cloner_config.py @@ -22,7 +22,7 @@ def test_values(): assert x.cloner_repo_url == "" assert x.cloner_interval == 0 assert x.cloner_submodules - assert x.cloner_submodule_depth == 50000 + assert x.cloner_submodule_depth == 0 def test_has_property():