Merge pull request #31263 from hashicorp/alisdair/backend-remote-locks-helper-lockerror-test

states/remote: Check for LockError error type
pull/30948/head
Alisdair McDiarmid 4 years ago committed by GitHub
commit 0f39ead096
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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…
Cancel
Save