mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-25 00:20:05 -06:00
Merge pull request #31263 from hashicorp/alisdair/backend-remote-locks-helper-lockerror-test
states/remote: Check for LockError error type
This commit is contained in:
commit
0f39ead096
@ -77,6 +77,9 @@ func TestRemoteLocks(t *testing.T, a, b Client) {
|
||||
lockerA.Unlock(lockIDA)
|
||||
t.Fatal("client B obtained lock while held by client A")
|
||||
}
|
||||
if _, ok := err.(*statemgr.LockError); !ok {
|
||||
t.Errorf("expected a LockError, but was %t: %s", err, err)
|
||||
}
|
||||
|
||||
if err := lockerA.Unlock(lockIDA); err != nil {
|
||||
t.Fatal("error unlocking client A", err)
|
||||
|
Loading…
Reference in New Issue
Block a user