From 4022e3b6c3cf3b2da1b66714fe5ea2fadd7787e7 Mon Sep 17 00:00:00 2001 From: Alex Vanin Date: Fri, 12 Apr 2024 19:22:44 +0300 Subject: [PATCH] [#xxxx] policy: Test very large entity name Signed-off-by: Alex Vanin --- tests/policy_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/policy_test.go b/tests/policy_test.go index e7fd489..ea72f73 100644 --- a/tests/policy_test.go +++ b/tests/policy_test.go @@ -100,6 +100,12 @@ func TestPolicy(t *testing.T) { checkTargets(t, e, policy.Namespace, [][]byte{[]byte("mynamespace")}) 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) {