(t *testing.T)
| 604 | } |
| 605 | |
| 606 | func TestFileStorage_DecodeFile(t *testing.T) { |
| 607 | if !testutils.IsSingleTesting() { |
| 608 | return |
| 609 | } |
| 610 | |
| 611 | var storage = NewFileStorage(&serverconfigs.HTTPCachePolicy{ |
| 612 | Id: 1, |
| 613 | IsOn: true, |
| 614 | Options: map[string]interface{}{ |
| 615 | "dir": Tea.Root + "/caches", |
| 616 | }, |
| 617 | }) |
| 618 | |
| 619 | defer storage.Stop() |
| 620 | |
| 621 | err := storage.Init() |
| 622 | if err != nil { |
| 623 | t.Fatal(err) |
| 624 | } |
| 625 | _, path, _ := storage.keyPath("my-key") |
| 626 | t.Log(path) |
| 627 | } |
| 628 | |
| 629 | func TestFileStorage_RemoveCacheFile(t *testing.T) { |
| 630 | if !testutils.IsSingleTesting() { |
nothing calls this directly
no test coverage detected