Fix golint in test/e2e/instrumentation/logging

pull/564/head
danielqsj 2019-02-27 17:15:49 +08:00
parent 873fbf9112
commit 5cf1950ef8
3 changed files with 9 additions and 10 deletions

View File

@ -645,7 +645,6 @@ test/e2e/common
test/e2e/framework
test/e2e/framework/providers/gce
test/e2e/framework/providers/kubemark
test/e2e/instrumentation/logging
test/e2e/lifecycle
test/e2e/lifecycle/bootstrap
test/e2e/network

View File

@ -23,8 +23,8 @@ import (
"sync"
"time"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
"k8s.io/api/core/v1"
"k8s.io/kubernetes/test/e2e/framework"
"k8s.io/kubernetes/test/e2e/framework/config"
@ -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
// 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() {
By(fmt.Sprintf("scaling up to %v pods per node", loggingSoak.Scale))
defer GinkgoRecover()
ginkgo.It(fmt.Sprintf("should survive logging 1KB every %v seconds, for a duration of %v", kbRateInSeconds, totalLogTime), func() {
ginkgo.By(fmt.Sprintf("scaling up to %v pods per node", loggingSoak.Scale))
defer ginkgo.GinkgoRecover()
var wg sync.WaitGroup
wg.Add(loggingSoak.Scale)
for i := 0; i < loggingSoak.Scale; i++ {
go func() {
defer wg.Done()
defer GinkgoRecover()
defer ginkgo.GinkgoRecover()
wave := fmt.Sprintf("wave%v", strconv.Itoa(i))
framework.Logf("Starting logging soak, wave = %v", wave)
RunLogPodsWithSleepOf(f, kbRateInSeconds, wave, totalLogTime)
@ -79,7 +79,7 @@ func RunLogPodsWithSleepOf(f *framework.Framework, sleep time.Duration, podname
nodes := framework.GetReadySchedulableNodesOrDie(f.ClientSet)
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.

View File

@ -17,6 +17,6 @@ limitations under the License.
package logging
import (
_ "k8s.io/kubernetes/test/e2e/instrumentation/logging/elasticsearch"
_ "k8s.io/kubernetes/test/e2e/instrumentation/logging/stackdriver"
_ "k8s.io/kubernetes/test/e2e/instrumentation/logging/elasticsearch" // for elasticsearch provider
_ "k8s.io/kubernetes/test/e2e/instrumentation/logging/stackdriver" // for stackdriver provider
)