add or fix some errors return statements and ineffassign

Signed-off-by: haoshuwei <haoshuwei24@gmail.com>
This commit is contained in:
haoshuwei
2019-09-14 09:26:17 +08:00
parent 52626339b1
commit b752997036
5 changed files with 16 additions and 2 deletions

View File

@@ -128,6 +128,9 @@ func TestConstructVolumeSpec(t *testing.T) {
}
cephfsSpec, err := plug.(*cephfsPlugin).ConstructVolumeSpec("cephfsVolume", "/cephfsVolume/")
if err != nil {
t.Errorf("ConstructVolumeSpec() failed: %v", err)
}
if cephfsSpec.Name() != "cephfsVolume" {
t.Errorf("Get wrong cephfs spec name, got: %s", cephfsSpec.Name())