From 82e6ae7abdea5aaa21bb44eb5b032aba8caa5f90 Mon Sep 17 00:00:00 2001 From: Anant Vindal Date: Mon, 23 Feb 2026 14:18:35 +0530 Subject: [PATCH] chore: update tests for updated roles struct --- model.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/model.go b/model.go index 387a322..56d8963 100644 --- a/model.go +++ b/model.go @@ -456,21 +456,21 @@ const RetentionBody string = `[ const ( TestUser string = "alice" - dummyRole string = `[{"privilege": "editor"},{"privilege": "writer", "resource": {"stream": "app"}}]` + dummyRole string = `{"actions":[{"privilege": "editor"},{"privilege": "writer", "resource": {"stream": "app"}}], "roleType":"user"}` ) -const RoleEditor string = `[{"privilege": "editor"}]` +const RoleEditor string = `{"actions":[{"privilege": "editor"}],"roleType":"user"}` func RoleWriter(stream string) string { - return fmt.Sprintf(`[{"privilege": "writer", "resource": {"stream": "%s"}}]`, stream) + return fmt.Sprintf(`{"actions":[{"privilege": "writer", "resource": {"stream": "%s"}}],"roleType":"user"}`, stream) } func RoleReader(stream string) string { - return fmt.Sprintf(`[{"privilege": "reader", "resource": {"stream": "%s"}}]`, stream) + return fmt.Sprintf(`{"actions":[{"privilege": "reader", "resource": {"stream": "%s"}}],"roleType":"user"}`, stream) } func Roleingestor(stream string) string { - return fmt.Sprintf(`[{"privilege": "ingestor", "resource": {"stream": "%s"}}]`, stream) + return fmt.Sprintf(`{"actions":[{"privilege": "ingestor", "resource": {"stream": "%s"}}],"roleType":"user"}`, stream) } func getTargetBody() string {