mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-20 17:23:34 +02:00
fix: oci pull directory conflict when download twice (#914)
* fix: oci pull directory conflict when download twice Signed-off-by: yxxhero <aiopsclub@163.com> * add test cases
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"os"
|
||||
"path"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"testing"
|
||||
)
|
||||
@@ -55,9 +55,9 @@ func TestDownloadfile(t *testing.T) {
|
||||
for _, c := range cases {
|
||||
t.Run(c.name, func(t *testing.T) {
|
||||
dir := t.TempDir()
|
||||
downfile := path.Join(dir, "down.txt")
|
||||
downfile := filepath.Join(dir, "down.txt")
|
||||
if c.filepath != "" {
|
||||
downfile = path.Join(dir, c.filepath)
|
||||
downfile = filepath.Join(dir, c.filepath)
|
||||
}
|
||||
|
||||
ts = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
Reference in New Issue
Block a user