@@ -165,7 +165,7 @@ func TestAccLock(t *testing.T) {
165165 assert .True (t , lockers [indexOfAnInactiveLocker ].Active )
166166}
167167
168- func setupLockerTest (ctx context. Context , t * testing.T ) (* lockpkg.Locker , filer.Filer ) {
168+ func setupLockerTest (t * testing.T ) (context. Context , * lockpkg.Locker , filer.Filer ) {
169169 ctx , wt := acc .WorkspaceTest (t )
170170 w := wt .W
171171
@@ -178,12 +178,11 @@ func setupLockerTest(ctx context.Context, t *testing.T) (*lockpkg.Locker, filer.
178178 locker ,
err := lockpkg .
CreateLocker (
"[email protected] " ,
tmpDir ,
w )
179179 require .NoError (t , err )
180180
181- return locker , f
181+ return ctx , locker , f
182182}
183183
184184func TestAccLockUnlockWithoutAllowsLockFileNotExist (t * testing.T ) {
185- ctx := context .Background ()
186- locker , f := setupLockerTest (ctx , t )
185+ ctx , locker , f := setupLockerTest (t )
187186 var err error
188187
189188 // Acquire lock on tmp directory
@@ -204,8 +203,7 @@ func TestAccLockUnlockWithoutAllowsLockFileNotExist(t *testing.T) {
204203}
205204
206205func TestAccLockUnlockWithAllowsLockFileNotExist (t * testing.T ) {
207- ctx := context .Background ()
208- locker , f := setupLockerTest (ctx , t )
206+ ctx , locker , f := setupLockerTest (t )
209207 var err error
210208
211209 // Acquire lock on tmp directory
0 commit comments