func TestNewWarlock(t *testing.T) {
	cases := []struct {
		name      string
		c         *config.Config
		d         []grpc.DialOption
		wantRes   *warlock.Pool
		wantError bool
	}{
	}
	for _, test := range cases {
		Convey("test get pool", t, func() {
			res, err := warlock.NewWarlock(test.c, test.d...)
			So(err, ShouldBeNil)
			So(res, ShouldHaveSameTypeAs, test.wantRes)
		})
	}
}
TestNewWarlock test get pool
package testcase
import (
	"reflect"
	"testing"
	"github.com/ruiboma/warlock"
	"github.com/ruiboma/warlock/config"
	. "github.com/smartystreets/goconvey/convey"
	"google.golang.org/grpc"
)
var (
	CFG *config.Config
	TPool *warlock.Pool
)
func init() {
	CFG = warlock.NewConfig()
	CFG.ServerAdds = &[]string{"127.0.0.1:50051"}
	CFG.MaxCap = 100
	CFG.OverflowCap = false  
	tp, err := warlock.NewWarlock(CFG, grpc.WithInsecure())
	TPool = tp
	if err != nil {
		panic(err)
	}
}