Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testing code leaked to production #4635

Merged
merged 3 commits into from May 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions kyaml/kio/testing.go → kyaml/kio/testing_test.go
Expand Up @@ -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")
Expand All @@ -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)
Expand All @@ -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)
}