예제 #1
0
 private static List <Func <object> > UserCommandsAsync(ElasticClient elastic)
 {
     return(new List <Func <object> >
     {
         () => elastic.PutRoleAsync("test_role_1"),
         // () => elastic.PutRoleMappingAsync("test_role_1"),
         () => elastic.GetRoleAsync(new GetRoleRequest("test_role_1")),
         // () => elastic.GetRoleMappingAsync(new GetRoleMappingRequest("test_role_1")),
         // () => elastic.DeleteRoleMappingAsync("test_role_1"),
         () => elastic.DeleteRoleAsync("test_role_1"),
         () => elastic.PutUserAsync("test_user_1"),
         () => elastic.ChangePasswordAsync(new ChangePasswordRequest("test_user_1")
         {
             Password = "******",
         }),
         () => elastic.GetUserAsync(new GetUserRequest("test_user_1")),
         //() => elastic.DisableUserAsync("test_user_1"),
         () => elastic.DeleteUserAsync("test_user_1"),
     });
 }