-
Notifications
You must be signed in to change notification settings - Fork 474
/
mock_openshift.go
56 lines (45 loc) · 2.04 KB
/
mock_openshift.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
package kubetest
import (
"context"
osapps_v1 "github.com/openshift/api/apps/v1"
osoauth_v1 "github.com/openshift/api/oauth/v1"
osproject_v1 "github.com/openshift/api/project/v1"
osroutes_v1 "github.com/openshift/api/route/v1"
osuser_v1 "github.com/openshift/api/user/v1"
)
func (o *K8SClientMock) GetRoute(ctx context.Context, namespace string, name string) (*osroutes_v1.Route, error) {
args := o.Called(ctx, namespace, name)
return args.Get(0).(*osroutes_v1.Route), args.Error(1)
}
func (o *K8SClientMock) GetDeploymentConfig(ctx context.Context, namespace string, name string) (*osapps_v1.DeploymentConfig, error) {
args := o.Called(namespace, name)
return args.Get(0).(*osapps_v1.DeploymentConfig), args.Error(1)
}
func (o *K8SClientMock) GetDeploymentConfigs(ctx context.Context, namespace string) ([]osapps_v1.DeploymentConfig, error) {
args := o.Called(namespace)
return args.Get(0).([]osapps_v1.DeploymentConfig), args.Error(1)
}
func (o *K8SClientMock) GetProject(ctx context.Context, project string) (*osproject_v1.Project, error) {
args := o.Called(project)
return args.Get(0).(*osproject_v1.Project), args.Error(1)
}
func (o *K8SClientMock) GetProjects(ctx context.Context, labelSelector string) ([]osproject_v1.Project, error) {
args := o.Called(labelSelector)
return args.Get(0).([]osproject_v1.Project), args.Error(1)
}
func (o *K8SClientMock) UpdateProject(ctx context.Context, project string, jsonPatch string) (*osproject_v1.Project, error) {
args := o.Called(project)
return args.Get(0).(*osproject_v1.Project), args.Error(1)
}
func (o *K8SClientMock) DeleteOAuthToken(ctx context.Context, token string) error {
args := o.Called(ctx, token)
return args.Error(0)
}
func (o *K8SClientMock) GetOAuthClient(ctx context.Context, name string) (*osoauth_v1.OAuthClient, error) {
args := o.Called(ctx, name)
return args.Get(0).(*osoauth_v1.OAuthClient), args.Error(1)
}
func (o *K8SClientMock) GetUser(ctx context.Context, name string) (*osuser_v1.User, error) {
args := o.Called(ctx, name)
return args.Get(0).(*osuser_v1.User), args.Error(1)
}