200 lines
6.8 KiB
Go
200 lines
6.8 KiB
Go
// Code generated by pegomock. DO NOT EDIT.
|
|
// Source: github.com/derailed/k9s/internal/config (interfaces: KubeSettings)
|
|
|
|
package config_test
|
|
|
|
import (
|
|
pegomock "github.com/petergtz/pegomock"
|
|
"reflect"
|
|
"time"
|
|
)
|
|
|
|
type MockKubeSettings struct {
|
|
fail func(message string, callerSkip ...int)
|
|
}
|
|
|
|
func NewMockKubeSettings() *MockKubeSettings {
|
|
return &MockKubeSettings{fail: pegomock.GlobalFailHandler}
|
|
}
|
|
|
|
func (mock *MockKubeSettings) ClusterNames() ([]string, error) {
|
|
if mock == nil {
|
|
panic("mock must not be nil. Use myMock := NewMockKubeSettings().")
|
|
}
|
|
params := []pegomock.Param{}
|
|
result := pegomock.GetGenericMockFrom(mock).Invoke("ClusterNames", params, []reflect.Type{reflect.TypeOf((*[]string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
|
var ret0 []string
|
|
var ret1 error
|
|
if len(result) != 0 {
|
|
if result[0] != nil {
|
|
ret0 = result[0].([]string)
|
|
}
|
|
if result[1] != nil {
|
|
ret1 = result[1].(error)
|
|
}
|
|
}
|
|
return ret0, ret1
|
|
}
|
|
|
|
func (mock *MockKubeSettings) CurrentClusterName() (string, error) {
|
|
if mock == nil {
|
|
panic("mock must not be nil. Use myMock := NewMockKubeSettings().")
|
|
}
|
|
params := []pegomock.Param{}
|
|
result := pegomock.GetGenericMockFrom(mock).Invoke("CurrentClusterName", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
|
var ret0 string
|
|
var ret1 error
|
|
if len(result) != 0 {
|
|
if result[0] != nil {
|
|
ret0 = result[0].(string)
|
|
}
|
|
if result[1] != nil {
|
|
ret1 = result[1].(error)
|
|
}
|
|
}
|
|
return ret0, ret1
|
|
}
|
|
|
|
func (mock *MockKubeSettings) CurrentContextName() (string, error) {
|
|
if mock == nil {
|
|
panic("mock must not be nil. Use myMock := NewMockKubeSettings().")
|
|
}
|
|
params := []pegomock.Param{}
|
|
result := pegomock.GetGenericMockFrom(mock).Invoke("CurrentContextName", params, []reflect.Type{reflect.TypeOf((*string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
|
var ret0 string
|
|
var ret1 error
|
|
if len(result) != 0 {
|
|
if result[0] != nil {
|
|
ret0 = result[0].(string)
|
|
}
|
|
if result[1] != nil {
|
|
ret1 = result[1].(error)
|
|
}
|
|
}
|
|
return ret0, ret1
|
|
}
|
|
|
|
func (mock *MockKubeSettings) NamespaceNames() ([]string, error) {
|
|
if mock == nil {
|
|
panic("mock must not be nil. Use myMock := NewMockKubeSettings().")
|
|
}
|
|
params := []pegomock.Param{}
|
|
result := pegomock.GetGenericMockFrom(mock).Invoke("NamespaceNames", params, []reflect.Type{reflect.TypeOf((*[]string)(nil)).Elem(), reflect.TypeOf((*error)(nil)).Elem()})
|
|
var ret0 []string
|
|
var ret1 error
|
|
if len(result) != 0 {
|
|
if result[0] != nil {
|
|
ret0 = result[0].([]string)
|
|
}
|
|
if result[1] != nil {
|
|
ret1 = result[1].(error)
|
|
}
|
|
}
|
|
return ret0, ret1
|
|
}
|
|
|
|
func (mock *MockKubeSettings) VerifyWasCalledOnce() *VerifierKubeSettings {
|
|
return &VerifierKubeSettings{
|
|
mock: mock,
|
|
invocationCountMatcher: pegomock.Times(1),
|
|
}
|
|
}
|
|
|
|
func (mock *MockKubeSettings) VerifyWasCalled(invocationCountMatcher pegomock.Matcher) *VerifierKubeSettings {
|
|
return &VerifierKubeSettings{
|
|
mock: mock,
|
|
invocationCountMatcher: invocationCountMatcher,
|
|
}
|
|
}
|
|
|
|
func (mock *MockKubeSettings) VerifyWasCalledInOrder(invocationCountMatcher pegomock.Matcher, inOrderContext *pegomock.InOrderContext) *VerifierKubeSettings {
|
|
return &VerifierKubeSettings{
|
|
mock: mock,
|
|
invocationCountMatcher: invocationCountMatcher,
|
|
inOrderContext: inOrderContext,
|
|
}
|
|
}
|
|
|
|
func (mock *MockKubeSettings) VerifyWasCalledEventually(invocationCountMatcher pegomock.Matcher, timeout time.Duration) *VerifierKubeSettings {
|
|
return &VerifierKubeSettings{
|
|
mock: mock,
|
|
invocationCountMatcher: invocationCountMatcher,
|
|
timeout: timeout,
|
|
}
|
|
}
|
|
|
|
type VerifierKubeSettings struct {
|
|
mock *MockKubeSettings
|
|
invocationCountMatcher pegomock.Matcher
|
|
inOrderContext *pegomock.InOrderContext
|
|
timeout time.Duration
|
|
}
|
|
|
|
func (verifier *VerifierKubeSettings) ClusterNames() *KubeSettings_ClusterNames_OngoingVerification {
|
|
params := []pegomock.Param{}
|
|
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "ClusterNames", params, verifier.timeout)
|
|
return &KubeSettings_ClusterNames_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
|
}
|
|
|
|
type KubeSettings_ClusterNames_OngoingVerification struct {
|
|
mock *MockKubeSettings
|
|
methodInvocations []pegomock.MethodInvocation
|
|
}
|
|
|
|
func (c *KubeSettings_ClusterNames_OngoingVerification) GetCapturedArguments() {
|
|
}
|
|
|
|
func (c *KubeSettings_ClusterNames_OngoingVerification) GetAllCapturedArguments() {
|
|
}
|
|
|
|
func (verifier *VerifierKubeSettings) CurrentClusterName() *KubeSettings_CurrentClusterName_OngoingVerification {
|
|
params := []pegomock.Param{}
|
|
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "CurrentClusterName", params, verifier.timeout)
|
|
return &KubeSettings_CurrentClusterName_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
|
}
|
|
|
|
type KubeSettings_CurrentClusterName_OngoingVerification struct {
|
|
mock *MockKubeSettings
|
|
methodInvocations []pegomock.MethodInvocation
|
|
}
|
|
|
|
func (c *KubeSettings_CurrentClusterName_OngoingVerification) GetCapturedArguments() {
|
|
}
|
|
|
|
func (c *KubeSettings_CurrentClusterName_OngoingVerification) GetAllCapturedArguments() {
|
|
}
|
|
|
|
func (verifier *VerifierKubeSettings) CurrentContextName() *KubeSettings_CurrentContextName_OngoingVerification {
|
|
params := []pegomock.Param{}
|
|
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "CurrentContextName", params, verifier.timeout)
|
|
return &KubeSettings_CurrentContextName_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
|
}
|
|
|
|
type KubeSettings_CurrentContextName_OngoingVerification struct {
|
|
mock *MockKubeSettings
|
|
methodInvocations []pegomock.MethodInvocation
|
|
}
|
|
|
|
func (c *KubeSettings_CurrentContextName_OngoingVerification) GetCapturedArguments() {
|
|
}
|
|
|
|
func (c *KubeSettings_CurrentContextName_OngoingVerification) GetAllCapturedArguments() {
|
|
}
|
|
|
|
func (verifier *VerifierKubeSettings) NamespaceNames() *KubeSettings_NamespaceNames_OngoingVerification {
|
|
params := []pegomock.Param{}
|
|
methodInvocations := pegomock.GetGenericMockFrom(verifier.mock).Verify(verifier.inOrderContext, verifier.invocationCountMatcher, "NamespaceNames", params, verifier.timeout)
|
|
return &KubeSettings_NamespaceNames_OngoingVerification{mock: verifier.mock, methodInvocations: methodInvocations}
|
|
}
|
|
|
|
type KubeSettings_NamespaceNames_OngoingVerification struct {
|
|
mock *MockKubeSettings
|
|
methodInvocations []pegomock.MethodInvocation
|
|
}
|
|
|
|
func (c *KubeSettings_NamespaceNames_OngoingVerification) GetCapturedArguments() {
|
|
}
|
|
|
|
func (c *KubeSettings_NamespaceNames_OngoingVerification) GetAllCapturedArguments() {
|
|
}
|