From 89193ac0fd57700040dd3a826ab524103fcbab82 Mon Sep 17 00:00:00 2001 From: Patrick Ohly Date: Fri, 9 Nov 2018 11:20:19 +0100 Subject: [PATCH] e2e/storage: avoid fmt.Sprintf for single string The fmt.Sprintf call is either redundant (if the format string contains no format characters) or broken (if it does, because there are no parameters). --- test/e2e/storage/csi_volumes.go | 2 +- test/e2e/storage/in_tree_volumes.go | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/test/e2e/storage/csi_volumes.go b/test/e2e/storage/csi_volumes.go index d90d146d6c5..ce726c2bbb2 100644 --- a/test/e2e/storage/csi_volumes.go +++ b/test/e2e/storage/csi_volumes.go @@ -125,7 +125,7 @@ var _ = utils.SIGDescribe("CSI Volumes", func() { for _, initDriver := range csiTestDrivers { curDriver := initDriver() - Context(fmt.Sprintf(drivers.GetDriverNameWithFeatureTags(curDriver)), func() { + Context(drivers.GetDriverNameWithFeatureTags(curDriver), func() { driver := curDriver BeforeEach(func() { diff --git a/test/e2e/storage/in_tree_volumes.go b/test/e2e/storage/in_tree_volumes.go index 6c6ea613686..603876150b5 100644 --- a/test/e2e/storage/in_tree_volumes.go +++ b/test/e2e/storage/in_tree_volumes.go @@ -17,8 +17,6 @@ limitations under the License. package storage import ( - "fmt" - . "github.com/onsi/ginkgo" "k8s.io/api/core/v1" "k8s.io/kubernetes/test/e2e/framework" @@ -77,7 +75,7 @@ var _ = utils.SIGDescribe("In-tree Volumes", func() { for _, initDriver := range testDrivers { curDriver := initDriver() - Context(fmt.Sprintf(drivers.GetDriverNameWithFeatureTags(curDriver)), func() { + Context(drivers.GetDriverNameWithFeatureTags(curDriver), func() { driver := curDriver BeforeEach(func() {