mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Add error check and ignore unused variable (SA4006)
This commit is contained in:
parent
a74df596ab
commit
4d578d1389
@ -127,6 +127,10 @@ func (vmdisk vmDiskManager) Create(ctx context.Context, datastore *vclib.Datasto
|
||||
virtualMachineConfigSpec.DeviceChange = append(virtualMachineConfigSpec.DeviceChange, deviceConfigSpec)
|
||||
fileAlreadyExist := false
|
||||
task, err := dummyVM.Reconfigure(ctx, virtualMachineConfigSpec)
|
||||
if err != nil {
|
||||
glog.Errorf("Failed to reconfig. err: %v", err)
|
||||
return "", err
|
||||
}
|
||||
err = task.Wait(ctx)
|
||||
if err != nil {
|
||||
fileAlreadyExist = isAlreadyExists(vmdisk.diskPath, err)
|
||||
|
@ -357,7 +357,7 @@ func TestInstances(t *testing.T) {
|
||||
}
|
||||
t.Logf("Found InstanceID(%s) = %s\n", nodeName, 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 {
|
||||
|
Loading…
Reference in New Issue
Block a user