Merge pull request #53033 from oomichi/golint

Automatic merge from submit-queue (batch tested with PRs 58216, 58193, 53033, 58219, 55921). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

Fix golint errors on test/e2e/e2e.go

**What this PR does / why we need it**:

When running golint on test/e2e/e2e.go, the following erros
were faced:

 $ golint e2e.go
 e2e.go:329:2: var metricsJson should be metricsJSON
 e2e.go:342:1: comment on exported function RunE2ETests should be of the form "RunE2ETests ..."

This PR fixes them.

**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #

`NONE`

**Special notes for your reviewer**:

`NONE`

**Release note**:

`NONE`
This commit is contained in:
Kubernetes Submit Queue 2018-01-13 03:34:52 -08:00 committed by GitHub
commit f42dd346b9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -288,20 +288,20 @@ func gatherTestSuiteMetrics() error {
}
metricsForE2E := (*framework.MetricsForE2E)(&received)
metricsJson := metricsForE2E.PrintJSON()
metricsJSON := metricsForE2E.PrintJSON()
if framework.TestContext.ReportDir != "" {
filePath := path.Join(framework.TestContext.ReportDir, "MetricsForE2ESuite_"+time.Now().Format(time.RFC3339)+".json")
if err := ioutil.WriteFile(filePath, []byte(metricsJson), 0644); err != nil {
if err := ioutil.WriteFile(filePath, []byte(metricsJSON), 0644); err != nil {
return fmt.Errorf("error writing to %q: %v", filePath, err)
}
} else {
framework.Logf("\n\nTest Suite Metrics:\n%s\n\n", metricsJson)
framework.Logf("\n\nTest Suite Metrics:\n%s\n\n", metricsJSON)
}
return nil
}
// TestE2E checks configuration parameters (specified through flags) and then runs
// RunE2ETests checks configuration parameters (specified through flags) and then runs
// E2E tests using the Ginkgo runner.
// If a "report directory" is specified, one or more JUnit test reports will be
// generated in this directory, and cluster logs will also be saved.