-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Downloader pattern #355
Downloader pattern #355
Conversation
Signed-off-by: d4v1d03 <a_pandey1@ce.iitr.ac.in>
Signed-off-by: d4v1d03 <a_pandey1@ce.iitr.ac.in>
Signed-off-by: d4v1d03 <a_pandey1@ce.iitr.ac.in>
Signed-off-by: d4v1d03 <a_pandey1@ce.iitr.ac.in>
Signed-off-by: d4v1d03 <a_pandey1@ce.iitr.ac.in>
Signed-off-by: d4v1d03 <amit08072005@gmail.com>
Signed-off-by: d4v1d03 <amit08072005@gmail.com>
Signed-off-by: d4v1d03 <amit08072005@gmail.com>
This reverts commit 78e34fc.
Signed-off-by: d4v1d03 <amit08072005@gmail.com>
Hi @d4v1d03 The test case isn't passing and it looks like |
Signed-off-by: d4v1d03 <amit08072005@gmail.com>
@@ -918,7 +918,7 @@ func (c *KpmClient) AcquireTheLatestOciVersion(ociSource pkg.Oci) (string, error | |||
// Download will download the dependency to the local path. | |||
func (c *KpmClient) Download(dep *pkg.Dependency, homePath, localPath string) (*pkg.Dependency, error) { | |||
if dep.Source.Git != nil { | |||
err := c.DepDownloader.Download(*downloader.NewDownloadOptions( | |||
err := c.DepDownloader.Download(*downloader.NewDownloadOptions( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Format this code.
pkg/downloader/downloader_test.go
Outdated
func TestOciDownloader(t *testing.T) { | ||
path_oci := getTestDir("test_oci") | ||
if err := os.MkdirAll(path_oci, os.ModePerm); err != nil { | ||
ociTestDir := getTestDir("oci_test_dir") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The purpose of the issue is to complete the GitDownloader. Please do not modify the content related to OCI Downloader.
pkg/downloader/downloader_test.go
Outdated
t.Fatal(err) | ||
} | ||
|
||
defer func() { | ||
_ = os.RemoveAll(path_git) | ||
_ = os.RemoveAll(gitTestDir) | ||
}() | ||
|
||
gitDownloader := GitDownloader{} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Separate this test case for GitDownloader
and do not write it together with TestOciDownloader
for OciDownloader
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zong-zhe , done the same, don't know why there's a timeout occuring for my TestGitDownloader() function, can you please have a look
1. Does this PR affect any open issues?(Y/N) and add issue references (e.g. "fix #123", "re #123".):
2. What is the scope of this PR (e.g. component or file name):
3. Provide a description of the PR(e.g. more details, effects, motivations or doc link):
4. Are there any breaking changes?(Y/N) and describe the breaking changes(e.g. more details, motivations or doc link):
5. Are there test cases for these changes?(Y/N) select and add more details, references or doc links: