package mock
import "k8s.io/kubernetes/pkg/cloudprovider/providers/gce/cloud/mock"
Package mock encapsulates mocks for testing GCE provider functionality. These methods are used to override the mock objects' methods in order to intercept the standard processing and to add custom logic for test purposes.
// Example usage:
cloud := cloud.NewMockGCE() cloud.MockTargetPools.AddInstanceHook = mock.AddInstanceHook
Index ¶
- func AddInstanceHook(ctx context.Context, key *meta.Key, req *ga.TargetPoolsAddInstanceRequest, m *cloud.MockTargetPools) error
- func RemoveInstanceHook(ctx context.Context, key *meta.Key, req *ga.TargetPoolsRemoveInstanceRequest, m *cloud.MockTargetPools) error
Functions ¶
func AddInstanceHook ¶
func AddInstanceHook(ctx context.Context, key *meta.Key, req *ga.TargetPoolsAddInstanceRequest, m *cloud.MockTargetPools) error
AddInstanceHook mocks adding a Instance to MockTargetPools
func RemoveInstanceHook ¶
func RemoveInstanceHook(ctx context.Context, key *meta.Key, req *ga.TargetPoolsRemoveInstanceRequest, m *cloud.MockTargetPools) error
RemoveInstanceHook mocks removing a Instance from MockTargetPools
Source Files ¶
mock.go
- Version
- v1.10.0-beta.0
- Published
- Feb 21, 2018
- Platform
- linux/amd64
- Imports
- 7 packages
- Last checked
- 4 minutes ago –
Tools for package owners.