From 9ae86e3ae3ea3af29efc2f9573a2be868d5ff9ad Mon Sep 17 00:00:00 2001 From: Pieter Noordhuis Date: Thu, 1 Jun 2023 07:38:03 +0000 Subject: [PATCH] Fix locker integration test (#417) ## Changes The failure was caused by swapping out the error types returned by the filer in #139. ## Tests Integration tests pass again. --- internal/locker_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/locker_test.go b/internal/locker_test.go index b7cfc1ea..bc26bdaa 100644 --- a/internal/locker_test.go +++ b/internal/locker_test.go @@ -4,6 +4,7 @@ import ( "context" "encoding/json" "fmt" + "io/fs" "math/rand" "sync" "testing" @@ -142,7 +143,7 @@ func TestAccLock(t *testing.T) { err = lockers[indexOfActiveLocker].Unlock(ctx) assert.NoError(t, err) remoteLocker, err = locker.GetActiveLockState(ctx) - assert.ErrorContains(t, err, "File not found.", "remote lock file not deleted on unlock") + assert.ErrorIs(t, err, fs.ErrNotExist, "remote lock file not deleted on unlock") assert.Nil(t, remoteLocker) assert.False(t, lockers[indexOfActiveLocker].Active)