MCPcopy
hub / github.com/hashicorp/go-getter / TestGet_archiveSubdirWildMultiMatch

Function TestGet_archiveSubdirWildMultiMatch

get_test.go:250–268  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

248}
249
250func TestGet_archiveSubdirWildMultiMatch(t *testing.T) {
251 ctx := context.Background()
252
253 dst := testing_helper.TempDir(t)
254 u := testModule("archive-rooted-multi/archive.tar.gz")
255 u += "//*"
256 op, err := Get(ctx, dst, u)
257 switch err {
258 case nil:
259 t.Fatal("should error")
260 default:
261 if !strings.Contains(err.Error(), "multiple") {
262 t.Fatalf("err: %s", err)
263 }
264 if op != nil {
265 t.Fatal("GetResult should be nil")
266 }
267 }
268}
269
270func TestGetAny_file(t *testing.T) {
271 ctx := context.Background()

Callers

nothing calls this directly

Calls 3

testModuleFunction · 0.85
GetFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected