[#xxxx] policy: Test very large entity name
Some checks failed
DCO action / DCO (pull_request) Failing after 1m1s
Tests / Tests (1.21) (pull_request) Successful in 1m19s
Tests / Tests (1.22) (pull_request) Successful in 1m23s

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
This commit is contained in:
Alexey Vanin 2024-04-12 19:22:44 +03:00
parent 670c74610b
commit 4022e3b6c3

View file

@ -100,6 +100,12 @@ func TestPolicy(t *testing.T) {
checkTargets(t, e, policy.Namespace, [][]byte{[]byte("mynamespace")}) checkTargets(t, e, policy.Namespace, [][]byte{[]byte("mynamespace")})
checkTargets(t, e, policy.Container, [][]byte{[]byte("cnr1")}) checkTargets(t, e, policy.Container, [][]byte{[]byte("cnr1")})
}) })
t.Run("large entityname", func(t *testing.T) {
largeEntityName := "thisisverylargeentitynamethatcontainverylargenamespaceanduseraddress"
e.Invoke(t, stackitem.Null{}, "addChain", policy.User, largeEntityName, "s3:somerule", p1)
checkTargets(t, e, policy.User, [][]byte{[]byte(largeEntityName)})
})
} }
func TestAutorization(t *testing.T) { func TestAutorization(t *testing.T) {