11// Copyright (c) Jeevanandam M. (https://github.com/jeevatkm)
2- // aahframework.org/cache/memcache 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 memcache
@@ -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 TestMemcache (t * testing.T ) {
@@ -31,7 +31,7 @@ func TestMemcache(t *testing.T) {
3131` )
3232
3333 e := mgr .CreateCache (& cache.Config {Name : "cache1" , ProviderName : "memcache1" })
34- assert .FailNowOnError (t , e , "unable to create cache" )
34+ assert .Nil (t , e , "unable to create cache" )
3535 c := mgr .Cache ("cache1" )
3636
3737 type sample struct {
@@ -135,7 +135,7 @@ func TestMemcacheMultipleCache(t *testing.T) {
135135 names := []string {"testcache1" , "testcache2" , "testcache3" }
136136 for _ , name := range names {
137137 err := mgr .CreateCache (& cache.Config {Name : name , ProviderName : "memcache1" })
138- assert .FailNowOnError (t , err , "unable to create cache" )
138+ assert .Nil (t , err , "unable to create cache" )
139139
140140 c := mgr .Cache (name )
141141 assert .NotNil (t , c )
@@ -226,13 +226,13 @@ func createCacheMgr(t *testing.T, name, appCfgStr string) *cache.Manager {
226226 l , _ := log .New (config .NewEmpty ())
227227 l .SetWriter (ioutil .Discard )
228228 err := mgr .InitProviders (cfg , l )
229- assert .FailNowOnError (t , err , "unexpected" )
229+ assert .Nil (t , err , "unexpected" )
230230 return mgr
231231}
232232
233233func createTestCache (t * testing.T , name , appCfgStr string , cacheCfg * cache.Config ) cache.Cache {
234234 mgr := createCacheMgr (t , name , appCfgStr )
235235 e := mgr .CreateCache (cacheCfg )
236- assert .FailNowOnError (t , e , "unable to create cache" )
236+ assert .Nil (t , e , "unable to create cache" )
237237 return mgr .Cache (cacheCfg .Name )
238238}
0 commit comments