Merge pull request #54549 from linyouchong/linyouchong-20171025

Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.

fix incorrect log

**What this PR does / why we need it**:
fix incorrect log in nfs_test.go
**Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #
NONE
**Special notes for your reviewer**:
NONE
**Release note**:
NONE
This commit is contained in:
Kubernetes Submit Queue 2017-10-27 11:02:42 -07:00 committed by GitHub
commit 6d73f03d2b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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

@ -241,7 +241,7 @@ func doTestPlugin(t *testing.T, c *testcase) {
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)
}
checkMounterLog(t, fakeMounter, 3, mount.FakeAction{Action: "unmount", Target: c.expectedPodMountPath, Source: "", FSType: ""})

View File

@ -241,7 +241,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