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
e0d02f14
Commit
e0d02f14
authored
Jun 28, 2017
by
Guangya Liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Used const variable in scheduler test.
parent
0ce58092
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
generic_scheduler.go
plugin/pkg/scheduler/core/generic_scheduler.go
+1
-1
generic_scheduler_test.go
plugin/pkg/scheduler/core/generic_scheduler_test.go
+1
-1
No files found.
plugin/pkg/scheduler/core/generic_scheduler.go
View file @
e0d02f14
...
@@ -44,7 +44,7 @@ type FitError struct {
...
@@ -44,7 +44,7 @@ type FitError struct {
var
ErrNoNodesAvailable
=
fmt
.
Errorf
(
"no nodes available to schedule pods"
)
var
ErrNoNodesAvailable
=
fmt
.
Errorf
(
"no nodes available to schedule pods"
)
const
NoNodeAvailableMsg
=
"No nodes are available that match all of the following predicates
:
"
const
NoNodeAvailableMsg
=
"No nodes are available that match all of the following predicates"
// Error returns detailed information of why the pod failed to fit on each node
// Error returns detailed information of why the pod failed to fit on each node
func
(
f
*
FitError
)
Error
()
string
{
func
(
f
*
FitError
)
Error
()
string
{
...
...
plugin/pkg/scheduler/core/generic_scheduler_test.go
View file @
e0d02f14
...
@@ -410,7 +410,7 @@ func TestHumanReadableFitError(t *testing.T) {
...
@@ -410,7 +410,7 @@ func TestHumanReadableFitError(t *testing.T) {
"3"
:
[]
algorithm
.
PredicateFailureReason
{
algorithmpredicates
.
ErrNodeUnderDiskPressure
},
"3"
:
[]
algorithm
.
PredicateFailureReason
{
algorithmpredicates
.
ErrNodeUnderDiskPressure
},
},
},
}
}
if
strings
.
Contains
(
error
.
Error
(),
"No nodes are available that match all of the following predicates"
)
{
if
strings
.
Contains
(
error
.
Error
(),
NoNodeAvailableMsg
)
{
if
strings
.
Contains
(
error
.
Error
(),
"NodeUnderDiskPressure (2)"
)
&&
strings
.
Contains
(
error
.
Error
(),
"NodeUnderMemoryPressure (1)"
)
{
if
strings
.
Contains
(
error
.
Error
(),
"NodeUnderDiskPressure (2)"
)
&&
strings
.
Contains
(
error
.
Error
(),
"NodeUnderMemoryPressure (1)"
)
{
return
return
}
}
...
...
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