-
-
Notifications
You must be signed in to change notification settings - Fork 135
/
authenticator.go
57 lines (43 loc) · 1.43 KB
/
authenticator.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
// Code generated by mockery v2.20.0. DO NOT EDIT.
package mocks
import (
mock "github.com/stretchr/testify/mock"
ssh "github.com/gliderlabs/ssh"
)
// Authenticator is an autogenerated mock type for the Authenticator type
type Authenticator struct {
mock.Mock
}
// Password provides a mock function with given fields: ctx, user, password
func (_m *Authenticator) Password(ctx ssh.Context, user string, password string) bool {
ret := _m.Called(ctx, user, password)
var r0 bool
if rf, ok := ret.Get(0).(func(ssh.Context, string, string) bool); ok {
r0 = rf(ctx, user, password)
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
// PublicKey provides a mock function with given fields: ctx, user, key
func (_m *Authenticator) PublicKey(ctx ssh.Context, user string, key ssh.PublicKey) bool {
ret := _m.Called(ctx, user, key)
var r0 bool
if rf, ok := ret.Get(0).(func(ssh.Context, string, ssh.PublicKey) bool); ok {
r0 = rf(ctx, user, key)
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
type mockConstructorTestingTNewAuthenticator interface {
mock.TestingT
Cleanup(func())
}
// NewAuthenticator creates a new instance of Authenticator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func NewAuthenticator(t mockConstructorTestingTNewAuthenticator) *Authenticator {
mock := &Authenticator{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}