Merge pull request #38789 from jessfraz/cleanup-temp-dirs

Automatic merge from submit-queue (batch tested with PRs 37228, 40146, 40075, 38789, 40189)

Cleanup temp dirs

So funny story my /tmp ran out of space running the unit tests so I am cleaning up all the temp dirs we create.
This commit is contained in:
Kubernetes Submit Queue
2017-01-20 12:34:58 -08:00
committed by GitHub
21 changed files with 130 additions and 18 deletions

View File

@@ -165,7 +165,8 @@ func TestPlugin(t *testing.T) {
func TestGetByName(t *testing.T) {
assert := assert.New(t)
plugMgr, _ := newInitializedVolumePlugMgr(t)
plugMgr, dir := newInitializedVolumePlugMgr(t)
defer os.RemoveAll(dir)
plug, err := plugMgr.FindPluginByName(pluginName)
assert.NotNil(plug, "Can't find the plugin by name")
@@ -174,7 +175,8 @@ func TestGetByName(t *testing.T) {
func TestCanSupport(t *testing.T) {
assert := assert.New(t)
plugMgr, _ := newInitializedVolumePlugMgr(t)
plugMgr, dir := newInitializedVolumePlugMgr(t)
defer os.RemoveAll(dir)
plug, err := plugMgr.FindPluginByName(pluginName)
assert.NoError(err)
@@ -242,7 +244,8 @@ func TestGetFlockerVolumeSource(t *testing.T) {
func TestNewMounterDatasetName(t *testing.T) {
assert := assert.New(t)
plugMgr, _ := newInitializedVolumePlugMgr(t)
plugMgr, dir := newInitializedVolumePlugMgr(t)
defer os.RemoveAll(dir)
plug, err := plugMgr.FindPluginByName(pluginName)
assert.NoError(err)
@@ -263,7 +266,8 @@ func TestNewMounterDatasetName(t *testing.T) {
func TestNewMounterDatasetUUID(t *testing.T) {
assert := assert.New(t)
plugMgr, _ := newInitializedVolumePlugMgr(t)
plugMgr, dir := newInitializedVolumePlugMgr(t)
defer os.RemoveAll(dir)
plug, err := plugMgr.FindPluginByName(pluginName)
assert.NoError(err)