forked from cloudfoundry-community/cf-resource
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_paas.go
144 lines (129 loc) · 3.74 KB
/
fake_paas.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
// This file was generated by counterfeiter
package fakes
import (
"github.com/concourse/cf-resource/out"
"sync"
)
type FakePAAS struct {
LoginStub func(api string, username string, password string, insecure bool) error
loginMutex sync.RWMutex
loginArgsForCall []struct {
api string
username string
password string
insecure bool
}
loginReturns struct {
result1 error
}
TargetStub func(organization string, space string) error
targetMutex sync.RWMutex
targetArgsForCall []struct {
organization string
space string
}
targetReturns struct {
result1 error
}
PushAppStub func(manifest string, path string, currentAppName string) error
pushAppMutex sync.RWMutex
pushAppArgsForCall []struct {
manifest string
path string
currentAppName string
}
pushAppReturns struct {
result1 error
}
}
func (fake *FakePAAS) Login(api string, username string, password string, insecure bool) error {
fake.loginMutex.Lock()
fake.loginArgsForCall = append(fake.loginArgsForCall, struct {
api string
username string
password string
insecure bool
}{api, username, password, insecure})
fake.loginMutex.Unlock()
if fake.LoginStub != nil {
return fake.LoginStub(api, username, password, insecure)
} else {
return fake.loginReturns.result1
}
}
func (fake *FakePAAS) LoginCallCount() int {
fake.loginMutex.RLock()
defer fake.loginMutex.RUnlock()
return len(fake.loginArgsForCall)
}
func (fake *FakePAAS) LoginArgsForCall(i int) (string, string, string, bool) {
fake.loginMutex.RLock()
defer fake.loginMutex.RUnlock()
return fake.loginArgsForCall[i].api, fake.loginArgsForCall[i].username, fake.loginArgsForCall[i].password, fake.loginArgsForCall[i].insecure
}
func (fake *FakePAAS) LoginReturns(result1 error) {
fake.LoginStub = nil
fake.loginReturns = struct {
result1 error
}{result1}
}
func (fake *FakePAAS) Target(organization string, space string) error {
fake.targetMutex.Lock()
fake.targetArgsForCall = append(fake.targetArgsForCall, struct {
organization string
space string
}{organization, space})
fake.targetMutex.Unlock()
if fake.TargetStub != nil {
return fake.TargetStub(organization, space)
} else {
return fake.targetReturns.result1
}
}
func (fake *FakePAAS) TargetCallCount() int {
fake.targetMutex.RLock()
defer fake.targetMutex.RUnlock()
return len(fake.targetArgsForCall)
}
func (fake *FakePAAS) TargetArgsForCall(i int) (string, string) {
fake.targetMutex.RLock()
defer fake.targetMutex.RUnlock()
return fake.targetArgsForCall[i].organization, fake.targetArgsForCall[i].space
}
func (fake *FakePAAS) TargetReturns(result1 error) {
fake.TargetStub = nil
fake.targetReturns = struct {
result1 error
}{result1}
}
func (fake *FakePAAS) PushApp(manifest string, path string, currentAppName string) error {
fake.pushAppMutex.Lock()
fake.pushAppArgsForCall = append(fake.pushAppArgsForCall, struct {
manifest string
path string
currentAppName string
}{manifest, path, currentAppName})
fake.pushAppMutex.Unlock()
if fake.PushAppStub != nil {
return fake.PushAppStub(manifest, path, currentAppName)
} else {
return fake.pushAppReturns.result1
}
}
func (fake *FakePAAS) PushAppCallCount() int {
fake.pushAppMutex.RLock()
defer fake.pushAppMutex.RUnlock()
return len(fake.pushAppArgsForCall)
}
func (fake *FakePAAS) PushAppArgsForCall(i int) (string, string, string) {
fake.pushAppMutex.RLock()
defer fake.pushAppMutex.RUnlock()
return fake.pushAppArgsForCall[i].manifest, fake.pushAppArgsForCall[i].path, fake.pushAppArgsForCall[i].currentAppName
}
func (fake *FakePAAS) PushAppReturns(result1 error) {
fake.PushAppStub = nil
fake.pushAppReturns = struct {
result1 error
}{result1}
}
var _ out.PAAS = new(FakePAAS)