mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-26 05:03:09 +00:00
Merge pull request #87667 from prameshj/xpn
Allow update of onXPN field in fake GCE clients.
This commit is contained in:
commit
03145880d9
@ -35,6 +35,7 @@ type TestClusterValues struct {
|
|||||||
SecondaryZoneName string
|
SecondaryZoneName string
|
||||||
ClusterID string
|
ClusterID string
|
||||||
ClusterName string
|
ClusterName string
|
||||||
|
OnXPN bool
|
||||||
}
|
}
|
||||||
|
|
||||||
// DefaultTestClusterValues Creates a reasonable set of default cluster values
|
// DefaultTestClusterValues Creates a reasonable set of default cluster values
|
||||||
@ -74,8 +75,14 @@ func NewFakeGCECloud(vals TestClusterValues) *Cloud {
|
|||||||
projectID: vals.ProjectID,
|
projectID: vals.ProjectID,
|
||||||
networkProjectID: vals.ProjectID,
|
networkProjectID: vals.ProjectID,
|
||||||
ClusterID: fakeClusterID(vals.ClusterID),
|
ClusterID: fakeClusterID(vals.ClusterID),
|
||||||
|
onXPN: vals.OnXPN,
|
||||||
}
|
}
|
||||||
c := cloud.NewMockGCE(&gceProjectRouter{gce})
|
c := cloud.NewMockGCE(&gceProjectRouter{gce})
|
||||||
gce.c = c
|
gce.c = c
|
||||||
return gce
|
return gce
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// UpdateFakeGCECloud updates the fake GCE cloud with the specified values. Currently only the onXPN value is updated.
|
||||||
|
func UpdateFakeGCECloud(g *Cloud, vals TestClusterValues) {
|
||||||
|
g.onXPN = vals.OnXPN
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user