Merge pull request #54036 from xiangpengzhao/no-formatting

Automatic merge from submit-queue (batch tested with PRs 54036, 53739). 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>.

Remove Sprintf when there are no placeholders in the formatting.

**What this PR does / why we need it**:
Minor cleanup.

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

**Special notes for your reviewer**:

**Release note**:

```release-note
NONE
```
This commit is contained in:
Kubernetes Submit Queue 2017-10-17 06:49:14 -07:00 committed by GitHub
commit e75cd21afa

View File

@ -148,10 +148,10 @@ var _ = Describe("[sig-api-machinery] Downward API", func() {
},
}
expectations := []string{
fmt.Sprintf("CPU_LIMIT=2"),
fmt.Sprintf("MEMORY_LIMIT=67108864"),
fmt.Sprintf("CPU_REQUEST=1"),
fmt.Sprintf("MEMORY_REQUEST=33554432"),
"CPU_LIMIT=2",
"MEMORY_LIMIT=67108864",
"CPU_REQUEST=1",
"MEMORY_REQUEST=33554432",
}
testDownwardAPI(f, podName, env, expectations)
@ -178,8 +178,8 @@ var _ = Describe("[sig-api-machinery] Downward API", func() {
},
}
expectations := []string{
fmt.Sprintf("CPU_LIMIT=[1-9]"),
fmt.Sprintf("MEMORY_LIMIT=[1-9]"),
"CPU_LIMIT=[1-9]",
"MEMORY_LIMIT=[1-9]",
}
pod := &v1.Pod{
ObjectMeta: metav1.ObjectMeta{
@ -218,7 +218,7 @@ var _ = Describe("[sig-api-machinery] Downward API", func() {
}
expectations := []string{
fmt.Sprintf("POD_UID=[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}"),
"POD_UID=[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}",
}
testDownwardAPI(f, podName, env, expectations)