mirror of https://github.com/k3s-io/k3s
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 ```pull/6/head
commit
55042b0ba9
|
@ -126,10 +126,9 @@ func doTestPlugin(t *testing.T, spec *volume.Spec) {
|
|||
if mounter == nil {
|
||||
t.Error("Got a nil Mounter")
|
||||
}
|
||||
path := mounter.GetPath()
|
||||
expectedPath := fmt.Sprintf("%s/pods/poduid/volumes/kubernetes.io~glusterfs/vol1", tmpDir)
|
||||
if path != expectedPath {
|
||||
t.Errorf("Unexpected path, expected %q, got: %q", expectedPath, path)
|
||||
if volumePath != expectedPath {
|
||||
t.Errorf("Unexpected path, expected %q, got: %q", expectedPath, volumePath)
|
||||
}
|
||||
if err := mounter.SetUp(nil); err != nil {
|
||||
t.Errorf("Expected success, got: %v", err)
|
||||
|
|
Loading…
Reference in New Issue