@@ -1646,10 +1646,9 @@ func TestCopyVolume(t *testing.T) {
16461646				}
16471647
16481648				d  :=  NewFakeDriver ()
1649- 				ctx  :=  context .Background ()
16501649
16511650				expectedErr  :=  status .Errorf (codes .InvalidArgument , "copy volume from volumeSnapshot is not supported" )
1652- 				err  :=  d .copyVolume (ctx ,  req , "" , nil , "core.windows.net" )
1651+ 				err  :=  d .copyVolume (req , "" , nil , "core.windows.net" )
16531652				if  ! reflect .DeepEqual (err , expectedErr ) {
16541653					t .Errorf ("Unexpected error: %v" , err )
16551654				}
@@ -1679,10 +1678,9 @@ func TestCopyVolume(t *testing.T) {
16791678				}
16801679
16811680				d  :=  NewFakeDriver ()
1682- 				ctx  :=  context .Background ()
16831681
16841682				expectedErr  :=  fmt .Errorf ("protocol nfs is not supported for volume cloning" )
1685- 				err  :=  d .copyVolume (ctx ,  req , "" , & fileclient.ShareOptions {Protocol : storage .EnabledProtocolsNFS }, "core.windows.net" )
1683+ 				err  :=  d .copyVolume (req , "" , & fileclient.ShareOptions {Protocol : storage .EnabledProtocolsNFS }, "core.windows.net" )
16861684				if  ! reflect .DeepEqual (err , expectedErr ) {
16871685					t .Errorf ("Unexpected error: %v" , err )
16881686				}
@@ -1712,10 +1710,9 @@ func TestCopyVolume(t *testing.T) {
17121710				}
17131711
17141712				d  :=  NewFakeDriver ()
1715- 				ctx  :=  context .Background ()
17161713
17171714				expectedErr  :=  status .Errorf (codes .NotFound , "error parsing volume id: \" unit-test\" , should at least contain two #" )
1718- 				err  :=  d .copyVolume (ctx ,  req , "" , & fileclient.ShareOptions {Name : "dstFileshare" }, "core.windows.net" )
1715+ 				err  :=  d .copyVolume (req , "" , & fileclient.ShareOptions {Name : "dstFileshare" }, "core.windows.net" )
17191716				if  ! reflect .DeepEqual (err , expectedErr ) {
17201717					t .Errorf ("Unexpected error: %v" , err )
17211718				}
@@ -1745,10 +1742,9 @@ func TestCopyVolume(t *testing.T) {
17451742				}
17461743
17471744				d  :=  NewFakeDriver ()
1748- 				ctx  :=  context .Background ()
17491745
17501746				expectedErr  :=  fmt .Errorf ("srcFileShareName() or dstFileShareName(dstFileshare) is empty" )
1751- 				err  :=  d .copyVolume (ctx ,  req , "" , & fileclient.ShareOptions {Name : "dstFileshare" }, "core.windows.net" )
1747+ 				err  :=  d .copyVolume (req , "" , & fileclient.ShareOptions {Name : "dstFileshare" }, "core.windows.net" )
17521748				if  ! reflect .DeepEqual (err , expectedErr ) {
17531749					t .Errorf ("Unexpected error: %v" , err )
17541750				}
@@ -1778,10 +1774,9 @@ func TestCopyVolume(t *testing.T) {
17781774				}
17791775
17801776				d  :=  NewFakeDriver ()
1781- 				ctx  :=  context .Background ()
17821777
17831778				expectedErr  :=  fmt .Errorf ("srcFileShareName(fileshare) or dstFileShareName() is empty" )
1784- 				err  :=  d .copyVolume (ctx ,  req , "" , & fileclient.ShareOptions {}, "core.windows.net" )
1779+ 				err  :=  d .copyVolume (req , "" , & fileclient.ShareOptions {}, "core.windows.net" )
17851780				if  ! reflect .DeepEqual (err , expectedErr ) {
17861781					t .Errorf ("Unexpected error: %v" , err )
17871782				}
@@ -1822,10 +1817,8 @@ func TestCopyVolume(t *testing.T) {
18221817
18231818				d .azcopy .ExecCmd  =  m 
18241819
1825- 				ctx  :=  context .Background ()
1826- 
18271820				var  expectedErr  error 
1828- 				err  :=  d .copyVolume (ctx ,  req , "" , & fileclient.ShareOptions {Name : "dstFileshare" }, "core.windows.net" )
1821+ 				err  :=  d .copyVolume (req , "" , & fileclient.ShareOptions {Name : "dstFileshare" }, "core.windows.net" )
18291822				if  ! reflect .DeepEqual (err , expectedErr ) {
18301823					t .Errorf ("Unexpected error: %v" , err )
18311824				}
@@ -1867,10 +1860,8 @@ func TestCopyVolume(t *testing.T) {
18671860
18681861				d .azcopy .ExecCmd  =  m 
18691862
1870- 				ctx  :=  context .Background ()
1871- 
18721863				var  expectedErr  error 
1873- 				err  :=  d .copyVolume (ctx ,  req , "" , & fileclient.ShareOptions {Name : "dstFileshare" }, "core.windows.net" )
1864+ 				err  :=  d .copyVolume (req , "" , & fileclient.ShareOptions {Name : "dstFileshare" }, "core.windows.net" )
18741865				if  ! reflect .DeepEqual (err , expectedErr ) {
18751866					t .Errorf ("Unexpected error: %v" , err )
18761867				}
0 commit comments