From 3676a08690a00dc88a0750c0210eedc519176f4e Mon Sep 17 00:00:00 2001 From: tanshanshan Date: Wed, 18 Jul 2018 09:37:56 +0800 Subject: [PATCH] clean unused variable --- pkg/cloudprovider/providers/openstack/openstack_routes_test.go | 3 +++ pkg/cloudprovider/providers/photon/photon_test.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/cloudprovider/providers/openstack/openstack_routes_test.go b/pkg/cloudprovider/providers/openstack/openstack_routes_test.go index b38d7ffc257..8e47023f3bb 100644 --- a/pkg/cloudprovider/providers/openstack/openstack_routes_test.go +++ b/pkg/cloudprovider/providers/openstack/openstack_routes_test.go @@ -87,6 +87,9 @@ func TestRoutes(t *testing.T) { func getServers(os *OpenStack) []servers.Server { c, err := os.NewComputeV2() + if err != nil { + panic(err) + } allPages, err := servers.List(c, servers.ListOpts{}).AllPages() if err != nil { panic(err) diff --git a/pkg/cloudprovider/providers/photon/photon_test.go b/pkg/cloudprovider/providers/photon/photon_test.go index f798f1cc216..f8c9ad2ddcf 100644 --- a/pkg/cloudprovider/providers/photon/photon_test.go +++ b/pkg/cloudprovider/providers/photon/photon_test.go @@ -140,7 +140,7 @@ func TestInstances(t *testing.T) { } t.Logf("Found InstanceID(%s) = %s\n", testVM, instanceId) - instanceId, err = i.InstanceID(context.TODO(), nonExistingVM) + _, err = i.InstanceID(context.TODO(), nonExistingVM) if err == cloudprovider.InstanceNotFound { t.Logf("VM %s was not found as expected\n", nonExistingVM) } else if err == nil {