Add internal/mocks/mocktokenauthenticator generated mocks.
Signed-off-by: Matt Moyer <moyerm@vmware.com>
This commit is contained in:
parent
80a23bd2fd
commit
66f4e62c6c
8
internal/mocks/mocktokenauthenticator/generate.go
Normal file
8
internal/mocks/mocktokenauthenticator/generate.go
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2020 VMware, Inc.
|
||||||
|
SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
package mocktokenauthenticator
|
||||||
|
|
||||||
|
//go:generate go run -v github.com/golang/mock/mockgen -destination=mocktokenauthenticator.go -package=mocktokenauthenticator -copyright_file=../../../hack/header.txt k8s.io/apiserver/pkg/authentication/authenticator Token
|
@ -0,0 +1,55 @@
|
|||||||
|
// Copyright 2020 VMware, Inc.
|
||||||
|
// SPDX-License-Identifier: Apache-2.0
|
||||||
|
//
|
||||||
|
|
||||||
|
// Code generated by MockGen. DO NOT EDIT.
|
||||||
|
// Source: k8s.io/apiserver/pkg/authentication/authenticator (interfaces: Token)
|
||||||
|
|
||||||
|
// Package mocktokenauthenticator is a generated GoMock package.
|
||||||
|
package mocktokenauthenticator
|
||||||
|
|
||||||
|
import (
|
||||||
|
context "context"
|
||||||
|
gomock "github.com/golang/mock/gomock"
|
||||||
|
authenticator "k8s.io/apiserver/pkg/authentication/authenticator"
|
||||||
|
reflect "reflect"
|
||||||
|
)
|
||||||
|
|
||||||
|
// MockToken is a mock of Token interface
|
||||||
|
type MockToken struct {
|
||||||
|
ctrl *gomock.Controller
|
||||||
|
recorder *MockTokenMockRecorder
|
||||||
|
}
|
||||||
|
|
||||||
|
// MockTokenMockRecorder is the mock recorder for MockToken
|
||||||
|
type MockTokenMockRecorder struct {
|
||||||
|
mock *MockToken
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewMockToken creates a new mock instance
|
||||||
|
func NewMockToken(ctrl *gomock.Controller) *MockToken {
|
||||||
|
mock := &MockToken{ctrl: ctrl}
|
||||||
|
mock.recorder = &MockTokenMockRecorder{mock}
|
||||||
|
return mock
|
||||||
|
}
|
||||||
|
|
||||||
|
// EXPECT returns an object that allows the caller to indicate expected use
|
||||||
|
func (m *MockToken) EXPECT() *MockTokenMockRecorder {
|
||||||
|
return m.recorder
|
||||||
|
}
|
||||||
|
|
||||||
|
// AuthenticateToken mocks base method
|
||||||
|
func (m *MockToken) AuthenticateToken(arg0 context.Context, arg1 string) (*authenticator.Response, bool, error) {
|
||||||
|
m.ctrl.T.Helper()
|
||||||
|
ret := m.ctrl.Call(m, "AuthenticateToken", arg0, arg1)
|
||||||
|
ret0, _ := ret[0].(*authenticator.Response)
|
||||||
|
ret1, _ := ret[1].(bool)
|
||||||
|
ret2, _ := ret[2].(error)
|
||||||
|
return ret0, ret1, ret2
|
||||||
|
}
|
||||||
|
|
||||||
|
// AuthenticateToken indicates an expected call of AuthenticateToken
|
||||||
|
func (mr *MockTokenMockRecorder) AuthenticateToken(arg0, arg1 interface{}) *gomock.Call {
|
||||||
|
mr.mock.ctrl.T.Helper()
|
||||||
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthenticateToken", reflect.TypeOf((*MockToken)(nil).AuthenticateToken), arg0, arg1)
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user