-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Expand file tree
/
Copy pathtest.go
More file actions
28 lines (21 loc) · 791 Bytes
/
test.go
File metadata and controls
28 lines (21 loc) · 791 Bytes
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
package client
import (
kcoreclient "k8s.io/kubernetes/pkg/client/clientset_generated/internalclientset/typed/core/internalversion"
imageclientv1 "github.com/openshift/origin/pkg/image/generated/clientset/typed/image/v1"
)
type fakeRegistryClient struct {
RegistryClient
images imageclientv1.ImageV1Interface
}
func NewFakeRegistryClient(imageclient imageclientv1.ImageV1Interface) RegistryClient {
return &fakeRegistryClient{
RegistryClient: ®istryClient{},
images: imageclient,
}
}
func (c *fakeRegistryClient) Client() (Interface, error) {
return newAPIClient(nil, nil, c.images, nil), nil
}
func NewFakeRegistryAPIClient(kc kcoreclient.CoreInterface, imageclient imageclientv1.ImageV1Interface) Interface {
return newAPIClient(nil, nil, imageclient, nil)
}