mocks

package
v1.58.2 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockClient

type MockClient struct {
	mock.Mock
}

MockClient is an autogenerated mock type for the Client type

func NewMockClient

func NewMockClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockClient

NewMockClient creates a new instance of MockClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockClient) Connect

func (_m *MockClient) Connect(ctx context.Context) error

Connect provides a mock function with given fields: ctx

func (*MockClient) Disconnect

func (_m *MockClient) Disconnect(ctx context.Context) error

Disconnect provides a mock function with given fields: ctx

type MockConfigManager

type MockConfigManager struct {
	mock.Mock
}

MockConfigManager is an autogenerated mock type for the ConfigManager type

func NewMockConfigManager

func NewMockConfigManager(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockConfigManager

NewMockConfigManager creates a new instance of MockConfigManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockConfigManager) AddConfig

func (_m *MockConfigManager) AddConfig(configName string, reloader *opamp.ManagedConfig)

AddConfig provides a mock function with given fields: configName, reloader

func (*MockConfigManager) ApplyConfigChanges

func (_m *MockConfigManager) ApplyConfigChanges(remoteConfig *protobufs.AgentRemoteConfig) (bool, error)

ApplyConfigChanges provides a mock function with given fields: remoteConfig

func (*MockConfigManager) ComposeEffectiveConfig

func (_m *MockConfigManager) ComposeEffectiveConfig() (*protobufs.EffectiveConfig, error)

ComposeEffectiveConfig provides a mock function with given fields:

type MockDownloadableFileManager

type MockDownloadableFileManager struct {
	mock.Mock
}

MockDownloadableFileManager is an autogenerated mock type for the DownloadableFileManager type

func NewMockDownloadableFileManager

func NewMockDownloadableFileManager(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockDownloadableFileManager

NewMockDownloadableFileManager creates a new instance of MockDownloadableFileManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockDownloadableFileManager) CleanupArtifacts

func (_m *MockDownloadableFileManager) CleanupArtifacts()

CleanupArtifacts provides a mock function with given fields:

func (*MockDownloadableFileManager) FetchAndExtractArchive

func (_m *MockDownloadableFileManager) FetchAndExtractArchive(_a0 *protobufs.DownloadableFile) error

FetchAndExtractArchive provides a mock function with given fields: _a0

type MockOpAMPClient

type MockOpAMPClient struct {
	mock.Mock
}

MockOpAMPClient is an autogenerated mock type for the OpAMPClient type

func NewMockOpAMPClient

func NewMockOpAMPClient(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockOpAMPClient

NewMockOpAMPClient creates a new instance of MockOpAMPClient. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockOpAMPClient) AgentDescription

func (_m *MockOpAMPClient) AgentDescription() *protobufs.AgentDescription

AgentDescription provides a mock function with given fields:

func (*MockOpAMPClient) SetAgentDescription

func (_m *MockOpAMPClient) SetAgentDescription(descr *protobufs.AgentDescription) error

SetAgentDescription provides a mock function with given fields: descr

func (*MockOpAMPClient) SetHealth added in v1.38.0

func (_m *MockOpAMPClient) SetHealth(health *protobufs.AgentHealth) error

SetHealth provides a mock function with given fields: health

func (*MockOpAMPClient) SetPackageStatuses

func (_m *MockOpAMPClient) SetPackageStatuses(statuses *protobufs.PackageStatuses) error

SetPackageStatuses provides a mock function with given fields: statuses

func (*MockOpAMPClient) SetRemoteConfigStatus

func (_m *MockOpAMPClient) SetRemoteConfigStatus(status *protobufs.RemoteConfigStatus) error

SetRemoteConfigStatus provides a mock function with given fields: status

func (*MockOpAMPClient) Start

func (_m *MockOpAMPClient) Start(ctx context.Context, settings types.StartSettings) error

Start provides a mock function with given fields: ctx, settings

func (*MockOpAMPClient) Stop

func (_m *MockOpAMPClient) Stop(ctx context.Context) error

Stop provides a mock function with given fields: ctx

func (*MockOpAMPClient) UpdateEffectiveConfig

func (_m *MockOpAMPClient) UpdateEffectiveConfig(ctx context.Context) error

UpdateEffectiveConfig provides a mock function with given fields: ctx

type MockPackagesStateProvider

type MockPackagesStateProvider struct {
	mock.Mock
}

MockPackagesStateProvider is an autogenerated mock type for the PackagesStateProvider type

func NewMockPackagesStateProvider

func NewMockPackagesStateProvider(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockPackagesStateProvider

NewMockPackagesStateProvider creates a new instance of MockPackagesStateProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockPackagesStateProvider) AllPackagesHash

func (_m *MockPackagesStateProvider) AllPackagesHash() ([]byte, error)

AllPackagesHash provides a mock function with given fields:

func (*MockPackagesStateProvider) CreatePackage

func (_m *MockPackagesStateProvider) CreatePackage(packageName string, typ protobufs.PackageType) error

CreatePackage provides a mock function with given fields: packageName, typ

func (*MockPackagesStateProvider) DeletePackage

func (_m *MockPackagesStateProvider) DeletePackage(packageName string) error

DeletePackage provides a mock function with given fields: packageName

func (*MockPackagesStateProvider) FileContentHash

func (_m *MockPackagesStateProvider) FileContentHash(packageName string) ([]byte, error)

FileContentHash provides a mock function with given fields: packageName

func (*MockPackagesStateProvider) LastReportedStatuses

func (_m *MockPackagesStateProvider) LastReportedStatuses() (*protobufs.PackageStatuses, error)

LastReportedStatuses provides a mock function with given fields:

func (*MockPackagesStateProvider) PackageState

func (_m *MockPackagesStateProvider) PackageState(packageName string) (types.PackageState, error)

PackageState provides a mock function with given fields: packageName

func (*MockPackagesStateProvider) Packages

func (_m *MockPackagesStateProvider) Packages() ([]string, error)

Packages provides a mock function with given fields:

func (*MockPackagesStateProvider) SetAllPackagesHash

func (_m *MockPackagesStateProvider) SetAllPackagesHash(hash []byte) error

SetAllPackagesHash provides a mock function with given fields: hash

func (*MockPackagesStateProvider) SetLastReportedStatuses

func (_m *MockPackagesStateProvider) SetLastReportedStatuses(statuses *protobufs.PackageStatuses) error

SetLastReportedStatuses provides a mock function with given fields: statuses

func (*MockPackagesStateProvider) SetPackageState

func (_m *MockPackagesStateProvider) SetPackageState(packageName string, state types.PackageState) error

SetPackageState provides a mock function with given fields: packageName, state

func (*MockPackagesStateProvider) UpdateContent

func (_m *MockPackagesStateProvider) UpdateContent(ctx context.Context, packageName string, data io.Reader, contentHash []byte) error

UpdateContent provides a mock function with given fields: ctx, packageName, data, contentHash

type MockUpdaterManager

type MockUpdaterManager struct {
	mock.Mock
}

MockUpdaterManager is an autogenerated mock type for the updaterManager type

func NewMockUpdaterManager

func NewMockUpdaterManager(t interface {
	mock.TestingT
	Cleanup(func())
}) *MockUpdaterManager

NewMockUpdaterManager creates a new instance of MockUpdaterManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*MockUpdaterManager) StartAndMonitorUpdater

func (_m *MockUpdaterManager) StartAndMonitorUpdater() error

StartAndMonitorUpdater provides a mock function with given fields:

Jump to

Keyboard shortcuts

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