testutil

package
v0.0.0-...-4d0e586 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 18, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package testutil provides utility functions for testing with artifacts package.

Index

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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL