Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AuthMiddlewareInterceptor ¶
func AuthMiddlewareInterceptor(mock *MockPachd) grpcutil.Interceptor
Types ¶
type FindCommitsFunc ¶
type FindCommitsFunc func(*pfs.FindCommitsRequest, pfs.API_FindCommitsServer) error
type InterceptorOption ¶
type InterceptorOption func(mock *MockPachd) grpcutil.Interceptor
type MockEnv ¶
MockEnv contains the basic setup for running end-to-end pachyderm tests entirely locally within the test process. It provides a temporary directory for storing data, an embedded etcd server with a connected client, as well as a local mock pachd instance which allows a test to hook into any pachd calls.
func NewMockEnv ¶
NewMockEnv constructs a MockEnv for testing, which will be destroyed at the end of the test.
type MockPPSJobFinisher ¶
type MockPPSJobFinisher struct{}
func (*MockPPSJobFinisher) FinishJob ¶
func (mpp *MockPPSJobFinisher) FinishJob(*pfs.CommitInfo)
type MockPPSJobStopper ¶
type MockPPSJobStopper struct{}
func (*MockPPSJobStopper) StopJob ¶ added in v2.8.0
func (mpp *MockPPSJobStopper) StopJob(*pfs.Commit)
func (*MockPPSJobStopper) StopJobSet ¶ added in v2.8.0
func (mpp *MockPPSJobStopper) StopJobSet(*pfs.CommitSet)
type MockPPSPropagater ¶
type MockPPSPropagater struct{}
func (*MockPPSPropagater) PropagateJobs ¶
func (mpp *MockPPSPropagater) PropagateJobs()
type MockPPSTransactionServer ¶
type MockPPSTransactionServer struct { Api ppsTransactionAPI NewPropagater mockNewPropagater NewJobStopper mockNewJobStopper NewJobFinisher mockNewJobFinisher StopJobInTransaction mockStopJobInTransaction UpdateJobStateInTransaction mockUpdateJobStateInTransaction CreatePipelineInTransaction mockCreatePipelineInTransaction InspectPipelineInTransaction mockInspectPipelineInTransaction ActivateAuthInTransaction mockActivateAuthInTransaction }
MockPPSTransactionServer provides a mocking interface for overriding PPS behavior inside transactions.
func NewMockPPSTransactionServer ¶
func NewMockPPSTransactionServer() *MockPPSTransactionServer
NewMockPPSTransactionServer instantiates a MockPPSTransactionServer
type MockPachd ¶
type MockPachd struct { Addr net.Addr PFS mockPFSServer Storage mockStorageServer PPS mockPPSServer Auth mockAuthServer GetAuthServer func() authserver.APIServer Transaction mockTransactionServer Identity mockIdentityServer Enterprise mockEnterpriseServer License mockLicenseServer Version mockVersionServer Admin mockAdminServer Proxy mockProxyServer Logs mockLogsServer Metadata mockMetadataServer // contains filtered or unexported fields }
MockPachd provides an interface for running the interface for a Pachd API server locally without any of its dependencies. Tests may mock out specific API calls by providing a handler function, and later check information about the mocked calls.
func NewMockPachd ¶
func NewMockPachd(ctx context.Context, port uint16, options ...InterceptorOption) (*MockPachd, error)
NewMockPachd constructs a mock Pachd API server whose behavior can be controlled through the MockPachd instance. By default, all API calls will error, unless a handler is specified. A port value of 0 will choose a free port automatically options can be supplied to configure the grpcutil.Server's interceptors.
type RotateRootTokenFunc ¶
type RotateRootTokenFunc func(context.Context, *auth.RotateRootTokenRequest) (*auth.RotateRootTokenResponse, error)