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

use MkTmpDir instead of ioutil.TempDir in testing #25989

Merged
merged 1 commit into from
May 29, 2016
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
4 changes: 2 additions & 2 deletions pkg/volume/testing/testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package testing

import (
"fmt"
"io/ioutil"
"os"
"os/exec"
"path"
Expand All @@ -34,6 +33,7 @@ import (
"k8s.io/kubernetes/pkg/util/io"
"k8s.io/kubernetes/pkg/util/mount"
utilstrings "k8s.io/kubernetes/pkg/util/strings"
utiltesting "k8s.io/kubernetes/pkg/util/testing"
. "k8s.io/kubernetes/pkg/volume"
)

Expand Down Expand Up @@ -370,7 +370,7 @@ func (fc *FakeProvisioner) Provision() (*api.PersistentVolume, error) {
// FindEmptyDirectoryUsageOnTmpfs finds the expected usage of an empty directory existing on
// a tmpfs filesystem on this system.
func FindEmptyDirectoryUsageOnTmpfs() (*resource.Quantity, error) {
tmpDir, err := ioutil.TempDir(os.TempDir(), "metrics_du_test")
tmpDir, err := utiltesting.MkTmpdir("metrics_du_test")
if err != nil {
return nil, err
}
Expand Down