fix incorrect log

pull/6/head
linyouchong 2017-10-26 01:30:33 +08:00
parent f4fb38a25d
commit 02e8ffe13c
21 changed files with 22 additions and 22 deletions

View File

@ -168,7 +168,7 @@ func TestPlugin(t *testing.T) {
if _, err := os.Stat(path); err == nil {
t.Errorf("TearDown() failed, volume path still exists: %s", path)
} else if !os.IsNotExist(err) {
t.Errorf("SetUp() failed: %v", err)
t.Errorf("TearDown() failed: %v", err)
}
// Test Provisioner

View File

@ -184,7 +184,7 @@ func testPlugin(t *testing.T, tmpDir string, volumeHost volume.VolumeHost) {
if _, err := os.Stat(path); err == nil {
t.Errorf("TearDown() failed, volume path still exists: %s", path)
} else if !os.IsNotExist(err) {
t.Errorf("SetUp() failed: %v", err)
t.Errorf("TearDown() failed: %v", err)
}
}

View File

@ -111,7 +111,7 @@ func TestPlugin(t *testing.T) {
if _, err := os.Stat(volumePath); err == nil {
t.Errorf("TearDown() failed, volume path still exists: %s", volumePath)
} else if !os.IsNotExist(err) {
t.Errorf("SetUp() failed: %v", err)
t.Errorf("TearDown() failed: %v", err)
}
}

View File

@ -194,7 +194,7 @@ func TestPlugin(t *testing.T) {
if _, err := os.Stat(path); err == nil {
t.Errorf("TearDown() failed, volume path still exists: %s", path)
} else if !os.IsNotExist(err) {
t.Errorf("SetUp() failed: %v", err)
t.Errorf("TearDown() failed: %v", err)
}
// Test Provisioner

View File

@ -606,6 +606,6 @@ func doTestCleanAndTeardown(plugin volume.VolumePlugin, podUID types.UID, testVo
if _, err := os.Stat(volumePath); err == nil {
t.Errorf("TearDown() failed, volume path still exists: %s", volumePath)
} else if !os.IsNotExist(err) {
t.Errorf("SetUp() failed: %v", err)
t.Errorf("TearDown() failed: %v", err)
}
}

View File

@ -287,7 +287,7 @@ func (test *downwardAPITest) tearDown() {
if _, err := os.Stat(test.volumePath); err == nil {
test.t.Errorf("TearDown() failed, volume path still exists: %s", test.volumePath)
} else if !os.IsNotExist(err) {
test.t.Errorf("SetUp() failed: %v", err)
test.t.Errorf("TearDown() failed: %v", err)
}
os.RemoveAll(test.rootDir)
}

View File

@ -216,7 +216,7 @@ func doTestPlugin(t *testing.T, config pluginTestConfig) {
if _, err := os.Stat(volPath); err == nil {
t.Errorf("TearDown() failed, volume path still exists: %s", volPath)
} else if !os.IsNotExist(err) {
t.Errorf("SetUp() failed: %v", err)
t.Errorf("TearDown() failed: %v", err)
}
// Check the number of physicalMounter calls during tardown

View File

@ -181,7 +181,7 @@ func doTestPlugin(t *testing.T, spec *volume.Spec) {
if _, err := os.Stat(path); err == nil {
t.Errorf("TearDown() failed, volume path still exists: %s", path)
} else if !os.IsNotExist(err) {
t.Errorf("SetUp() failed: %v", err)
t.Errorf("TearDown() failed: %v", err)
}
}

View File

@ -161,7 +161,7 @@ func TestPlugin(t *testing.T) {
if _, err := os.Stat(path); err == nil {
t.Errorf("TearDown() failed, volume path still exists: %s", path)
} else if !os.IsNotExist(err) {
t.Errorf("SetUp() failed: %v", err)
t.Errorf("TearDown() failed: %v", err)
}
// Test Provisioner

View File

@ -306,7 +306,7 @@ func doTestPlugin(scenario struct {
fmt.Errorf("TearDown() failed, volume path still exists: %s", path))
} else if !os.IsNotExist(err) {
allErrs = append(allErrs,
fmt.Errorf("SetUp() failed: %v", err))
fmt.Errorf("TearDown() failed: %v", err))
}
return allErrs
}

View File

@ -129,7 +129,7 @@ func doTestPlugin(t *testing.T, spec *volume.Spec) {
if _, err := os.Stat(volumePath); err == nil {
t.Errorf("TearDown() failed, volume path still exists: %s", volumePath)
} else if !os.IsNotExist(err) {
t.Errorf("SetUp() failed: %v", err)
t.Errorf("TearDown() failed: %v", err)
}
}

View File

@ -179,7 +179,7 @@ func doTestPlugin(t *testing.T, spec *volume.Spec) {
if _, err := os.Stat(path); err == nil {
t.Errorf("TearDown() failed, volume path still exists: %s", path)
} else if !os.IsNotExist(err) {
t.Errorf("SetUp() failed: %v", err)
t.Errorf("TearDown() failed: %v", err)
}
}

View File

@ -193,7 +193,7 @@ func TestMountUnmount(t *testing.T) {
if _, err := os.Stat(path); err == nil {
t.Errorf("TearDown() failed, volume path still exists: %s", path)
} else if !os.IsNotExist(err) {
t.Errorf("SetUp() failed: %v", err)
t.Errorf("TearDown() failed: %v", err)
}
}

View File

@ -157,13 +157,13 @@ func doTestPlugin(t *testing.T, spec *volume.Spec) {
if _, err := os.Stat(volumePath); err == nil {
t.Errorf("TearDown() failed, volume path still exists: %s", volumePath)
} else if !os.IsNotExist(err) {
t.Errorf("SetUp() failed: %v", err)
t.Errorf("TearDown() failed: %v", err)
}
if len(fake.Log) != 1 {
t.Errorf("Unmount was not called exactly one time. It was called %d times.", len(fake.Log))
} else {
if fake.Log[0].Action != mount.FakeActionUnmount {
t.Errorf("Unexpected mounter action: %#v", fake.Log[0])
t.Errorf("Unexpected unmounter action: %#v", fake.Log[0])
}
}

View File

@ -161,7 +161,7 @@ func TestPlugin(t *testing.T) {
if _, err := os.Stat(path); err == nil {
t.Errorf("TearDown() failed, volume path still exists: %s", path)
} else if !os.IsNotExist(err) {
t.Errorf("SetUp() failed: %v", err)
t.Errorf("TearDown() failed: %v", err)
}
// Test Provisioner

View File

@ -1042,6 +1042,6 @@ func doTestCleanAndTeardown(plugin volume.VolumePlugin, podUID types.UID, testVo
if _, err := os.Stat(volumePath); err == nil {
t.Errorf("TearDown() failed, volume path still exists: %s", volumePath)
} else if !os.IsNotExist(err) {
t.Errorf("SetUp() failed: %v", err)
t.Errorf("TearDown() failed: %v", err)
}
}

View File

@ -157,7 +157,7 @@ func doTestPlugin(t *testing.T, spec *volume.Spec) {
if _, err := os.Stat(path); err == nil {
t.Errorf("TearDown() failed, volume path still exists: %s", path)
} else if !os.IsNotExist(err) {
t.Errorf("SetUp() failed: %v", err)
t.Errorf("TearDown() failed: %v", err)
}
}

View File

@ -236,7 +236,7 @@ func TestVolumeMounterUnmounter(t *testing.T) {
if _, err := os.Stat(path); err == nil {
t.Errorf("TearDown() failed, volume path still exists: %s", path)
} else if !os.IsNotExist(err) {
t.Errorf("SetUp() failed: %v", err)
t.Errorf("TearDown() failed: %v", err)
}
// are we still mapped
if sio.volume.MappedSdcInfo != nil {

View File

@ -626,6 +626,6 @@ func doTestCleanAndTeardown(plugin volume.VolumePlugin, podUID types.UID, testVo
if _, err := os.Stat(volumePath); err == nil {
t.Errorf("TearDown() failed, volume path still exists: %s", volumePath)
} else if !os.IsNotExist(err) {
t.Errorf("SetUp() failed: %v", err)
t.Errorf("TearDown() failed: %v", err)
}
}

View File

@ -237,7 +237,7 @@ func TestPlugin(t *testing.T) {
if _, err := os.Stat(volPath); err == nil {
t.Errorf("TearDown() failed, volume path still exists: %s", volPath)
} else if !os.IsNotExist(err) {
t.Errorf("SetUp() failed: %v", err)
t.Errorf("TearDown() failed: %v", err)
}
if !fakeManager.unmountCalled {

View File

@ -144,7 +144,7 @@ func TestPlugin(t *testing.T) {
if _, err := os.Stat(path); err == nil {
t.Errorf("TearDown() failed, volume path still exists: %s", path)
} else if !os.IsNotExist(err) {
t.Errorf("SetUp() failed: %v", err)
t.Errorf("TearDown() failed: %v", err)
}
// Test Provisioner