-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Expand file tree
/
Copy pathfake_imagestreamsecrets.go
More file actions
28 lines (23 loc) · 950 Bytes
/
fake_imagestreamsecrets.go
File metadata and controls
28 lines (23 loc) · 950 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 testclient
import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
clientgotesting "k8s.io/client-go/testing"
kapi "k8s.io/kubernetes/pkg/api"
"github.com/openshift/origin/pkg/client"
imageapi "github.com/openshift/origin/pkg/image/api"
)
// FakeImageStreamSecrets implements ImageStreamSecretInterface. Meant to be
// embedded into a struct to get a default implementation. This makes faking
// out just the methods you want to test easier.
type FakeImageStreamSecrets struct {
Fake *Fake
Namespace string
}
var _ client.ImageStreamSecretInterface = &FakeImageStreamSecrets{}
func (c *FakeImageStreamSecrets) Secrets(name string, options metav1.ListOptions) (*kapi.SecretList, error) {
obj, err := c.Fake.Invokes(clientgotesting.NewGetAction(imageapi.SchemeGroupVersion.WithResource("imagestreams/secrets"), c.Namespace, name), &kapi.SecretList{})
if obj == nil {
return nil, err
}
return obj.(*kapi.SecretList), err
}