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
948d3814
Commit
948d3814
authored
Feb 01, 2018
by
Divyen Patel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing node labels for random tests invocation
addressed Michelle Au's review comments
parent
89cbdc0d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
9 deletions
+15
-9
vsphere_volume_diskformat.go
test/e2e/storage/vsphere/vsphere_volume_diskformat.go
+6
-3
vsphere_volume_placement.go
test/e2e/storage/vsphere/vsphere_volume_placement.go
+9
-6
No files found.
test/e2e/storage/vsphere/vsphere_volume_diskformat.go
View file @
948d3814
...
@@ -52,6 +52,9 @@ import (
...
@@ -52,6 +52,9 @@ import (
var
_
=
utils
.
SIGDescribe
(
"Volume Disk Format [Feature:vsphere]"
,
func
()
{
var
_
=
utils
.
SIGDescribe
(
"Volume Disk Format [Feature:vsphere]"
,
func
()
{
f
:=
framework
.
NewDefaultFramework
(
"volume-disk-format"
)
f
:=
framework
.
NewDefaultFramework
(
"volume-disk-format"
)
const
(
NodeLabelKey
=
"vsphere_e2e_label_volume_diskformat"
)
var
(
var
(
client
clientset
.
Interface
client
clientset
.
Interface
namespace
string
namespace
string
...
@@ -73,15 +76,15 @@ var _ = utils.SIGDescribe("Volume Disk Format [Feature:vsphere]", func() {
...
@@ -73,15 +76,15 @@ var _ = utils.SIGDescribe("Volume Disk Format [Feature:vsphere]", func() {
if
!
isNodeLabeled
{
if
!
isNodeLabeled
{
nodeLabelValue
=
"vsphere_e2e_"
+
string
(
uuid
.
NewUUID
())
nodeLabelValue
=
"vsphere_e2e_"
+
string
(
uuid
.
NewUUID
())
nodeKeyValueLabel
=
make
(
map
[
string
]
string
)
nodeKeyValueLabel
=
make
(
map
[
string
]
string
)
nodeKeyValueLabel
[
"vsphere_e2e_label"
]
=
nodeLabelValue
nodeKeyValueLabel
[
NodeLabelKey
]
=
nodeLabelValue
framework
.
AddOrUpdateLabelOnNode
(
client
,
nodeName
,
"vsphere_e2e_label"
,
nodeLabelValue
)
framework
.
AddOrUpdateLabelOnNode
(
client
,
nodeName
,
NodeLabelKey
,
nodeLabelValue
)
isNodeLabeled
=
true
isNodeLabeled
=
true
}
}
})
})
framework
.
AddCleanupAction
(
func
()
{
framework
.
AddCleanupAction
(
func
()
{
// Cleanup actions will be called even when the tests are skipped and leaves namespace unset.
// Cleanup actions will be called even when the tests are skipped and leaves namespace unset.
if
len
(
namespace
)
>
0
&&
len
(
nodeLabelValue
)
>
0
{
if
len
(
namespace
)
>
0
&&
len
(
nodeLabelValue
)
>
0
{
framework
.
RemoveLabelOffNode
(
client
,
nodeName
,
"vsphere_e2e_label"
)
framework
.
RemoveLabelOffNode
(
client
,
nodeName
,
NodeLabelKey
)
}
}
})
})
...
...
test/e2e/storage/vsphere/vsphere_volume_placement.go
View file @
948d3814
...
@@ -35,6 +35,9 @@ import (
...
@@ -35,6 +35,9 @@ import (
var
_
=
utils
.
SIGDescribe
(
"Volume Placement"
,
func
()
{
var
_
=
utils
.
SIGDescribe
(
"Volume Placement"
,
func
()
{
f
:=
framework
.
NewDefaultFramework
(
"volume-placement"
)
f
:=
framework
.
NewDefaultFramework
(
"volume-placement"
)
const
(
NodeLabelKey
=
"vsphere_e2e_label_volume_placement"
)
var
(
var
(
c
clientset
.
Interface
c
clientset
.
Interface
ns
string
ns
string
...
@@ -80,10 +83,10 @@ var _ = utils.SIGDescribe("Volume Placement", func() {
...
@@ -80,10 +83,10 @@ var _ = utils.SIGDescribe("Volume Placement", func() {
// Cleanup actions will be called even when the tests are skipped and leaves namespace unset.
// Cleanup actions will be called even when the tests are skipped and leaves namespace unset.
if
len
(
ns
)
>
0
{
if
len
(
ns
)
>
0
{
if
len
(
node1KeyValueLabel
)
>
0
{
if
len
(
node1KeyValueLabel
)
>
0
{
framework
.
RemoveLabelOffNode
(
c
,
node1Name
,
"vsphere_e2e_label"
)
framework
.
RemoveLabelOffNode
(
c
,
node1Name
,
NodeLabelKey
)
}
}
if
len
(
node2KeyValueLabel
)
>
0
{
if
len
(
node2KeyValueLabel
)
>
0
{
framework
.
RemoveLabelOffNode
(
c
,
node2Name
,
"vsphere_e2e_label"
)
framework
.
RemoveLabelOffNode
(
c
,
node2Name
,
NodeLabelKey
)
}
}
}
}
})
})
...
@@ -339,13 +342,13 @@ func testSetupVolumePlacement(client clientset.Interface, namespace string) (nod
...
@@ -339,13 +342,13 @@ func testSetupVolumePlacement(client clientset.Interface, namespace string) (nod
node2Name
=
nodes
.
Items
[
1
]
.
Name
node2Name
=
nodes
.
Items
[
1
]
.
Name
node1LabelValue
:=
"vsphere_e2e_"
+
string
(
uuid
.
NewUUID
())
node1LabelValue
:=
"vsphere_e2e_"
+
string
(
uuid
.
NewUUID
())
node1KeyValueLabel
=
make
(
map
[
string
]
string
)
node1KeyValueLabel
=
make
(
map
[
string
]
string
)
node1KeyValueLabel
[
"vsphere_e2e_label"
]
=
node1LabelValue
node1KeyValueLabel
[
NodeLabelKey
]
=
node1LabelValue
framework
.
AddOrUpdateLabelOnNode
(
client
,
node1Name
,
"vsphere_e2e_label"
,
node1LabelValue
)
framework
.
AddOrUpdateLabelOnNode
(
client
,
node1Name
,
NodeLabelKey
,
node1LabelValue
)
node2LabelValue
:=
"vsphere_e2e_"
+
string
(
uuid
.
NewUUID
())
node2LabelValue
:=
"vsphere_e2e_"
+
string
(
uuid
.
NewUUID
())
node2KeyValueLabel
=
make
(
map
[
string
]
string
)
node2KeyValueLabel
=
make
(
map
[
string
]
string
)
node2KeyValueLabel
[
"vsphere_e2e_label"
]
=
node2LabelValue
node2KeyValueLabel
[
NodeLabelKey
]
=
node2LabelValue
framework
.
AddOrUpdateLabelOnNode
(
client
,
node2Name
,
"vsphere_e2e_label"
,
node2LabelValue
)
framework
.
AddOrUpdateLabelOnNode
(
client
,
node2Name
,
NodeLabelKey
,
node2LabelValue
)
return
node1Name
,
node1KeyValueLabel
,
node2Name
,
node2KeyValueLabel
return
node1Name
,
node1KeyValueLabel
,
node2Name
,
node2KeyValueLabel
}
}
...
...
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