mirror of
https://github.com/helmfile/helmfile.git
synced 2026-10-17 23:16:34 +02:00
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/helmfile/chartify"
|
||||
|
||||
@@ -134,6 +135,9 @@ func (st *HelmState) goGetterChart(chart, dir, cacheDir string, force bool) (str
|
||||
chart = dir
|
||||
}
|
||||
|
||||
if strings.HasPrefix(chart, "oci://") {
|
||||
return chart, nil
|
||||
}
|
||||
_, err := remote.Parse(chart)
|
||||
if err != nil {
|
||||
if force {
|
||||
|
||||
@@ -42,7 +42,7 @@ func TestStorage_resolveFile(t *testing.T) {
|
||||
wantErr: false,
|
||||
},
|
||||
{
|
||||
name: "non existing file in repo produce skip",
|
||||
name: "non existing file in repo produce non skip",
|
||||
args: args{
|
||||
path: "git::https://github.com/helmfile/helmfile.git@examples/values/non-existing-file.yaml?ref=v0.145.2",
|
||||
title: "values",
|
||||
@@ -107,7 +107,7 @@ func TestStorage_resolveFile(t *testing.T) {
|
||||
title: "values",
|
||||
missingFileHandler: &infoHandler,
|
||||
},
|
||||
wantFiles: []string{fmt.Sprintf("%s/%s", cacheDir, "values/https_github_com_helmfile_helmfile_git.ref=v0.145.2/examples/values/replica-values.yaml")},
|
||||
wantFiles: []string{fmt.Sprintf("%s/%s", cacheDir, "values/https_github_com_helmfile_helmfile_git.ref=v0.145.2/origin/examples/values/replica-values.yaml")},
|
||||
wantSkipped: false,
|
||||
wantErr: false,
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user