-
Notifications
You must be signed in to change notification settings - Fork 51
/
mock.go
87 lines (84 loc) · 3.1 KB
/
mock.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
package api
import (
"github.com/Azure/go-autorest/autorest/to"
)
// GetInternalMockCluster returns mock object of the
// internal API model
func GetInternalMockCluster() *OpenShiftManagedCluster {
// this is the expected internal equivalent to
// v20190430ManagedCluster()
return &OpenShiftManagedCluster{
ID: "ID",
Location: "Location",
Name: "Name",
Plan: &ResourcePurchasePlan{
Name: to.StringPtr("Plan.Name"),
Product: to.StringPtr("Plan.Product"),
PromotionCode: to.StringPtr("Plan.PromotionCode"),
Publisher: to.StringPtr("Plan.Publisher"),
},
Tags: map[string]string{
"Tags.key": "Tags.val",
},
Type: "Type",
Properties: Properties{
ProvisioningState: "Properties.ProvisioningState",
OpenShiftVersion: "Properties.OpenShiftVersion",
ClusterVersion: "Properties.ClusterVersion",
PublicHostname: "Properties.PublicHostname",
RouterProfiles: []RouterProfile{
{
Name: "Properties.RouterProfiles[0].Name",
PublicSubdomain: "Properties.RouterProfiles[0].PublicSubdomain",
FQDN: "Properties.RouterProfiles[0].FQDN",
},
},
FQDN: "Properties.FQDN",
PrivateAPIServer: true,
AuthProfile: AuthProfile{
IdentityProviders: []IdentityProvider{
{
Name: "Properties.AuthProfile.IdentityProviders[0].Name",
Provider: &AADIdentityProvider{
Kind: "AADIdentityProvider",
ClientID: "Properties.AuthProfile.IdentityProviders[0].Provider.ClientID",
Secret: "Properties.AuthProfile.IdentityProviders[0].Provider.Secret",
TenantID: "Properties.AuthProfile.IdentityProviders[0].Provider.TenantID",
CustomerAdminGroupID: to.StringPtr("Properties.AuthProfile.IdentityProviders[0].Provider.CustomerAdminGroupID"),
},
},
},
},
NetworkProfile: NetworkProfile{
VnetID: "Properties.NetworkProfile.VnetID",
VnetCIDR: "Properties.NetworkProfile.VnetCIDR",
ManagementSubnetCIDR: to.StringPtr("Properties.NetworkProfile.ManagementSubnetCIDR"),
PeerVnetID: to.StringPtr("Properties.NetworkProfile.PeerVnetID"),
},
MonitorProfile: MonitorProfile{
Enabled: true,
WorkspaceResourceID: "Properties.MonitorProfile.WorkspaceResourceID",
WorkspaceID: "Properties.MonitorProfile.WorkspaceID",
WorkspaceKey: "Properties.MonitorProfile.WorkspaceKey",
},
AgentPoolProfiles: []AgentPoolProfile{
{
Name: string(AgentPoolProfileRoleMaster),
Count: 1,
VMSize: "Properties.MasterPoolProfile.VMSize",
SubnetCIDR: "Properties.MasterPoolProfile.SubnetCIDR",
OSType: OSTypeLinux,
Role: AgentPoolProfileRoleMaster,
},
{
Name: "Properties.AgentPoolProfiles[0].Name",
Count: 1,
VMSize: "Properties.AgentPoolProfiles[0].VMSize",
SubnetCIDR: "Properties.AgentPoolProfiles[0].SubnetCIDR",
OSType: "Properties.AgentPoolProfiles[0].OSType",
Role: "Properties.AgentPoolProfiles[0].Role",
},
},
},
}
}