Esempio n. 1
0
    def test__git_source_checkout_with_path_argument(self):
        checkout_path = "/some/path/to/checkout"
        git.clone_to_or_update(url=self.repo_url, path=checkout_path, branch=self.branch)
        git.reset_submodules(checkout_path)

        with self.forge.verified_replay_context():
            result = self.source.checkout(self.env, checkout_path)
        self.assertIs(result, checkout_path)
Esempio n. 2
0
 def test__git_source_checkout_no_path_argument(self):
     checkout_path = "/some/path/to/checkout"
     checkout_cache = self.forge.create_mock(CheckoutCache)
     self.env.get_checkout_cache().and_return(checkout_cache)
     checkout_cache.get_checkout_path(self.repo_url).and_return(checkout_path)
     git.clone_to_or_update(url=self.repo_url, branch=self.branch, path=checkout_path)
     git.reset_submodules(checkout_path)
     with self.forge.verified_replay_context():
         result = self.source.checkout(self.env)
     self.assertIs(result, checkout_path)