(t *testing.T)
| 391 | } |
| 392 | |
| 393 | func TestGetFile_archiveNoUnarchive(t *testing.T) { |
| 394 | ctx := context.Background() |
| 395 | |
| 396 | dst := testing_helper.TempTestFile(t) |
| 397 | defer os.RemoveAll(filepath.Dir(dst)) |
| 398 | u := testModule("basic-file-archive/archive.tar.gz") |
| 399 | u += "?archive=false" |
| 400 | |
| 401 | op, err := GetFile(ctx, dst, u) |
| 402 | if err != nil { |
| 403 | t.Fatalf("err: %s", err) |
| 404 | } |
| 405 | if diff := cmp.Diff(&GetResult{Dst: dst}, op); diff != "" { |
| 406 | t.Fatalf("unexpected op: %s", diff) |
| 407 | } |
| 408 | |
| 409 | // Verify the main file exists |
| 410 | actual := testMD5(t, dst) |
| 411 | expected := "fbd90037dacc4b1ab40811d610dde2f0" |
| 412 | if actual != expected { |
| 413 | t.Fatalf("bad: %s", actual) |
| 414 | } |
| 415 | } |
| 416 | |
| 417 | func TestGetFile_checksum(t *testing.T) { |
| 418 | ctx := context.Background() |
nothing calls this directly
no test coverage detected