File tree Expand file tree Collapse file tree 3 files changed +47
-68
lines changed
Expand file tree Collapse file tree 3 files changed +47
-68
lines changed Original file line number Diff line number Diff line change @@ -38,23 +38,23 @@ var adminOps = []op.Operation{
3838}
3939
4040var defaultAdminLimits = permission.Limits {
41- IPLimit : 7200 ,
42- DocsLimit : 30 ,
43- SearchLimit : 30 ,
44- IndicesLimit : 30 ,
45- CatLimit : 30 ,
46- ClustersLimit : 30 ,
47- MiscLimit : 30 ,
48- UserLimit : 30 ,
49- PermissionLimit : 30 ,
50- AnalyticsLimit : 30 ,
51- RulesLimit : 30 ,
52- TemplatesLimit : 30 ,
53- SuggestionsLimit : 30 ,
54- StreamsLimit : 30 ,
55- AuthLimit : 30 ,
56- FunctionsLimit : 30 ,
57- ReactiveSearchLimit : 30 ,
41+ IPLimit : 7200 ,
42+ DocsLimit : 30 ,
43+ SearchLimit : 30 ,
44+ IndicesLimit : 30 ,
45+ CatLimit : 30 ,
46+ ClustersLimit : 30 ,
47+ MiscLimit : 30 ,
48+ UserLimit : 30 ,
49+ PermissionLimit : 30 ,
50+ AnalyticsLimit : 30 ,
51+ RulesLimit : 30 ,
52+ TemplatesLimit : 30 ,
53+ SuggestionsLimit : 30 ,
54+ StreamsLimit : 30 ,
55+ AuthLimit : 30 ,
56+ FunctionsLimit : 30 ,
57+ ReactiveSearchLimit : 30 ,
5858 SearchRelevancyLimit : 30 ,
5959}
6060
@@ -253,17 +253,9 @@ func TestRBAC(t *testing.T) {
253253 delete (parsedResponse , "_seq_no" )
254254
255255 var updatePermissionResponse = map [string ]interface {}{
256- "_index" : ".permissions" ,
257- "_type" : "_doc" ,
258- "_id" : username ,
259- "_version" : 2 ,
260- "result" : "updated" ,
261- "_shards" : map [string ]interface {}{
262- "total" : 1 ,
263- "successful" : 1 ,
264- "failed" : 0 ,
265- },
266- "_primary_term" : 1 ,
256+ "code" : 200 ,
257+ "message" : "Permission is updated successfully" ,
258+ "status" : "OK" ,
267259 }
268260
269261 mockMap := util .StructToMap (updatePermissionResponse )
Original file line number Diff line number Diff line change @@ -26,10 +26,10 @@ var adminCategories = []category.Category{
2626 category .Rules ,
2727 category .Templates ,
2828 category .Suggestions ,
29+ category .Auth ,
2930 category .Functions ,
3031 category .ReactiveSearch ,
3132 category .SearchRelevancy ,
32- category .Auth ,
3333}
3434
3535var adminOps = []op.Operation {
@@ -39,23 +39,23 @@ var adminOps = []op.Operation{
3939}
4040
4141var defaultAdminLimits = permission.Limits {
42- IPLimit : 7200 ,
43- DocsLimit : 30 ,
44- SearchLimit : 30 ,
45- IndicesLimit : 30 ,
46- CatLimit : 30 ,
47- ClustersLimit : 30 ,
48- MiscLimit : 30 ,
49- UserLimit : 30 ,
50- PermissionLimit : 30 ,
51- AnalyticsLimit : 30 ,
52- RulesLimit : 30 ,
53- TemplatesLimit : 30 ,
54- SuggestionsLimit : 30 ,
55- StreamsLimit : 30 ,
56- AuthLimit : 30 ,
57- FunctionsLimit : 30 ,
58- ReactiveSearchLimit : 30 ,
42+ IPLimit : 7200 ,
43+ DocsLimit : 30 ,
44+ SearchLimit : 30 ,
45+ IndicesLimit : 30 ,
46+ CatLimit : 30 ,
47+ ClustersLimit : 30 ,
48+ MiscLimit : 30 ,
49+ UserLimit : 30 ,
50+ PermissionLimit : 30 ,
51+ AnalyticsLimit : 30 ,
52+ RulesLimit : 30 ,
53+ TemplatesLimit : 30 ,
54+ SuggestionsLimit : 30 ,
55+ StreamsLimit : 30 ,
56+ AuthLimit : 30 ,
57+ FunctionsLimit : 30 ,
58+ ReactiveSearchLimit : 30 ,
5959 SearchRelevancyLimit : 30 ,
6060}
6161
@@ -246,17 +246,9 @@ func TestPermission(t *testing.T) {
246246 delete (parsedResponse , "_seq_no" )
247247
248248 var updatePermissionResponse = map [string ]interface {}{
249- "_index" : ".permissions" ,
250- "_type" : "_doc" ,
251- "_id" : username ,
252- "_version" : 2 ,
253- "result" : "updated" ,
254- "_shards" : map [string ]interface {}{
255- "total" : 1 ,
256- "successful" : 1 ,
257- "failed" : 0 ,
258- },
259- "_primary_term" : 1 ,
249+ "code" : 200 ,
250+ "message" : "Permission is updated successfully" ,
251+ "status" : "OK" ,
260252 }
261253
262254 mockMap := util .StructToMap (updatePermissionResponse )
Original file line number Diff line number Diff line change @@ -55,6 +55,9 @@ var defaultUser = map[string]interface{}{
5555 "rules" ,
5656 "templates" ,
5757 "suggestions" ,
58+ "functions" ,
59+ "reactivesearch" ,
60+ "searchrelevancy" ,
5861 "auth" ,
5962 },
6063 "acls" : []string {
@@ -199,17 +202,9 @@ func TestUser(t *testing.T) {
199202 delete (parsedResponse , "_seq_no" )
200203
201204 var updateUserResponse = map [string ]interface {}{
202- "_index" : ".users" ,
203- "_type" : "_doc" ,
204- "_id" : username ,
205- "_version" : 2 ,
206- "result" : "updated" ,
207- "_shards" : map [string ]interface {}{
208- "total" : 1 ,
209- "successful" : 1 ,
210- "failed" : 0 ,
211- },
212- "_primary_term" : 1 ,
205+ "code" : 200 ,
206+ "message" : "User is updated successfully" ,
207+ "status" : "OK" ,
213208 }
214209
215210 mockMap := util .StructToMap (updateUserResponse )
You can’t perform that action at this time.
0 commit comments