diff --git a/e2e/tests/permission_test.go b/e2e/tests/permission_test.go index 9d0c93af7..9f08888f2 100644 --- a/e2e/tests/permission_test.go +++ b/e2e/tests/permission_test.go @@ -1656,8 +1656,21 @@ func (s *StorageTestSuite) TestVerifyStaleGroupPermission() { // Create Group with 3 group member testGroupName := "testGroup" - msgCreateGroup := storagetypes.NewMsgCreateGroup(owner.GetAddr(), testGroupName, []sdk.AccAddress{user[0].GetAddr(), user[1].GetAddr(), user[2].GetAddr()}, "") - s.SendTxBlock(owner, msgCreateGroup) + msgCreateGroup := storagetypes.NewMsgCreateGroup(owner.GetAddr(), testGroupName, "") + msgUpdateGroupMember := storagetypes.NewMsgUpdateGroupMember(owner.GetAddr(), owner.GetAddr(), testGroupName, + []*storagetypes.MsgGroupMember{ + { + Member: user[0].GetAddr().String(), + ExpirationTime: storagetypes.MaxTimeStamp, + }, { + Member: user[1].GetAddr().String(), + ExpirationTime: storagetypes.MaxTimeStamp, + }, { + Member: user[2].GetAddr().String(), + ExpirationTime: storagetypes.MaxTimeStamp, + }}, + []sdk.AccAddress{}) + s.SendTxBlock(owner, msgCreateGroup, msgUpdateGroupMember) // Head Group headGroupRequest := storagetypes.QueryHeadGroupRequest{GroupOwner: owner.GetAddr().String(), GroupName: testGroupName} diff --git a/x/storage/types/expected_keepers.go b/x/storage/types/expected_keepers.go index 941b8cfab..91c35c82a 100644 --- a/x/storage/types/expected_keepers.go +++ b/x/storage/types/expected_keepers.go @@ -56,10 +56,10 @@ type PermissionKeeper interface { AddGroupMember(ctx sdk.Context, groupID math.Uint, member sdk.AccAddress, expiration time.Time) error UpdateGroupMember(ctx sdk.Context, groupID math.Uint, member sdk.AccAddress, memberID math.Uint, expiration time.Time) MustGetPolicyByID(ctx sdk.Context, policyID math.Uint) *permtypes.Policy + GetPolicyGroupForResource(ctx sdk.Context, resourceID math.Uint, resourceType resource.ResourceType) (*permtypes.PolicyGroup, bool) RemoveGroupMember(ctx sdk.Context, groupID math.Uint, member sdk.AccAddress) error GetPolicyByID(ctx sdk.Context, policyID math.Uint) (*permtypes.Policy, bool) GetPolicyForAccount(ctx sdk.Context, resourceID math.Uint, resourceType resource.ResourceType, addr sdk.AccAddress) (policy *permtypes.Policy, isFound bool) - GetPolicyGroupForResource(ctx sdk.Context, resourceID math.Uint, resourceType resource.ResourceType) (*permtypes.PolicyGroup, bool) GetPolicyForGroup(ctx sdk.Context, resourceID math.Uint, resourceType resource.ResourceType, groupID math.Uint) (policy *permtypes.Policy, isFound bool) GetGroupMember(ctx sdk.Context, groupID math.Uint, member sdk.AccAddress) (*permtypes.GroupMember, bool)