gitee.com/woood2/luca@v1.0.4/internal/cache/main_test.go (about) 1 package cache 2 3 import ( 4 "gitee.com/woood2/luca/internal/conf" 5 "gitee.com/woood2/luca/internal/util" 6 "testing" 7 ) 8 9 type person struct { 10 Name string 11 Age int 12 } 13 14 func TestMain(m *testing.M) { 15 if !util.CI() { 16 attr := conf.Load("application.yml", "configs/application.yml") 17 redisCache := NewRedis(attr.Redis) 18 SetRedis(redisCache) 19 } 20 m.Run() 21 }