Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ademariag committed Feb 4, 2024
1 parent 54bb352 commit 53aef66
Showing 1 changed file with 0 additions and 73 deletions.
73 changes: 0 additions & 73 deletions tests/test_dependency_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,79 +79,6 @@ def test_clone_repo_subdir(self):
rmtree(temp_dir)
rmtree(output_dir)

def test_clone_repo_submodules_false(self):
"""
Tests cloning git repo and check that submodule folder is empty
"""
temp_dir = tempfile.mkdtemp()
output_dir = tempfile.mkdtemp()
source = "https://github.com/kapicorp/kapitan.git"
dep = [
{
"output_path": output_dir,
"ref": "master",
"submodules": False,
}
]
fetch_git_dependency((source, dep), temp_dir, force=False)
self.assertEqual(os.listdir(os.path.join(output_dir, "kapitan", "reclass")), [])
rmtree(temp_dir)
rmtree(output_dir)

def test_clone_repo_without_submodules(self):
"""
Tests cloning a git repo without any submodules
"""
temp_dir = tempfile.mkdtemp()
output_dir = tempfile.mkdtemp()
source = "https://github.com/kapicorp/reclass.git"
dep = [
{
"output_path": output_dir,
"ref": "master",
}
]
fetch_git_dependency((source, dep), temp_dir, force=False)
self.assertTrue(os.path.isdir(os.path.join(output_dir, "reclass")))
rmtree(temp_dir)
rmtree(output_dir)

def test_clone_repo_with_submodules(self):
"""
Tests cloning git repo and initialize its' submodule
"""
temp_dir = tempfile.mkdtemp()
output_dir = tempfile.mkdtemp()
source = "https://github.com/kapicorp/kapitan.git"
dep = [
{
"output_path": output_dir,
"ref": "master",
}
]
fetch_git_dependency((source, dep), temp_dir, force=False)
self.assertTrue(os.listdir(os.path.join(output_dir, "kapitan", "reclass")))
rmtree(temp_dir)
rmtree(output_dir)

def test_clone_repo_with_submodule_subdir(self):
"""
Tests cloning subdir in a git repo and initialize its' submodule
"""
temp_dir = tempfile.mkdtemp()
output_dir = tempfile.mkdtemp()
source = "https://github.com/kapicorp/kapitan.git"
dep = [
{
"output_path": output_dir,
"ref": "master",
"subdir": "kapitan",
}
]
fetch_git_dependency((source, dep), temp_dir, force=False)
self.assertTrue(os.listdir(os.path.join(output_dir, "reclass")))
rmtree(temp_dir)
rmtree(output_dir)

def test_fetch_helm_chart(self):
"""
Expand Down

0 comments on commit 53aef66

Please sign in to comment.