11// Copyright (c) Jeevanandam M. (https://github.com/jeevatkm)
2- // aahframework.org/cache/redis source code and usage is governed by a MIT style
2+ // Source code and usage is governed by a MIT style
33// license that can be found in the LICENSE file.
44
55package redis
@@ -12,10 +12,10 @@ import (
1212 "testing"
1313 "time"
1414
15- "aahframework.org /aah.v0 /cache"
16- "aahframework.org/ config.v0 "
17- "aahframework.org/ log.v0 "
18- "aahframework.org/test.v0 /assert"
15+ "aahframe.work /aah/cache"
16+ "aahframe.work/aah/ config"
17+ "aahframe.work/aah/ log"
18+ "github.com/stretchr/testify /assert"
1919)
2020
2121func TestRedisCache (t * testing.T ) {
@@ -32,7 +32,7 @@ func TestRedisCache(t *testing.T) {
3232` )
3333
3434 e := mgr .CreateCache (& cache.Config {Name : "cache1" , ProviderName : "redis1" })
35- assert .FailNowOnError (t , e , "unable to create cache" )
35+ assert .Nil (t , e , "unable to create cache" )
3636 c := mgr .Cache ("cache1" )
3737
3838 type sample struct {
@@ -136,7 +136,7 @@ func TestRedisMultipleCache(t *testing.T) {
136136 names := []string {"testcache1" , "testcache2" , "testcache3" }
137137 for _ , name := range names {
138138 err := mgr .CreateCache (& cache.Config {Name : name , ProviderName : "redis1" })
139- assert .FailNowOnError (t , err , "unable to create cache" )
139+ assert .Nil (t , err , "unable to create cache" )
140140
141141 c := mgr .Cache (name )
142142 assert .NotNil (t , c )
@@ -223,13 +223,13 @@ func createCacheMgr(t *testing.T, name, appCfgStr string) *cache.Manager {
223223 l , _ := log .New (config .NewEmpty ())
224224 l .SetWriter (ioutil .Discard )
225225 err := mgr .InitProviders (cfg , l )
226- assert .FailNowOnError (t , err , "unexpected" )
226+ assert .Nil (t , err , "unexpected" )
227227 return mgr
228228}
229229
230230func createTestCache (t * testing.T , name , appCfgStr string , cacheCfg * cache.Config ) cache.Cache {
231231 mgr := createCacheMgr (t , name , appCfgStr )
232232 e := mgr .CreateCache (cacheCfg )
233- assert .FailNowOnError (t , e , "unable to create cache" )
233+ assert .Nil (t , e , "unable to create cache" )
234234 return mgr .Cache (cacheCfg .Name )
235235}
0 commit comments