mirror of https://github.com/k3s-io/k3s
fix incorrect log
parent
f4fb38a25d
commit
02e8ffe13c
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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])
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue