Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
35fee757
Commit
35fee757
authored
Jun 21, 2018
by
Minhan Xia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fix for cloud provider generator
parent
232ebadc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
30 deletions
+30
-30
main.go
pkg/cloudprovider/providers/gce/cloud/gen/main.go
+2
-2
gen_test.go
pkg/cloudprovider/providers/gce/cloud/gen_test.go
+28
-28
No files found.
pkg/cloudprovider/providers/gce/cloud/gen/main.go
View file @
35fee757
...
@@ -1207,7 +1207,7 @@ func Test{{.Service}}Group(t *testing.T) {
...
@@ -1207,7 +1207,7 @@ func Test{{.Service}}Group(t *testing.T) {
got[obj.Name] = true
got[obj.Name] = true
}
}
if !reflect.DeepEqual(got, want) {
if !reflect.DeepEqual(got, want) {
t.Errorf("
Alph
a{{.Service}}().List(); got %+v, want %+v", got, want)
t.Errorf("
Bet
a{{.Service}}().List(); got %+v, want %+v", got, want)
}
}
}
}
}
}
...
@@ -1227,7 +1227,7 @@ func Test{{.Service}}Group(t *testing.T) {
...
@@ -1227,7 +1227,7 @@ func Test{{.Service}}Group(t *testing.T) {
got[obj.Name] = true
got[obj.Name] = true
}
}
if !reflect.DeepEqual(got, want) {
if !reflect.DeepEqual(got, want) {
t.Errorf("
Alpha
{{.Service}}().List(); got %+v, want %+v", got, want)
t.Errorf("{{.Service}}().List(); got %+v, want %+v", got, want)
}
}
}
}
}
}
...
...
pkg/cloudprovider/providers/gce/cloud/gen_test.go
View file @
35fee757
...
@@ -127,7 +127,7 @@ func TestAddressesGroup(t *testing.T) {
...
@@ -127,7 +127,7 @@ func TestAddressesGroup(t *testing.T) {
got
[
obj
.
Name
]
=
true
got
[
obj
.
Name
]
=
true
}
}
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
t
.
Errorf
(
"
Alph
aAddresses().List(); got %+v, want %+v"
,
got
,
want
)
t
.
Errorf
(
"
Bet
aAddresses().List(); got %+v, want %+v"
,
got
,
want
)
}
}
}
}
}
}
...
@@ -141,7 +141,7 @@ func TestAddressesGroup(t *testing.T) {
...
@@ -141,7 +141,7 @@ func TestAddressesGroup(t *testing.T) {
got
[
obj
.
Name
]
=
true
got
[
obj
.
Name
]
=
true
}
}
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
t
.
Errorf
(
"A
lphaA
ddresses().List(); got %+v, want %+v"
,
got
,
want
)
t
.
Errorf
(
"Addresses().List(); got %+v, want %+v"
,
got
,
want
)
}
}
}
}
}
}
...
@@ -262,7 +262,7 @@ func TestBackendServicesGroup(t *testing.T) {
...
@@ -262,7 +262,7 @@ func TestBackendServicesGroup(t *testing.T) {
got
[
obj
.
Name
]
=
true
got
[
obj
.
Name
]
=
true
}
}
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
t
.
Errorf
(
"
Alph
aBackendServices().List(); got %+v, want %+v"
,
got
,
want
)
t
.
Errorf
(
"
Bet
aBackendServices().List(); got %+v, want %+v"
,
got
,
want
)
}
}
}
}
}
}
...
@@ -276,7 +276,7 @@ func TestBackendServicesGroup(t *testing.T) {
...
@@ -276,7 +276,7 @@ func TestBackendServicesGroup(t *testing.T) {
got
[
obj
.
Name
]
=
true
got
[
obj
.
Name
]
=
true
}
}
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
t
.
Errorf
(
"
Alpha
BackendServices().List(); got %+v, want %+v"
,
got
,
want
)
t
.
Errorf
(
"BackendServices().List(); got %+v, want %+v"
,
got
,
want
)
}
}
}
}
}
}
...
@@ -351,7 +351,7 @@ func TestDisksGroup(t *testing.T) {
...
@@ -351,7 +351,7 @@ func TestDisksGroup(t *testing.T) {
got
[
obj
.
Name
]
=
true
got
[
obj
.
Name
]
=
true
}
}
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
t
.
Errorf
(
"
Alpha
Disks().List(); got %+v, want %+v"
,
got
,
want
)
t
.
Errorf
(
"Disks().List(); got %+v, want %+v"
,
got
,
want
)
}
}
}
}
}
}
...
@@ -414,7 +414,7 @@ func TestFirewallsGroup(t *testing.T) {
...
@@ -414,7 +414,7 @@ func TestFirewallsGroup(t *testing.T) {
got
[
obj
.
Name
]
=
true
got
[
obj
.
Name
]
=
true
}
}
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
t
.
Errorf
(
"
Alpha
Firewalls().List(); got %+v, want %+v"
,
got
,
want
)
t
.
Errorf
(
"Firewalls().List(); got %+v, want %+v"
,
got
,
want
)
}
}
}
}
}
}
...
@@ -507,7 +507,7 @@ func TestForwardingRulesGroup(t *testing.T) {
...
@@ -507,7 +507,7 @@ func TestForwardingRulesGroup(t *testing.T) {
got
[
obj
.
Name
]
=
true
got
[
obj
.
Name
]
=
true
}
}
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
t
.
Errorf
(
"
Alpha
ForwardingRules().List(); got %+v, want %+v"
,
got
,
want
)
t
.
Errorf
(
"ForwardingRules().List(); got %+v, want %+v"
,
got
,
want
)
}
}
}
}
}
}
...
@@ -576,7 +576,7 @@ func TestGlobalAddressesGroup(t *testing.T) {
...
@@ -576,7 +576,7 @@ func TestGlobalAddressesGroup(t *testing.T) {
got
[
obj
.
Name
]
=
true
got
[
obj
.
Name
]
=
true
}
}
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
t
.
Errorf
(
"
Alpha
GlobalAddresses().List(); got %+v, want %+v"
,
got
,
want
)
t
.
Errorf
(
"GlobalAddresses().List(); got %+v, want %+v"
,
got
,
want
)
}
}
}
}
}
}
...
@@ -639,7 +639,7 @@ func TestGlobalForwardingRulesGroup(t *testing.T) {
...
@@ -639,7 +639,7 @@ func TestGlobalForwardingRulesGroup(t *testing.T) {
got
[
obj
.
Name
]
=
true
got
[
obj
.
Name
]
=
true
}
}
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
t
.
Errorf
(
"
Alpha
GlobalForwardingRules().List(); got %+v, want %+v"
,
got
,
want
)
t
.
Errorf
(
"GlobalForwardingRules().List(); got %+v, want %+v"
,
got
,
want
)
}
}
}
}
}
}
...
@@ -748,7 +748,7 @@ func TestHealthChecksGroup(t *testing.T) {
...
@@ -748,7 +748,7 @@ func TestHealthChecksGroup(t *testing.T) {
got
[
obj
.
Name
]
=
true
got
[
obj
.
Name
]
=
true
}
}
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
t
.
Errorf
(
"
Alph
aHealthChecks().List(); got %+v, want %+v"
,
got
,
want
)
t
.
Errorf
(
"
Bet
aHealthChecks().List(); got %+v, want %+v"
,
got
,
want
)
}
}
}
}
}
}
...
@@ -762,7 +762,7 @@ func TestHealthChecksGroup(t *testing.T) {
...
@@ -762,7 +762,7 @@ func TestHealthChecksGroup(t *testing.T) {
got
[
obj
.
Name
]
=
true
got
[
obj
.
Name
]
=
true
}
}
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
t
.
Errorf
(
"
Alpha
HealthChecks().List(); got %+v, want %+v"
,
got
,
want
)
t
.
Errorf
(
"HealthChecks().List(); got %+v, want %+v"
,
got
,
want
)
}
}
}
}
}
}
...
@@ -837,7 +837,7 @@ func TestHttpHealthChecksGroup(t *testing.T) {
...
@@ -837,7 +837,7 @@ func TestHttpHealthChecksGroup(t *testing.T) {
got
[
obj
.
Name
]
=
true
got
[
obj
.
Name
]
=
true
}
}
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
t
.
Errorf
(
"
Alpha
HttpHealthChecks().List(); got %+v, want %+v"
,
got
,
want
)
t
.
Errorf
(
"HttpHealthChecks().List(); got %+v, want %+v"
,
got
,
want
)
}
}
}
}
}
}
...
@@ -900,7 +900,7 @@ func TestHttpsHealthChecksGroup(t *testing.T) {
...
@@ -900,7 +900,7 @@ func TestHttpsHealthChecksGroup(t *testing.T) {
got
[
obj
.
Name
]
=
true
got
[
obj
.
Name
]
=
true
}
}
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
t
.
Errorf
(
"
Alpha
HttpsHealthChecks().List(); got %+v, want %+v"
,
got
,
want
)
t
.
Errorf
(
"HttpsHealthChecks().List(); got %+v, want %+v"
,
got
,
want
)
}
}
}
}
}
}
...
@@ -963,7 +963,7 @@ func TestInstanceGroupsGroup(t *testing.T) {
...
@@ -963,7 +963,7 @@ func TestInstanceGroupsGroup(t *testing.T) {
got
[
obj
.
Name
]
=
true
got
[
obj
.
Name
]
=
true
}
}
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
t
.
Errorf
(
"
Alpha
InstanceGroups().List(); got %+v, want %+v"
,
got
,
want
)
t
.
Errorf
(
"InstanceGroups().List(); got %+v, want %+v"
,
got
,
want
)
}
}
}
}
}
}
...
@@ -1072,7 +1072,7 @@ func TestInstancesGroup(t *testing.T) {
...
@@ -1072,7 +1072,7 @@ func TestInstancesGroup(t *testing.T) {
got
[
obj
.
Name
]
=
true
got
[
obj
.
Name
]
=
true
}
}
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
t
.
Errorf
(
"
Alph
aInstances().List(); got %+v, want %+v"
,
got
,
want
)
t
.
Errorf
(
"
Bet
aInstances().List(); got %+v, want %+v"
,
got
,
want
)
}
}
}
}
}
}
...
@@ -1086,7 +1086,7 @@ func TestInstancesGroup(t *testing.T) {
...
@@ -1086,7 +1086,7 @@ func TestInstancesGroup(t *testing.T) {
got
[
obj
.
Name
]
=
true
got
[
obj
.
Name
]
=
true
}
}
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
t
.
Errorf
(
"
Alpha
Instances().List(); got %+v, want %+v"
,
got
,
want
)
t
.
Errorf
(
"Instances().List(); got %+v, want %+v"
,
got
,
want
)
}
}
}
}
}
}
...
@@ -1191,7 +1191,7 @@ func TestNetworkEndpointGroupsGroup(t *testing.T) {
...
@@ -1191,7 +1191,7 @@ func TestNetworkEndpointGroupsGroup(t *testing.T) {
got
[
obj
.
Name
]
=
true
got
[
obj
.
Name
]
=
true
}
}
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
t
.
Errorf
(
"
Alph
aNetworkEndpointGroups().List(); got %+v, want %+v"
,
got
,
want
)
t
.
Errorf
(
"
Bet
aNetworkEndpointGroups().List(); got %+v, want %+v"
,
got
,
want
)
}
}
}
}
}
}
...
@@ -1321,7 +1321,7 @@ func TestRegionBackendServicesGroup(t *testing.T) {
...
@@ -1321,7 +1321,7 @@ func TestRegionBackendServicesGroup(t *testing.T) {
got
[
obj
.
Name
]
=
true
got
[
obj
.
Name
]
=
true
}
}
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
t
.
Errorf
(
"
Alpha
RegionBackendServices().List(); got %+v, want %+v"
,
got
,
want
)
t
.
Errorf
(
"RegionBackendServices().List(); got %+v, want %+v"
,
got
,
want
)
}
}
}
}
}
}
...
@@ -1390,7 +1390,7 @@ func TestRegionDisksGroup(t *testing.T) {
...
@@ -1390,7 +1390,7 @@ func TestRegionDisksGroup(t *testing.T) {
got
[
obj
.
Name
]
=
true
got
[
obj
.
Name
]
=
true
}
}
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
t
.
Errorf
(
"
Alph
aRegionDisks().List(); got %+v, want %+v"
,
got
,
want
)
t
.
Errorf
(
"
Bet
aRegionDisks().List(); got %+v, want %+v"
,
got
,
want
)
}
}
}
}
}
}
...
@@ -1444,7 +1444,7 @@ func TestRegionsGroup(t *testing.T) {
...
@@ -1444,7 +1444,7 @@ func TestRegionsGroup(t *testing.T) {
got
[
obj
.
Name
]
=
true
got
[
obj
.
Name
]
=
true
}
}
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
t
.
Errorf
(
"
Alpha
Regions().List(); got %+v, want %+v"
,
got
,
want
)
t
.
Errorf
(
"Regions().List(); got %+v, want %+v"
,
got
,
want
)
}
}
}
}
}
}
...
@@ -1501,7 +1501,7 @@ func TestRoutesGroup(t *testing.T) {
...
@@ -1501,7 +1501,7 @@ func TestRoutesGroup(t *testing.T) {
got
[
obj
.
Name
]
=
true
got
[
obj
.
Name
]
=
true
}
}
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
t
.
Errorf
(
"
Alpha
Routes().List(); got %+v, want %+v"
,
got
,
want
)
t
.
Errorf
(
"Routes().List(); got %+v, want %+v"
,
got
,
want
)
}
}
}
}
}
}
...
@@ -1564,7 +1564,7 @@ func TestSecurityPoliciesGroup(t *testing.T) {
...
@@ -1564,7 +1564,7 @@ func TestSecurityPoliciesGroup(t *testing.T) {
got
[
obj
.
Name
]
=
true
got
[
obj
.
Name
]
=
true
}
}
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
t
.
Errorf
(
"
Alph
aSecurityPolicies().List(); got %+v, want %+v"
,
got
,
want
)
t
.
Errorf
(
"
Bet
aSecurityPolicies().List(); got %+v, want %+v"
,
got
,
want
)
}
}
}
}
}
}
...
@@ -1627,7 +1627,7 @@ func TestSslCertificatesGroup(t *testing.T) {
...
@@ -1627,7 +1627,7 @@ func TestSslCertificatesGroup(t *testing.T) {
got
[
obj
.
Name
]
=
true
got
[
obj
.
Name
]
=
true
}
}
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
t
.
Errorf
(
"
Alpha
SslCertificates().List(); got %+v, want %+v"
,
got
,
want
)
t
.
Errorf
(
"SslCertificates().List(); got %+v, want %+v"
,
got
,
want
)
}
}
}
}
}
}
...
@@ -1690,7 +1690,7 @@ func TestTargetHttpProxiesGroup(t *testing.T) {
...
@@ -1690,7 +1690,7 @@ func TestTargetHttpProxiesGroup(t *testing.T) {
got
[
obj
.
Name
]
=
true
got
[
obj
.
Name
]
=
true
}
}
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
t
.
Errorf
(
"
Alpha
TargetHttpProxies().List(); got %+v, want %+v"
,
got
,
want
)
t
.
Errorf
(
"TargetHttpProxies().List(); got %+v, want %+v"
,
got
,
want
)
}
}
}
}
}
}
...
@@ -1753,7 +1753,7 @@ func TestTargetHttpsProxiesGroup(t *testing.T) {
...
@@ -1753,7 +1753,7 @@ func TestTargetHttpsProxiesGroup(t *testing.T) {
got
[
obj
.
Name
]
=
true
got
[
obj
.
Name
]
=
true
}
}
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
t
.
Errorf
(
"
Alpha
TargetHttpsProxies().List(); got %+v, want %+v"
,
got
,
want
)
t
.
Errorf
(
"TargetHttpsProxies().List(); got %+v, want %+v"
,
got
,
want
)
}
}
}
}
}
}
...
@@ -1816,7 +1816,7 @@ func TestTargetPoolsGroup(t *testing.T) {
...
@@ -1816,7 +1816,7 @@ func TestTargetPoolsGroup(t *testing.T) {
got
[
obj
.
Name
]
=
true
got
[
obj
.
Name
]
=
true
}
}
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
t
.
Errorf
(
"
Alpha
TargetPools().List(); got %+v, want %+v"
,
got
,
want
)
t
.
Errorf
(
"TargetPools().List(); got %+v, want %+v"
,
got
,
want
)
}
}
}
}
}
}
...
@@ -1879,7 +1879,7 @@ func TestUrlMapsGroup(t *testing.T) {
...
@@ -1879,7 +1879,7 @@ func TestUrlMapsGroup(t *testing.T) {
got
[
obj
.
Name
]
=
true
got
[
obj
.
Name
]
=
true
}
}
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
t
.
Errorf
(
"
Alpha
UrlMaps().List(); got %+v, want %+v"
,
got
,
want
)
t
.
Errorf
(
"UrlMaps().List(); got %+v, want %+v"
,
got
,
want
)
}
}
}
}
}
}
...
@@ -1933,7 +1933,7 @@ func TestZonesGroup(t *testing.T) {
...
@@ -1933,7 +1933,7 @@ func TestZonesGroup(t *testing.T) {
got
[
obj
.
Name
]
=
true
got
[
obj
.
Name
]
=
true
}
}
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
if
!
reflect
.
DeepEqual
(
got
,
want
)
{
t
.
Errorf
(
"
Alpha
Zones().List(); got %+v, want %+v"
,
got
,
want
)
t
.
Errorf
(
"Zones().List(); got %+v, want %+v"
,
got
,
want
)
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment