forked from openshift/origin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fake_useridentitymappings.go
45 lines (35 loc) · 1.49 KB
/
fake_useridentitymappings.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
package testclient
import (
ktestclient "k8s.io/kubernetes/pkg/client/unversioned/testclient"
userapi "github.com/openshift/origin/pkg/user/api"
)
// FakeUserIdentityMappings implements UserIdentityMappingInterface. 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 FakeUserIdentityMappings struct {
Fake *Fake
}
func (c *FakeUserIdentityMappings) Get(name string) (*userapi.UserIdentityMapping, error) {
obj, err := c.Fake.Invokes(ktestclient.NewRootGetAction("useridentitymappings", name), &userapi.UserIdentityMapping{})
if obj == nil {
return nil, err
}
return obj.(*userapi.UserIdentityMapping), err
}
func (c *FakeUserIdentityMappings) Create(inObj *userapi.UserIdentityMapping) (*userapi.UserIdentityMapping, error) {
obj, err := c.Fake.Invokes(ktestclient.NewRootCreateAction("useridentitymappings", inObj), inObj)
if obj == nil {
return nil, err
}
return obj.(*userapi.UserIdentityMapping), err
}
func (c *FakeUserIdentityMappings) Update(inObj *userapi.UserIdentityMapping) (*userapi.UserIdentityMapping, error) {
obj, err := c.Fake.Invokes(ktestclient.NewRootUpdateAction("useridentitymappings", inObj), inObj)
if obj == nil {
return nil, err
}
return obj.(*userapi.UserIdentityMapping), err
}
func (c *FakeUserIdentityMappings) Delete(name string) error {
_, err := c.Fake.Invokes(ktestclient.NewRootDeleteAction("useridentitymappings", name), &userapi.UserIdentityMapping{})
return err
}