mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-01 15:58:37 +00:00
Remove Sprintf when there are no placeholders in the formatting.
This commit is contained in:
parent
d7e56d5330
commit
6089093a6f
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user