From ccaea227e0e9356ab293610784b635c643e9a15e Mon Sep 17 00:00:00 2001 From: Tibor Vass Date: Mon, 6 Jun 2016 15:57:51 -0700 Subject: [PATCH] Cleanup Signed-off-by: Tibor Vass --- distribution/push.go | 2 +- pkg/namesgenerator/names-generator_test.go | 18 ------------------ 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/distribution/push.go b/distribution/push.go index 56a6bd7624ae5..f3b54b7cf794d 100644 --- a/distribution/push.go +++ b/distribution/push.go @@ -88,7 +88,7 @@ func NewPusher(ref reference.Named, endpoint registry.APIEndpoint, repoInfo *reg return nil, fmt.Errorf("unknown version %d for registry %s", endpoint.Version, endpoint.URL) } -// Push initiates a push operation on the repository named localName. +// Push initiates a push operation on ref. // ref is the specific variant of the image to be pushed. // If no tag is provided, all tags will be pushed. func Push(ctx context.Context, ref reference.Named, imagePushConfig *ImagePushConfig) error { diff --git a/pkg/namesgenerator/names-generator_test.go b/pkg/namesgenerator/names-generator_test.go index f7dae2766c3b9..d1a94977d7fa6 100644 --- a/pkg/namesgenerator/names-generator_test.go +++ b/pkg/namesgenerator/names-generator_test.go @@ -5,14 +5,6 @@ import ( "testing" ) -// Make sure the generated names are awesome -func TestGenerateAwesomeNames(t *testing.T) { - name := GetRandomName(0) - if !isAwesome(name) { - t.Fatalf("Generated name '%s' is not awesome.", name) - } -} - func TestNameFormat(t *testing.T) { name := GetRandomName(0) if !strings.Contains(name, "_") { @@ -33,13 +25,3 @@ func TestNameRetries(t *testing.T) { } } - -// To be awesome, a container name must involve cool inventors, be easy to remember, -// be at least mildly funny, and always be politically correct for enterprise adoption. -func isAwesome(name string) bool { - coolInventorNames := true - easyToRemember := true - mildlyFunnyOnOccasion := true - politicallyCorrect := true - return coolInventorNames && easyToRemember && mildlyFunnyOnOccasion && politicallyCorrect -}