Merge pull request #57583 from MorrisLaw/bugfix/logf-newline

Automatic merge from submit-queue (batch tested with PRs 60158, 60156, 58111, 57583, 60055). 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>.

Bugfix/logf newline

**What this PR does / why we need it**:
Removes all redundant new lines being passed into the `Logf()` function. This involved going through code in both `test/e2e` and `test/e2e_node`, finding the newline redundancies in calls to `Logf()` and removing them.

**Which issue(s) this PR fixes**:
Fixes [#57102](https://github.com/kubernetes/kubernetes/issues/57102)

**Release note**:

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2018-02-21 22:10:34 -08:00 committed by GitHub
commit 714b19ee75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 7 deletions

View File

@ -56,7 +56,7 @@ func setupProviderConfig() error {
glog.Info("The --provider flag is not set. Treating as a conformance test. Some tests may not be run.") glog.Info("The --provider flag is not set. Treating as a conformance test. Some tests may not be run.")
case "gce", "gke": case "gce", "gke":
framework.Logf("Fetching cloud provider for %q\r\n", framework.TestContext.Provider) framework.Logf("Fetching cloud provider for %q\r", framework.TestContext.Provider)
zone := framework.TestContext.CloudConfig.Zone zone := framework.TestContext.CloudConfig.Zone
region := framework.TestContext.CloudConfig.Region region := framework.TestContext.CloudConfig.Region
@ -295,7 +295,7 @@ func gatherTestSuiteMetrics() error {
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", metricsJSON)
} }
return nil return nil

View File

@ -103,7 +103,7 @@ func testStackdriverAcceleratorMonitoring(f *framework.Framework) {
pollingFunction := checkForAcceleratorMetrics(projectId, gcmService, time.Now(), metricsMap) pollingFunction := checkForAcceleratorMetrics(projectId, gcmService, time.Now(), metricsMap)
err = wait.Poll(pollFrequency, pollTimeout, pollingFunction) err = wait.Poll(pollFrequency, pollTimeout, pollingFunction)
if err != nil { if err != nil {
framework.Logf("Missing metrics: %+v\n", metricsMap) framework.Logf("Missing metrics: %+v", metricsMap)
} }
framework.ExpectNoError(err) framework.ExpectNoError(err)
} }

View File

@ -65,7 +65,7 @@ func OnlyAllowNodeZones(f *framework.Framework, zoneCount int, image string) {
// Get all the zones that the nodes are in // Get all the zones that the nodes are in
expectedZones, err := gceCloud.GetAllZonesFromCloudProvider() expectedZones, err := gceCloud.GetAllZonesFromCloudProvider()
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
framework.Logf("Expected zones: %v\n", expectedZones) framework.Logf("Expected zones: %v", expectedZones)
// Get all the zones in this current region // Get all the zones in this current region
region := gceCloud.Region() region := gceCloud.Region()

View File

@ -161,9 +161,9 @@ var _ = framework.KubeDescribe("Container Manager Misc [Serial]", func() {
}, },
}) })
Expect(err).NotTo(HaveOccurred()) Expect(err).NotTo(HaveOccurred())
framework.Logf("Running containers:\n") framework.Logf("Running containers:")
for _, c := range containers { for _, c := range containers {
framework.Logf("%+v\n", c) framework.Logf("%+v", c)
} }
} }
}) })

View File

@ -198,7 +198,7 @@ var _ = framework.KubeDescribe("Density [Serial] [Slow]", func() {
// Here we set API QPS limit from default 5 to 60 in order to test real Kubelet performance. // Here we set API QPS limit from default 5 to 60 in order to test real Kubelet performance.
// Note that it will cause higher resource usage. // Note that it will cause higher resource usage.
tempSetCurrentKubeletConfig(f, func(cfg *kubeletconfig.KubeletConfiguration) { tempSetCurrentKubeletConfig(f, func(cfg *kubeletconfig.KubeletConfiguration) {
framework.Logf("Old QPS limit is: %d\n", cfg.KubeAPIQPS) framework.Logf("Old QPS limit is: %d", cfg.KubeAPIQPS)
// Set new API QPS limit // Set new API QPS limit
cfg.KubeAPIQPS = int32(itArg.APIQPSLimit) cfg.KubeAPIQPS = int32(itArg.APIQPSLimit)
}) })