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
2522b046
Commit
2522b046
authored
Feb 27, 2018
by
jianglingxia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove val and ok in Storageos
parent
43559fe9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
storageos_util_test.go
pkg/volume/storageos/storageos_util_test.go
+2
-4
No files found.
pkg/volume/storageos/storageos_util_test.go
View file @
2522b046
...
@@ -181,9 +181,9 @@ func TestCreateVolume(t *testing.T) {
...
@@ -181,9 +181,9 @@ func TestCreateVolume(t *testing.T) {
if
len
(
vol
.
Labels
)
==
0
{
if
len
(
vol
.
Labels
)
==
0
{
t
.
Error
(
"CreateVolume() Labels are empty"
)
t
.
Error
(
"CreateVolume() Labels are empty"
)
}
else
{
}
else
{
var
val
string
var
ok
bool
for
k
,
v
:=
range
labels
{
for
k
,
v
:=
range
labels
{
var
val
string
var
ok
bool
if
val
,
ok
=
vol
.
Labels
[
k
];
!
ok
{
if
val
,
ok
=
vol
.
Labels
[
k
];
!
ok
{
t
.
Errorf
(
"CreateVolume() Label %s not set"
,
k
)
t
.
Errorf
(
"CreateVolume() Label %s not set"
,
k
)
}
}
...
@@ -191,8 +191,6 @@ func TestCreateVolume(t *testing.T) {
...
@@ -191,8 +191,6 @@ func TestCreateVolume(t *testing.T) {
t
.
Errorf
(
"CreateVolume() returned unexpected Label value %s"
,
val
)
t
.
Errorf
(
"CreateVolume() returned unexpected Label value %s"
,
val
)
}
}
}
}
var
val
string
var
ok
bool
if
val
,
ok
=
vol
.
Labels
[
"labelfromapi"
];
!
ok
{
if
val
,
ok
=
vol
.
Labels
[
"labelfromapi"
];
!
ok
{
t
.
Error
(
"CreateVolume() Label from api not set"
)
t
.
Error
(
"CreateVolume() Label from api not set"
)
}
}
...
...
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