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.
This commit is contained in:
Pieter Noordhuis 2023-06-01 07:38:03 +00:00 committed by GitHub
parent 349e2aff40
commit 9ae86e3ae3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import (
"context" "context"
"encoding/json" "encoding/json"
"fmt" "fmt"
"io/fs"
"math/rand" "math/rand"
"sync" "sync"
"testing" "testing"
@ -142,7 +143,7 @@ func TestAccLock(t *testing.T) {
err = lockers[indexOfActiveLocker].Unlock(ctx) err = lockers[indexOfActiveLocker].Unlock(ctx)
assert.NoError(t, err) assert.NoError(t, err)
remoteLocker, err = locker.GetActiveLockState(ctx) 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.Nil(t, remoteLocker)
assert.False(t, lockers[indexOfActiveLocker].Active) assert.False(t, lockers[indexOfActiveLocker].Active)