(t *testing.T)
| 371 | } |
| 372 | |
| 373 | func TestGetFile_archiveChecksum(t *testing.T) { |
| 374 | ctx := context.Background() |
| 375 | |
| 376 | dst := testing_helper.TempTestFile(t) |
| 377 | defer os.RemoveAll(filepath.Dir(dst)) |
| 378 | u := testModule( |
| 379 | "basic-file-archive/archive.tar.gz?checksum=md5:fbd90037dacc4b1ab40811d610dde2f0") |
| 380 | |
| 381 | op, err := GetFile(ctx, dst, u) |
| 382 | if err != nil { |
| 383 | t.Fatalf("err: %s", err) |
| 384 | } |
| 385 | if diff := cmp.Diff(&GetResult{Dst: dst}, op); diff != "" { |
| 386 | t.Fatalf("unexpected op: %s", diff) |
| 387 | } |
| 388 | |
| 389 | // Verify the main file exists |
| 390 | testing_helper.AssertContents(t, dst, "Hello\n") |
| 391 | } |
| 392 | |
| 393 | func TestGetFile_archiveNoUnarchive(t *testing.T) { |
| 394 | ctx := context.Background() |
nothing calls this directly
no test coverage detected