Versions in this module Expand all Collapse all v0 v0.45.1 Nov 12, 2022 v0.45.0 Nov 12, 2022 Changes in this version + const HTTPSimpleServerPort + const TCPEchoServerPort + const UDPEchoServerPort + const UDSEchoServerAddr + var RunID string + func ExpectConsistOf(actual interface{}, extra interface{}, explain ...interface{}) + func ExpectContainElements(actual interface{}, extra interface{}, explain ...interface{}) + func ExpectEmpty(actual interface{}, explain ...interface{}) + func ExpectEqual(actual interface{}, extra interface{}, explain ...interface{}) + func ExpectEqualValues(actual interface{}, extra interface{}, explain ...interface{}) + func ExpectEqualValuesWithOffset(offset int, actual interface{}, extra interface{}, explain ...interface{}) + func ExpectError(err error, explain ...interface{}) + func ExpectErrorWithOffset(offset int, err error, explain ...interface{}) + func ExpectHaveKey(actual interface{}, key interface{}, explain ...interface{}) + func ExpectNoError(err error, explain ...interface{}) + func ExpectNoErrorWithOffset(offset int, err error, explain ...interface{}) + func ExpectNotContainElements(actual interface{}, extra interface{}, explain ...interface{}) + func ExpectNotEqual(actual interface{}, extra interface{}, explain ...interface{}) + func ExpectTrue(actual interface{}, explain ...interface{}) + func ExpectTrueWithOffset(offset int, actual interface{}, explain ...interface{}) + func Fail(msg string, callerSkip ...int) + func Failf(format string, args ...interface{}) + func FailfWithOffset(offset int, format string, args ...interface{}) + func Logf(format string, args ...interface{}) + func NewHTTPRequest() *request.Request + func NewRequest() *request.Request + func PrunedStack(skip int) []byte + func RegisterCommonFlags(flags *flag.FlagSet) + func RemoveCleanupAction(p CleanupActionHandle) + func RunCleanupActions() + func SpecifiedHTTPBodyHandler(body []byte) http.HandlerFunc + func ValidateTestContext(t *TestContextType) error + type CleanupActionHandle *int + func AddCleanupAction(fn func()) CleanupActionHandle + type EnsureFunc func(*request.Response) bool + func ExpectResponseCode(code int) EnsureFunc + type FRPClient struct + type Framework struct + TempDirectory string + func NewDefaultFramework() *Framework + func NewFramework(opt Options) *Framework + func (f *Framework) AfterEach() + func (f *Framework) AllocPort() int + func (f *Framework) BeforeEach() + func (f *Framework) FRPClient(port int) *FRPClient + func (f *Framework) GenerateConfigFile(content string) string + func (f *Framework) PortByName(name string) int + func (f *Framework) ReleasePort(port int) + func (f *Framework) RenderTemplates(templates []string) (outs []string, ports map[string]int, err error) + func (f *Framework) RunFrpc(args ...string) (*process.Process, string, error) + func (f *Framework) RunFrps(args ...string) (*process.Process, string, error) + func (f *Framework) RunProcesses(serverTemplates []string, clientTemplates []string) ([]*process.Process, []*process.Process) + func (f *Framework) RunServer(portName string, s server.Server) + func (f *Framework) SetEnvs(envs []string) + func (f *Framework) WriteTempFile(name string, content string) string + type MockServers struct + func NewMockServers(portAllocator *port.Allocator) *MockServers + func (m *MockServers) Close() + func (m *MockServers) GetParam(key string) interface{} + func (m *MockServers) GetTemplateParams() map[string]interface{} + func (m *MockServers) Run() error + type Options struct + CurrentNodeIndex int + FromPortIndex int + ToPortIndex int + TotalParallelNode int + type RequestExpect struct + func NewRequestExpect(f *Framework) *RequestExpect + func (e *RequestExpect) Do() (*request.Response, error) + func (e *RequestExpect) Ensure(fns ...EnsureFunc) + func (e *RequestExpect) ExpectError(expectErr bool) *RequestExpect + func (e *RequestExpect) ExpectResp(resp []byte) *RequestExpect + func (e *RequestExpect) Explain(explain ...interface{}) *RequestExpect + func (e *RequestExpect) Port(port int) *RequestExpect + func (e *RequestExpect) PortName(name string) *RequestExpect + func (e *RequestExpect) Protocol(protocol string) *RequestExpect + func (e *RequestExpect) Request(req *request.Request) *RequestExpect + func (e *RequestExpect) RequestModify(f func(r *request.Request)) *RequestExpect + type TestContextType struct + Debug bool + FRPClientPath string + FRPServerPath string + LogLevel string + var TestContext TestContextType