Remove repository cloning multiple times

JIRA: RHELCMP-8913
Signed-off-by: Aditya Bisoi <abisoi@redhat.com>
This commit is contained in:
Aditya Bisoi 2023-06-21 14:51:17 +05:30 committed by lsedlar
parent 1c4275bbfa
commit b6296bdfcd
4 changed files with 117 additions and 85 deletions

View file

@ -115,6 +115,10 @@ CREDENTIALS_CONFIG = {"credential_helper": "!ch"}
class GitSCMTestCase(SCMBaseTest):
def tearDown(self):
shutil.rmtree("/tmp/pungi-temp-git-repos-%s" % os.getpid())
super(GitSCMTestCase, self).tearDown()
def assertCalls(self, mock_run, url, branch, command=None, with_creds=False):
git = GIT_WITH_CREDS if with_creds else ["git"]
command = [command] if command else []