eacl: Fix bug with casting to ObjectAccessDenied error #553
Labels
No labels
P0
P1
P2
P3
badger
frostfs-adm
frostfs-cli
frostfs-ir
frostfs-lens
frostfs-node
good first issue
triage
Infrastructure
blocked
bug
config
discussion
documentation
duplicate
enhancement
go
help wanted
internal
invalid
kludge
observability
perfomance
question
refactoring
wontfix
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: TrueCloudLab/frostfs-node#553
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "aarifullin/frostfs-node:fix/eacl_errors"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Signed-off-by: Airat Arifullin a.arifullin@yadro.com
[#xx] eacl: Fix bug with casting to ObjectAccessDenied errorto [#553] eacl: Fix bug with casting to ObjectAccessDenied errora1c279cf0c
to5519dfde4f
@ -0,0 +13,4 @@
var errAccessDenied *apistatus.ObjectAccessDenied
if !errors.As(err, &errAccessDenied) {
require.True(...)
.Same below.
require.ErrorsAs
is also possibleChanged to
require.ErrorsAs
.To be honest I don't really like message format that
require
package uses for errors. That's why I initally usedt.Fatalf
, but I am ok withrequire.ErrorsAs
[#553] eacl: Fix bug with casting to ObjectAccessDenied errorto eacl: Fix bug with casting to ObjectAccessDenied error5519dfde4f
to9c2c8697a5
9c2c8697a5
tocae3085551
@ -0,0 +19,4 @@
func TestEACLErr(t *testing.T) {
var reqInfo RequestInfo
errAny := apistatus.ObjectNotFound{}
This is not "any error", the most generic would be sth with
errors.New
I believeAlright. I think you are right. I needed any error to create the instance :)
UPD: fixed to
errors.New
cae3085551
to6e69410c17