diff --git a/Makefile b/Makefile index 63bddf8..5c541cb 100644 --- a/Makefile +++ b/Makefile @@ -11,9 +11,18 @@ all: build build: clean sh script/build.sh -test: +test: memory_test redis_test boltdb_test cd gorush && go test -cover -v -coverprofile=coverage.out +memory_test: + cd gorush/storage/memory && go test -v -cover *.go + +redis_test: + cd gorush/storage/redis && go test -v -cover *.go + +boltdb_test: + cd gorush/storage/boltdb && go test -v -cover *.go + html: test cd gorush && go tool cover -html=coverage.out diff --git a/gorush/global.go b/gorush/global.go index fbccf27..23d14c9 100644 --- a/gorush/global.go +++ b/gorush/global.go @@ -5,7 +5,6 @@ import ( "github.com/Sirupsen/logrus" "github.com/appleboy/gorush/gorush/config" apns "github.com/sideshow/apns2" - "gopkg.in/redis.v3" ) var ( @@ -21,8 +20,6 @@ var ( LogAccess *logrus.Logger // LogError is log server error log LogError *logrus.Logger - // RedisClient is global variable for redis - RedisClient *redis.Client // StatStorage implements the storage interface StatStorage Storage )