mirror of
https://github.com/astaxie/beego.git
synced 2024-12-22 20:20:49 +00:00
fix the cache test
This commit is contained in:
parent
75d28d49c5
commit
d3ab157915
4
cache/cache_test.go
vendored
4
cache/cache_test.go
vendored
@ -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")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user