Documentation ¶
Index ¶
- Constants
- func BuildNamingService(namespace string, service string, token string) *service_manage.Service
- func CopyDir(src string, dst string) error
- func DeleteDir(path string) error
- func DirExist(path string) bool
- func FileExist(path string) bool
- func GetGrpcServer() *grpc.Server
- func InsertLog(s NamingTestSuite, logContent string)
- func SameInstances(origInst, newInst []model.Instance) bool
- func SelectInstanceSpecificNum(c *check.C, consumerAPI api.ConsumerAPI, targetIns model.Instance, ...)
- func SetupMockDiscover(host string, port int) (*grpc.Server, net.Listener, mock.NamingServer)
- func StartGrpcServer(svr *grpc.Server, listener net.Listener)
- type NamingTestSuite
- type RegisteredInstance
Constants ¶
View Source
const (
// BackupDir is the backup directory for test
BackupDir = "testdata/backup"
)
Variables ¶
This section is empty.
Functions ¶
func BuildNamingService ¶
func BuildNamingService(namespace string, service string, token string) *service_manage.Service
BuildNamingService 创建一个namingpb service
func SameInstances ¶
SameInstances 比较两个实例数组内容是否一致
func SelectInstanceSpecificNum ¶
func SelectInstanceSpecificNum(c *check.C, consumerAPI api.ConsumerAPI, targetIns model.Instance, selectNum, maxTimes int)
SelectInstanceSpecificNum 获取某个特定的实例一定的次数
func SetupMockDiscover ¶
SetupMockDiscover 初始化mock namingServer
Types ¶
type NamingTestSuite ¶
type NamingTestSuite interface {
GetName() string
}
NamingTestSuite test suite interface
Click to show internal directories.
Click to hide internal directories.