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
4d578d13
Commit
4d578d13
authored
Jul 17, 2018
by
Jiatong Wang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add error check and ignore unused variable (SA4006)
parent
a74df596
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
vmdm.go
...loudprovider/providers/vsphere/vclib/diskmanagers/vmdm.go
+4
-0
vsphere_test.go
pkg/cloudprovider/providers/vsphere/vsphere_test.go
+1
-1
No files found.
pkg/cloudprovider/providers/vsphere/vclib/diskmanagers/vmdm.go
View file @
4d578d13
...
...
@@ -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
)
...
...
pkg/cloudprovider/providers/vsphere/vsphere_test.go
View file @
4d578d13
...
...
@@ -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
{
...
...
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