1
0
mirror of https://github.com/astaxie/beego.git synced 2024-11-22 13:10:54 +00:00

fix the cache test

This commit is contained in:
astaxie 2014-12-19 14:40:16 +08:00
parent 75d28d49c5
commit d3ab157915

4
cache/cache_test.go vendored
View File

@ -15,6 +15,7 @@
package cache
import (
"os"
"testing"
"time"
)
@ -67,7 +68,7 @@ func TestCache(t *testing.T) {
}
func TestFileCache(t *testing.T) {
bm, err := NewCache("file", `{"CachePath":"/cache","FileSuffix":".bin","DirectoryLevel":2,"EmbedExpiry":0}`)
bm, err := NewCache("file", `{"CachePath":"cache","FileSuffix":".bin","DirectoryLevel":2,"EmbedExpiry":0}`)
if err != nil {
t.Error("init err")
}
@ -112,4 +113,5 @@ func TestFileCache(t *testing.T) {
if v := bm.Get("astaxie"); v.(string) != "author" {
t.Error("get err")
}
os.RemoveAll("cache")
}