Commit 55042b0b authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #43673 from harryge00/refactor_test

Automatic merge from submit-queue (batch tested with PRs 40777, 43673) remove an unnecassary variable assignment in glusterfs_test **What this PR does / why we need it**: `path` is exactly the same variable as `volumePath`, which is defined in line 122 . So no needs to assign it. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note ```
parents 809edf89 cb7cb348
...@@ -126,10 +126,9 @@ func doTestPlugin(t *testing.T, spec *volume.Spec) { ...@@ -126,10 +126,9 @@ func doTestPlugin(t *testing.T, spec *volume.Spec) {
if mounter == nil { if mounter == nil {
t.Error("Got a nil Mounter") t.Error("Got a nil Mounter")
} }
path := mounter.GetPath()
expectedPath := fmt.Sprintf("%s/pods/poduid/volumes/kubernetes.io~glusterfs/vol1", tmpDir) expectedPath := fmt.Sprintf("%s/pods/poduid/volumes/kubernetes.io~glusterfs/vol1", tmpDir)
if path != expectedPath { if volumePath != expectedPath {
t.Errorf("Unexpected path, expected %q, got: %q", expectedPath, path) t.Errorf("Unexpected path, expected %q, got: %q", expectedPath, volumePath)
} }
if err := mounter.SetUp(nil); err != nil { if err := mounter.SetUp(nil); err != nil {
t.Errorf("Expected success, got: %v", err) t.Errorf("Expected success, got: %v", err)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment