mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-15 14:14:39 +00:00
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:
@@ -288,20 +288,20 @@ func gatherTestSuiteMetrics() error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
metricsForE2E := (*framework.MetricsForE2E)(&received)
|
metricsForE2E := (*framework.MetricsForE2E)(&received)
|
||||||
metricsJson := metricsForE2E.PrintJSON()
|
metricsJSON := metricsForE2E.PrintJSON()
|
||||||
if framework.TestContext.ReportDir != "" {
|
if framework.TestContext.ReportDir != "" {
|
||||||
filePath := path.Join(framework.TestContext.ReportDir, "MetricsForE2ESuite_"+time.Now().Format(time.RFC3339)+".json")
|
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)
|
return fmt.Errorf("error writing to %q: %v", filePath, err)
|
||||||
}
|
}
|
||||||
} else {
|
} 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
|
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.
|
// E2E tests using the Ginkgo runner.
|
||||||
// If a "report directory" is specified, one or more JUnit test reports will be
|
// 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.
|
// generated in this directory, and cluster logs will also be saved.
|
||||||
|
Reference in New Issue
Block a user