Ejemplo n.º 1
0
 def test_fetch_git_sources(self):
     temp_dir = tempfile.mkdtemp()
     # TODO: also test git ssh urls
     git_source = 'https://github.com/deepmind/kapitan.git'
     fetch_git_source(git_source, temp_dir)
     self.assertTrue(
         os.path.isdir(os.path.join(temp_dir, 'kapitan.git', 'kapitan')))
Ejemplo n.º 2
0
 def test_fetch_git_sources(self):
     "Tests clonning git repo"
     temp_dir = tempfile.mkdtemp()
     repo_dir = os.path.join(temp_dir, "7a8f3940kapitan.git")
     # TODO: also test git ssh urls
     git_source = "https://github.com/kapicorp/kapitan.git"
     fetch_git_source(git_source, repo_dir, item_type="Dependency")
     self.assertTrue(os.path.isfile(os.path.join(repo_dir, "README.md")))
     rmtree(temp_dir)
Ejemplo n.º 3
0
 def test_fetch_git_inventory(self):
     """
     test fetching of git inventories
     """
     temp_dir = tempfile.mkdtemp()
     repo_dir = os.path.join(temp_dir, "7a8f3940kapitan.git")
     git_source = "https://github.com/deepmind/kapitan.git"
     fetch_git_source(git_source, repo_dir, item_type="Inventory")
     self.assertTrue(os.path.isfile(os.path.join(repo_dir, "README.md")))
     rmtree(temp_dir)