forked from TrueCloudLab/frostfs-node
Evgenii Stratonikov
b1a31281e4
Previous release was EACL-compatible. Starting from now all EACL should've been migrated to APE chains. Signed-off-by: Evgenii Stratonikov <e.stratonikov@yadro.com>
20 lines
454 B
Go
20 lines
454 B
Go
package v2
|
|
|
|
import (
|
|
"errors"
|
|
"testing"
|
|
|
|
apistatus "git.frostfs.info/TrueCloudLab/frostfs-sdk-go/client/status"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
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")
|
|
}
|