From b11cc3ae672f142037b8c076b3009367e0ddbd5d Mon Sep 17 00:00:00 2001 From: konrad945 Date: Thu, 12 May 2022 16:42:28 +0200 Subject: [PATCH 1/3] Fix comments --- kyaml/kio/testing.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kyaml/kio/testing.go b/kyaml/kio/testing.go index 6c46a28047..19b7f1b775 100644 --- a/kyaml/kio/testing.go +++ b/kyaml/kio/testing.go @@ -18,7 +18,7 @@ type Setup struct { Root string } -// setupDirectories creates directories for reading test configuration from +// SetupDirectories creates directories for reading test configuration from func SetupDirectories(t *testing.T, dirs ...string) Setup { t.Helper() d, err := ioutil.TempDir("", "kyaml-test") @@ -32,7 +32,7 @@ func SetupDirectories(t *testing.T, dirs ...string) Setup { return Setup{Root: d} } -// writeFile writes a file under the test directory +// WriteFile writes a file under the test directory func (s Setup) WriteFile(t *testing.T, path string, value []byte) { t.Helper() err := os.MkdirAll(filepath.Dir(filepath.Join(s.Root, path)), 0700) @@ -41,7 +41,7 @@ func (s Setup) WriteFile(t *testing.T, path string, value []byte) { require.NoError(t, err) } -// clean deletes the test config +// Clean deletes the test config func (s Setup) Clean() { os.RemoveAll(s.Root) } From ddf768195c848234b492a617fde2a15ddd508b3d Mon Sep 17 00:00:00 2001 From: konrad945 Date: Thu, 12 May 2022 16:43:27 +0200 Subject: [PATCH 2/3] Rename testing.go to testing_test.go --- kyaml/kio/{testing.go => testing_test.go} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename kyaml/kio/{testing.go => testing_test.go} (98%) diff --git a/kyaml/kio/testing.go b/kyaml/kio/testing_test.go similarity index 98% rename from kyaml/kio/testing.go rename to kyaml/kio/testing_test.go index 19b7f1b775..8c456d33c3 100644 --- a/kyaml/kio/testing.go +++ b/kyaml/kio/testing_test.go @@ -1,7 +1,7 @@ // Copyright 2019 The Kubernetes Authors. // SPDX-License-Identifier: Apache-2.0 -package kio +package kio_test import ( "io/ioutil" From ba7315ca760c36d30d86bf4c75db0f9a48f361ae Mon Sep 17 00:00:00 2001 From: konrad945 Date: Thu, 12 May 2022 19:38:15 +0200 Subject: [PATCH 3/3] Update testing_test.go --- kyaml/kio/testing_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kyaml/kio/testing_test.go b/kyaml/kio/testing_test.go index 8c456d33c3..19b7f1b775 100644 --- a/kyaml/kio/testing_test.go +++ b/kyaml/kio/testing_test.go @@ -1,7 +1,7 @@ // Copyright 2019 The Kubernetes Authors. // SPDX-License-Identifier: Apache-2.0 -package kio_test +package kio import ( "io/ioutil"