Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockClientNodes ¶
type MockClientNodes struct { Baz *bazclientgenerated.MockClient Echo *echoclientgenerated.MockClient }
MockClientNodes contains mock client dependencies
func InitializeDependenciesMock ¶
func InitializeDependenciesMock( g *zanzibar.Gateway, ctrl *gomock.Controller, ) (*module.DependenciesTree, *module.Dependencies, *MockClientNodes)
InitializeDependenciesMock fully initializes all dependencies in the dep tree for the echo-gateway service with leaf nodes being mocks
type MockService ¶
type MockService interface { MakeHTTPRequest( method string, url string, headers map[string]string, body io.Reader, ) (*http.Response, error) MakeTChannelRequest( ctx context.Context, thriftService string, method string, headers map[string]string, req, resp zanzibar.RWTStruct, timeoutAndRetryCfg *zanzibar.TimeoutAndRetryOptions, ) (bool, map[string]string, error) MockClients() *MockClientNodes Server() *zanzibar.Gateway Start() Stop() }
MockService interface
func MustCreateTestService ¶
func MustCreateTestService(t *testing.T, testConfigPaths ...string) MockService
MustCreateTestService creates a new MockService, panics if it fails doing so. Optional testConfigPaths specifies runtime config files used in tests, it should be paths that are relative to "$GOPATH/src". If testConfigPaths is absent, a default test config file is used. The default test config file is chosen base on existence in order below: - "../../config/test.yaml" where current dir is the dir of service-config.yaml for the mocked service - "config/test.yaml" where current dir is the project root