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
7d6b7210
Commit
7d6b7210
authored
Feb 11, 2018
by
hangaoshuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove unused function printIndentedJson and printAllPods in test/integration/scheduler
parent
2172a2a8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
23 deletions
+0
-23
local-pv-neg-affinity_test.go
test/integration/scheduler/local-pv-neg-affinity_test.go
+0
-11
util.go
test/integration/scheduler/util.go
+0
-12
No files found.
test/integration/scheduler/local-pv-neg-affinity_test.go
View file @
7d6b7210
...
...
@@ -19,7 +19,6 @@ package scheduler
// This file tests the VolumeScheduling feature.
import
(
"encoding/json"
"fmt"
"net/http"
"net/http/httptest"
...
...
@@ -311,13 +310,3 @@ func markNodeSelector(pod *v1.Pod, node string) {
}
pod
.
Spec
.
NodeSelector
=
ns
}
func
printIndentedJson
(
data
interface
{})
string
{
var
indentedJSON
[]
byte
indentedJSON
,
err
:=
json
.
MarshalIndent
(
data
,
""
,
"
\t
"
)
if
err
!=
nil
{
return
fmt
.
Sprintf
(
"JSON parse error: %v"
,
err
)
}
return
string
(
indentedJSON
)
}
test/integration/scheduler/util.go
View file @
7d6b7210
...
...
@@ -381,15 +381,3 @@ func cleanupPods(cs clientset.Interface, t *testing.T, pods []*v1.Pod) {
}
}
}
// printAllPods prints a list of all the pods and their node names. This is used
// for debugging.
func
printAllPods
(
t
*
testing
.
T
,
cs
clientset
.
Interface
,
nsName
string
)
{
podList
,
err
:=
cs
.
CoreV1
()
.
Pods
(
nsName
)
.
List
(
metav1
.
ListOptions
{})
if
err
!=
nil
{
t
.
Logf
(
"Error getting pods: %v"
,
err
)
}
for
_
,
pod
:=
range
podList
.
Items
{
t
.
Logf
(
"Pod:
\n\t
Name:%v
\n\t
Namespace:%v
\n\t
Node Name:%v
\n
"
,
pod
.
Name
,
pod
.
Namespace
,
pod
.
Spec
.
NodeName
)
}
}
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