MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / TestFileStorage_DecodeFile

Function TestFileStorage_DecodeFile

internal/caches/storage_file_test.go:606–627  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

604}
605
606func 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
629func TestFileStorage_RemoveCacheFile(t *testing.T) {
630 if !testutils.IsSingleTesting() {

Callers

nothing calls this directly

Calls 6

IsSingleTestingFunction · 0.92
NewFileStorageFunction · 0.85
keyPathMethod · 0.80
LogMethod · 0.80
StopMethod · 0.65
InitMethod · 0.65

Tested by

no test coverage detected