forked from cloudfoundry/bosh-bootloader
-
Notifications
You must be signed in to change notification settings - Fork 2
/
bosh_client_provider.go
34 lines (30 loc) · 955 Bytes
/
bosh_client_provider.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
package fakes
import (
"github.com/cloudfoundry/bosh-bootloader/bosh"
"github.com/cloudfoundry/bosh-bootloader/storage"
)
type BOSHClientProvider struct {
ClientCall struct {
CallCount int
Receives struct {
Jumpbox storage.Jumpbox
DirectorAddress string
DirectorUsername string
DirectorPassword string
DirectorCACert string
}
Returns struct {
Client bosh.Client
Error error
}
}
}
func (b *BOSHClientProvider) Client(jumpbox storage.Jumpbox, directorAddress, directorUsername, directorPassword, directorCACert string) (bosh.Client, error) {
b.ClientCall.CallCount++
b.ClientCall.Receives.Jumpbox = jumpbox
b.ClientCall.Receives.DirectorAddress = directorAddress
b.ClientCall.Receives.DirectorUsername = directorUsername
b.ClientCall.Receives.DirectorPassword = directorPassword
b.ClientCall.Receives.DirectorCACert = directorCACert
return b.ClientCall.Returns.Client, b.ClientCall.Returns.Error
}