Documentation ¶
Overview ¶
Package testutil provides utility functions for testing with artifacts package.
Index ¶
- type MockBQClient
- func (m *MockBQClient) ReadArtifactGroups(ctx context.Context, opts artifacts.ReadArtifactGroupsOpts) (groups []*artifacts.ArtifactGroup, nextPageToken string, err error)
- func (m *MockBQClient) ReadArtifacts(ctx context.Context, opts artifacts.ReadArtifactsOpts) (groups []*artifacts.MatchingArtifact, nextPageToken string, err error)
- type ReadArtifactGroupsFunc
- type ReadArtifactsFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockBQClient ¶
type MockBQClient struct { ReadArtifactGroupsFunc ReadArtifactGroupsFunc ReadArtifactsFunc ReadArtifactsFunc }
MockBQClient is a mock implementation of the BQClient interface.
func NewMockBQClient ¶
func NewMockBQClient(readArtifactGroupsFunc ReadArtifactGroupsFunc, readArtifactsFunc ReadArtifactsFunc) *MockBQClient
NewMockBQClient creates a new MockBQClient with the given ReadTestArtifactGroupsFunc.
func (*MockBQClient) ReadArtifactGroups ¶
func (m *MockBQClient) ReadArtifactGroups(ctx context.Context, opts artifacts.ReadArtifactGroupsOpts) (groups []*artifacts.ArtifactGroup, nextPageToken string, err error)
ReadArtifactGroups implements the BQClient interface.
func (*MockBQClient) ReadArtifacts ¶
func (m *MockBQClient) ReadArtifacts(ctx context.Context, opts artifacts.ReadArtifactsOpts) (groups []*artifacts.MatchingArtifact, nextPageToken string, err error)
ReadArtifacts implements the BQClient interface.
type ReadArtifactGroupsFunc ¶
type ReadArtifactGroupsFunc func(ctx context.Context, opts artifacts.ReadArtifactGroupsOpts) (groups []*artifacts.ArtifactGroup, nextPageToken string, err error)
type ReadArtifactsFunc ¶
type ReadArtifactsFunc func(ctx context.Context, opts artifacts.ReadArtifactsOpts) (rows []*artifacts.MatchingArtifact, nextPageToken string, err error)
Click to show internal directories.
Click to hide internal directories.