Tests in Github and Gitlab integrations should actually clone a repo #15241
Labels
development
Tech debt, refactors, CI, tests, and other related work.
enhancement
An improvement of an existing feature
Describe the current behavior
Currently, the tests for prefect-github and prefect-github
get_directory()
function only test part of the functionality. They do not actually clone a repo, which is the major purpose of that function.The tests mock up a temp directory, with files inside. Because that directory is not empty, the
git clone
command silently fails. The remainder of the function successfully copies the pre-made files, and returns a full destination directory.This appears to be the intention of the test writer. The test might be slow if it actually cloned a git repo, however, that critical component remains untested.
As a result, several bugs made it into production. Some examples:
#11279
#13180
#15206
#15236
Describe the proposed behavior
Create new tests in
prefect-github
andprefect-gitlab
that clone a repo, and verify that it was cloned successfully. Example is below.We need to decide what repo to clone. The
prefect
repo is quite large. We might also want to test the cloning of a private repo with secret keys.Example Use
N/A. This is a proposal for new tests.
Additional context
No response
The text was updated successfully, but these errors were encountered: