(t *testing.T)
| 138 | } |
| 139 | |
| 140 | func 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 | |
| 162 | func TestExpandFile(t *testing.T) { |
| 163 | dest := t.TempDir() |
nothing calls this directly
no test coverage detected
searching dependent graphs…