package v2 import ( "errors" "testing" apistatus "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/client/status" "github.com/stretchr/testify/require" ) func TestBasicACLErr(t *testing.T) { var reqInfo RequestInfo err := basicACLErr(reqInfo) var errAccessDenied *apistatus.ObjectAccessDenied require.ErrorAs(t, err, &errAccessDenied, "basicACLErr must be able to be casted to apistatus.ObjectAccessDenied") } func TestEACLErr(t *testing.T) { var reqInfo RequestInfo testErr := errors.New("test-eacl") err := eACLErr(reqInfo, testErr) var errAccessDenied *apistatus.ObjectAccessDenied require.ErrorAs(t, err, &errAccessDenied, "eACLErr must be able to be casted to apistatus.ObjectAccessDenied") }