forked from cloudfoundry-attic/app-manager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_nsync_bbs.go
163 lines (143 loc) · 4.87 KB
/
fake_nsync_bbs.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
// This file was generated by counterfeiter
package fake_bbs
import (
. "github.com/cloudfoundry-incubator/runtime-schema/bbs"
"github.com/cloudfoundry-incubator/runtime-schema/models"
"sync"
)
type FakeNsyncBBS struct {
DesireLRPStub func(models.DesiredLRP) error
desireLRPMutex sync.RWMutex
desireLRPArgsForCall []struct {
arg1 models.DesiredLRP
}
desireLRPReturns struct {
result1 error
}
RemoveDesiredLRPByProcessGuidStub func(guid string) error
removeDesiredLRPByProcessGuidMutex sync.RWMutex
removeDesiredLRPByProcessGuidArgsForCall []struct {
arg1 string
}
removeDesiredLRPByProcessGuidReturns struct {
result1 error
}
GetAllDesiredLRPsStub func() ([]models.DesiredLRP, error)
getAllDesiredLRPsMutex sync.RWMutex
getAllDesiredLRPsArgsForCall []struct{}
getAllDesiredLRPsReturns struct {
result1 []models.DesiredLRP
result2 error
}
ChangeDesiredLRPStub func(change models.DesiredLRPChange) error
changeDesiredLRPMutex sync.RWMutex
changeDesiredLRPArgsForCall []struct {
arg1 models.DesiredLRPChange
}
changeDesiredLRPReturns struct {
result1 error
}
}
func (fake *FakeNsyncBBS) DesireLRP(arg1 models.DesiredLRP) error {
fake.desireLRPMutex.Lock()
defer fake.desireLRPMutex.Unlock()
fake.desireLRPArgsForCall = append(fake.desireLRPArgsForCall, struct {
arg1 models.DesiredLRP
}{arg1})
if fake.DesireLRPStub != nil {
return fake.DesireLRPStub(arg1)
} else {
return fake.desireLRPReturns.result1
}
}
func (fake *FakeNsyncBBS) DesireLRPCallCount() int {
fake.desireLRPMutex.RLock()
defer fake.desireLRPMutex.RUnlock()
return len(fake.desireLRPArgsForCall)
}
func (fake *FakeNsyncBBS) DesireLRPArgsForCall(i int) models.DesiredLRP {
fake.desireLRPMutex.RLock()
defer fake.desireLRPMutex.RUnlock()
return fake.desireLRPArgsForCall[i].arg1
}
func (fake *FakeNsyncBBS) DesireLRPReturns(result1 error) {
fake.desireLRPReturns = struct {
result1 error
}{result1}
}
func (fake *FakeNsyncBBS) RemoveDesiredLRPByProcessGuid(arg1 string) error {
fake.removeDesiredLRPByProcessGuidMutex.Lock()
defer fake.removeDesiredLRPByProcessGuidMutex.Unlock()
fake.removeDesiredLRPByProcessGuidArgsForCall = append(fake.removeDesiredLRPByProcessGuidArgsForCall, struct {
arg1 string
}{arg1})
if fake.RemoveDesiredLRPByProcessGuidStub != nil {
return fake.RemoveDesiredLRPByProcessGuidStub(arg1)
} else {
return fake.removeDesiredLRPByProcessGuidReturns.result1
}
}
func (fake *FakeNsyncBBS) RemoveDesiredLRPByProcessGuidCallCount() int {
fake.removeDesiredLRPByProcessGuidMutex.RLock()
defer fake.removeDesiredLRPByProcessGuidMutex.RUnlock()
return len(fake.removeDesiredLRPByProcessGuidArgsForCall)
}
func (fake *FakeNsyncBBS) RemoveDesiredLRPByProcessGuidArgsForCall(i int) string {
fake.removeDesiredLRPByProcessGuidMutex.RLock()
defer fake.removeDesiredLRPByProcessGuidMutex.RUnlock()
return fake.removeDesiredLRPByProcessGuidArgsForCall[i].arg1
}
func (fake *FakeNsyncBBS) RemoveDesiredLRPByProcessGuidReturns(result1 error) {
fake.removeDesiredLRPByProcessGuidReturns = struct {
result1 error
}{result1}
}
func (fake *FakeNsyncBBS) GetAllDesiredLRPs() ([]models.DesiredLRP, error) {
fake.getAllDesiredLRPsMutex.Lock()
defer fake.getAllDesiredLRPsMutex.Unlock()
fake.getAllDesiredLRPsArgsForCall = append(fake.getAllDesiredLRPsArgsForCall, struct{}{})
if fake.GetAllDesiredLRPsStub != nil {
return fake.GetAllDesiredLRPsStub()
} else {
return fake.getAllDesiredLRPsReturns.result1, fake.getAllDesiredLRPsReturns.result2
}
}
func (fake *FakeNsyncBBS) GetAllDesiredLRPsCallCount() int {
fake.getAllDesiredLRPsMutex.RLock()
defer fake.getAllDesiredLRPsMutex.RUnlock()
return len(fake.getAllDesiredLRPsArgsForCall)
}
func (fake *FakeNsyncBBS) GetAllDesiredLRPsReturns(result1 []models.DesiredLRP, result2 error) {
fake.getAllDesiredLRPsReturns = struct {
result1 []models.DesiredLRP
result2 error
}{result1, result2}
}
func (fake *FakeNsyncBBS) ChangeDesiredLRP(arg1 models.DesiredLRPChange) error {
fake.changeDesiredLRPMutex.Lock()
defer fake.changeDesiredLRPMutex.Unlock()
fake.changeDesiredLRPArgsForCall = append(fake.changeDesiredLRPArgsForCall, struct {
arg1 models.DesiredLRPChange
}{arg1})
if fake.ChangeDesiredLRPStub != nil {
return fake.ChangeDesiredLRPStub(arg1)
} else {
return fake.changeDesiredLRPReturns.result1
}
}
func (fake *FakeNsyncBBS) ChangeDesiredLRPCallCount() int {
fake.changeDesiredLRPMutex.RLock()
defer fake.changeDesiredLRPMutex.RUnlock()
return len(fake.changeDesiredLRPArgsForCall)
}
func (fake *FakeNsyncBBS) ChangeDesiredLRPArgsForCall(i int) models.DesiredLRPChange {
fake.changeDesiredLRPMutex.RLock()
defer fake.changeDesiredLRPMutex.RUnlock()
return fake.changeDesiredLRPArgsForCall[i].arg1
}
func (fake *FakeNsyncBBS) ChangeDesiredLRPReturns(result1 error) {
fake.changeDesiredLRPReturns = struct {
result1 error
}{result1}
}
var _ NsyncBBS = new(FakeNsyncBBS)