mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 06:54:01 +00:00
Add a test for verifying compute basepath.
Compute API changes could modify this, we need a test to detect if it happens.
This commit is contained in:
parent
e8760b95bb
commit
816a069d54
@ -178,3 +178,15 @@ func TestEnsureLoadBalancerDeletedDeletesInternalLb(t *testing.T) {
|
||||
assert.NoError(t, err)
|
||||
assertInternalLbResourcesDeleted(t, gce, apiService, vals, true)
|
||||
}
|
||||
|
||||
func TestBasePath(t *testing.T) {
|
||||
t.Parallel()
|
||||
vals := DefaultTestClusterValues()
|
||||
gce, err := fakeGCECloud(vals)
|
||||
// Loadbalancer controller code expects basepath to contain the projects string.
|
||||
expectBasePath := "https://compute.googleapis.com/compute/v1/projects/"
|
||||
require.NoError(t, err)
|
||||
if gce.service.BasePath != expectBasePath {
|
||||
t.Errorf("Compute basePath has changed. Got %q, want %q", gce.service.BasePath, expectBasePath)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user