From c4a96d32151986228b90be453644a0000800d325 Mon Sep 17 00:00:00 2001 From: toyoda Date: Thu, 16 May 2019 17:21:01 +0900 Subject: [PATCH] fix golint failure in e2e/common/util.go --- test/e2e/common/util.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/e2e/common/util.go b/test/e2e/common/util.go index b8b9a4484eb..f11481e6f88 100644 --- a/test/e2e/common/util.go +++ b/test/e2e/common/util.go @@ -34,13 +34,17 @@ import ( "github.com/onsi/ginkgo" ) +// Suite represents test suite. type Suite string const ( - E2E Suite = "e2e" + // E2E represents a test suite for e2e. + E2E Suite = "e2e" + // NodeE2E represents a test suite for node e2e. NodeE2E Suite = "node e2e" ) +// CurrentSuite represents current test suite. var CurrentSuite Suite // CommonImageWhiteList is the list of images used in common test. These images should be prepulled @@ -96,6 +100,7 @@ func init() { } } +// SubstituteImageName replaces image name in content. func SubstituteImageName(content string) string { contentWithImageName := new(bytes.Buffer) tmpl, err := template.New("imagemanifest").Parse(content) @@ -127,6 +132,7 @@ func svcByName(name string, port int) *v1.Service { } } +// NewSVCByName creates a service by name. func NewSVCByName(c clientset.Interface, ns, name string) error { const testPort = 9376 _, err := c.CoreV1().Services(ns).Create(svcByName(name, testPort)) @@ -140,6 +146,7 @@ func NewRCByName(c clientset.Interface, ns, name string, replicas int32, gracePe name, replicas, framework.ServeHostnameImage, 9376, v1.ProtocolTCP, map[string]string{}, gracePeriod)) } +// RestartNodes restarts specific nodes. func RestartNodes(c clientset.Interface, nodes []v1.Node) error { // Build mapping from zone to nodes in that zone. nodeNamesByZone := make(map[string][]string)