fake

package
v0.0.0-...-9d026b8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockProvider

type MockProvider struct {
	// GetConfigFunc mocks the GetConfig method.
	GetConfigFunc func() (*rest.Config, error)
	// contains filtered or unexported fields
}

MockProvider is a mock implementation of config.Provider.

func TestSomethingThatUsesProvider(t *testing.T) {

	// make and configure a mocked config.Provider
	mockedProvider := &MockProvider{
		GetConfigFunc: func() (*rest.Config, error) {
			panic("mock out the GetConfig method")
		},
	}

	// use mockedProvider in code that requires config.Provider
	// and then make assertions.

}

func (*MockProvider) GetConfig

func (mock *MockProvider) GetConfig() (*rest.Config, error)

GetConfig calls GetConfigFunc.

func (*MockProvider) GetConfigCalls

func (mock *MockProvider) GetConfigCalls() []struct {
}

GetConfigCalls gets all the calls that were made to GetConfig. Check the length with:

len(mockedProvider.GetConfigCalls())

type MockWebhookManager

type MockWebhookManager struct {
	// SetupWebhookServerFunc mocks the SetupWebhookServer method.
	SetupWebhookServerFunc func(mgr manager.Manager)
	// contains filtered or unexported fields
}

MockWebhookManager is a mock implementation of manager.Provider.

func TestSomethingThatUsesProvider(t *testing.T) {

	// make and configure a mocked manager.Provider
	mockedProvider := &MockWebhookManager{
		SetupWebhookServerFunc: func(mgr manager.Manager)  {
			panic("mock out the SetupWebhookServer method")
		},
	}

	// use mockedProvider in code that requires manager.Provider
	// and then make assertions.

}

func (*MockWebhookManager) SetupWebhookServer

func (mock *MockWebhookManager) SetupWebhookServer(mgr manager.Manager)

SetupWebhookServer calls SetupWebhookServerFunc.

func (*MockWebhookManager) SetupWebhookServerCalls

func (mock *MockWebhookManager) SetupWebhookServerCalls() []struct {
	Mgr manager.Manager
}

SetupWebhookServerCalls gets all the calls that were made to SetupWebhookServer. Check the length with:

len(mockedProvider.SetupWebhookServerCalls())

Jump to

Keyboard shortcuts

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