Skip to content

Commit 124efde

Browse files
committed
fix golint error in e2e/node
1 parent 73c2dae commit 124efde

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

hack/.golint_failures

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -606,7 +606,6 @@ test/e2e/chaosmonkey
606606
test/e2e/common
607607
test/e2e/framework
608608
test/e2e/lifecycle/bootstrap
609-
test/e2e/node
610609
test/e2e/scalability
611610
test/e2e/scheduling
612611
test/e2e/storage/drivers

test/e2e/node/events.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,18 +85,18 @@ var _ = SIGDescribe("Events", func() {
8585
gomega.Expect(len(pods.Items)).To(gomega.Equal(1))
8686

8787
ginkgo.By("retrieving the pod")
88-
podWithUid, err := podClient.Get(pod.Name, metav1.GetOptions{})
88+
podWithUID, err := podClient.Get(pod.Name, metav1.GetOptions{})
8989
if err != nil {
9090
framework.Failf("Failed to get pod: %v", err)
9191
}
92-
e2elog.Logf("%+v\n", podWithUid)
92+
e2elog.Logf("%+v\n", podWithUID)
9393
var events *v1.EventList
9494
// Check for scheduler event about the pod.
9595
ginkgo.By("checking for scheduler event about the pod")
9696
framework.ExpectNoError(wait.Poll(time.Second*2, time.Second*60, func() (bool, error) {
9797
selector := fields.Set{
9898
"involvedObject.kind": "Pod",
99-
"involvedObject.uid": string(podWithUid.UID),
99+
"involvedObject.uid": string(podWithUID.UID),
100100
"involvedObject.namespace": f.Namespace.Name,
101101
"source": v1.DefaultSchedulerName,
102102
}.AsSelector().String()
@@ -115,7 +115,7 @@ var _ = SIGDescribe("Events", func() {
115115
ginkgo.By("checking for kubelet event about the pod")
116116
framework.ExpectNoError(wait.Poll(time.Second*2, time.Second*60, func() (bool, error) {
117117
selector := fields.Set{
118-
"involvedObject.uid": string(podWithUid.UID),
118+
"involvedObject.uid": string(podWithUID.UID),
119119
"involvedObject.kind": "Pod",
120120
"involvedObject.namespace": f.Namespace.Name,
121121
"source": "kubelet",

test/e2e/node/framework.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package node
1818

1919
import "k8s.io/kubernetes/test/e2e/framework"
2020

21+
// SIGDescribe annotates the test with the SIG label.
2122
func SIGDescribe(text string, body func()) bool {
2223
return framework.KubeDescribe("[sig-node] "+text, body)
2324
}

test/e2e/node/node_problem_detector.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ var _ = SIGDescribe("NodeProblemDetector [DisabledForLargeClusters]", func() {
102102
gomega.Expect(result.Stdout).NotTo(gomega.ContainSubstring("node-problem-detector.service: Failed"))
103103

104104
if isStandaloneMode[host] {
105-
cpuUsage, uptime := getCpuStat(f, host)
105+
cpuUsage, uptime := getCPUStat(f, host)
106106
cpuUsageStats[host] = append(cpuUsageStats[host], cpuUsage)
107107
uptimeStats[host] = append(uptimeStats[host], uptime)
108108
}
@@ -138,7 +138,7 @@ var _ = SIGDescribe("NodeProblemDetector [DisabledForLargeClusters]", func() {
138138
rssStats[host] = append(rssStats[host], rss)
139139
workingSetStats[host] = append(workingSetStats[host], workingSet)
140140
if i == numIterations {
141-
cpuUsage, uptime := getCpuStat(f, host)
141+
cpuUsage, uptime := getCPUStat(f, host)
142142
cpuUsageStats[host] = append(cpuUsageStats[host], cpuUsage)
143143
uptimeStats[host] = append(uptimeStats[host], uptime)
144144
}
@@ -249,7 +249,7 @@ func getMemoryStat(f *framework.Framework, host string) (rss, workingSet float64
249249
return
250250
}
251251

252-
func getCpuStat(f *framework.Framework, host string) (usage, uptime float64) {
252+
func getCPUStat(f *framework.Framework, host string) (usage, uptime float64) {
253253
cpuCmd := "cat /sys/fs/cgroup/cpu/system.slice/node-problem-detector.service/cpuacct.usage && cat /proc/uptime | awk '{print $1}'"
254254
result, err := e2essh.SSH(cpuCmd, host, framework.TestContext.Provider)
255255
framework.ExpectNoError(err)

test/e2e/node/pre_stop.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import (
3636
"github.com/onsi/gomega"
3737
)
3838

39-
// partially cloned from webserver.go
39+
// State partially cloned from webserver.go
4040
type State struct {
4141
Received map[string]int
4242
}

0 commit comments

Comments
 (0)