Commit 5cf1950e authored by danielqsj's avatar danielqsj

Fix golint in test/e2e/instrumentation/logging

parent 873fbf91
...@@ -645,7 +645,6 @@ test/e2e/common ...@@ -645,7 +645,6 @@ test/e2e/common
test/e2e/framework test/e2e/framework
test/e2e/framework/providers/gce test/e2e/framework/providers/gce
test/e2e/framework/providers/kubemark test/e2e/framework/providers/kubemark
test/e2e/instrumentation/logging
test/e2e/lifecycle test/e2e/lifecycle
test/e2e/lifecycle/bootstrap test/e2e/lifecycle/bootstrap
test/e2e/network test/e2e/network
......
...@@ -23,8 +23,8 @@ import ( ...@@ -23,8 +23,8 @@ import (
"sync" "sync"
"time" "time"
. "github.com/onsi/ginkgo" "github.com/onsi/ginkgo"
. "github.com/onsi/gomega" "github.com/onsi/gomega"
"k8s.io/api/core/v1" "k8s.io/api/core/v1"
"k8s.io/kubernetes/test/e2e/framework" "k8s.io/kubernetes/test/e2e/framework"
"k8s.io/kubernetes/test/e2e/framework/config" "k8s.io/kubernetes/test/e2e/framework/config"
...@@ -51,15 +51,15 @@ var _ = instrumentation.SIGDescribe("Logging soak [Performance] [Slow] [Disrupti ...@@ -51,15 +51,15 @@ var _ = instrumentation.SIGDescribe("Logging soak [Performance] [Slow] [Disrupti
// This can expose problems in your docker configuration (logging), log searching infrastructure, to tune deployments to match high load // This can expose problems in your docker configuration (logging), log searching infrastructure, to tune deployments to match high load
// scenarios. TODO jayunit100 add this to the kube CI in a follow on infra patch. // scenarios. TODO jayunit100 add this to the kube CI in a follow on infra patch.
It(fmt.Sprintf("should survive logging 1KB every %v seconds, for a duration of %v", kbRateInSeconds, totalLogTime), func() { ginkgo.It(fmt.Sprintf("should survive logging 1KB every %v seconds, for a duration of %v", kbRateInSeconds, totalLogTime), func() {
By(fmt.Sprintf("scaling up to %v pods per node", loggingSoak.Scale)) ginkgo.By(fmt.Sprintf("scaling up to %v pods per node", loggingSoak.Scale))
defer GinkgoRecover() defer ginkgo.GinkgoRecover()
var wg sync.WaitGroup var wg sync.WaitGroup
wg.Add(loggingSoak.Scale) wg.Add(loggingSoak.Scale)
for i := 0; i < loggingSoak.Scale; i++ { for i := 0; i < loggingSoak.Scale; i++ {
go func() { go func() {
defer wg.Done() defer wg.Done()
defer GinkgoRecover() defer ginkgo.GinkgoRecover()
wave := fmt.Sprintf("wave%v", strconv.Itoa(i)) wave := fmt.Sprintf("wave%v", strconv.Itoa(i))
framework.Logf("Starting logging soak, wave = %v", wave) framework.Logf("Starting logging soak, wave = %v", wave)
RunLogPodsWithSleepOf(f, kbRateInSeconds, wave, totalLogTime) RunLogPodsWithSleepOf(f, kbRateInSeconds, wave, totalLogTime)
...@@ -79,7 +79,7 @@ func RunLogPodsWithSleepOf(f *framework.Framework, sleep time.Duration, podname ...@@ -79,7 +79,7 @@ func RunLogPodsWithSleepOf(f *framework.Framework, sleep time.Duration, podname
nodes := framework.GetReadySchedulableNodesOrDie(f.ClientSet) nodes := framework.GetReadySchedulableNodesOrDie(f.ClientSet)
totalPods := len(nodes.Items) totalPods := len(nodes.Items)
Expect(totalPods).NotTo(Equal(0)) gomega.Expect(totalPods).NotTo(gomega.Equal(0))
kilobyte := strings.Repeat("logs-123", 128) // 8*128=1024 = 1KB of text. kilobyte := strings.Repeat("logs-123", 128) // 8*128=1024 = 1KB of text.
......
...@@ -17,6 +17,6 @@ limitations under the License. ...@@ -17,6 +17,6 @@ limitations under the License.
package logging package logging
import ( import (
_ "k8s.io/kubernetes/test/e2e/instrumentation/logging/elasticsearch" _ "k8s.io/kubernetes/test/e2e/instrumentation/logging/elasticsearch" // for elasticsearch provider
_ "k8s.io/kubernetes/test/e2e/instrumentation/logging/stackdriver" _ "k8s.io/kubernetes/test/e2e/instrumentation/logging/stackdriver" // for stackdriver provider
) )
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment