MCPcopy
hub / github.com/helm/helm / TestExpandError

Function TestExpandError

pkg/chart/v2/util/expand_test.go:140–160  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

138}
139
140func TestExpandError(t *testing.T) {
141 tests := map[string]struct {
142 chartName string
143 chartDir string
144 wantErr string
145 }{
146 "dot name": {"dotname", "testdata/dotname", "not allowed"},
147 "dotdot name": {"dotdotname", "testdata/dotdotname", "not allowed"},
148 "slash in name": {"slashinname", "testdata/slashinname", "must not contain path separators"},
149 }
150
151 for name, tt := range tests {
152 t.Run(name, func(t *testing.T) {
153 archive := makeTestChartArchive(t, tt.chartName, tt.chartDir)
154
155 dest := t.TempDir()
156 err := Expand(dest, archive)
157 assert.ErrorContains(t, err, tt.wantErr)
158 })
159 }
160}
161
162func TestExpandFile(t *testing.T) {
163 dest := t.TempDir()

Callers

nothing calls this directly

Calls 3

makeTestChartArchiveFunction · 0.70
ExpandFunction · 0.70
RunMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…