File tree 1 file changed +42
-0
lines changed
1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ requires :
3
+ stack : false
4
+ serverless : true
5
+ ---
6
+ " Test put role api " :
7
+ - do :
8
+ security.put_role :
9
+ name : " admin_role"
10
+ body : >
11
+ {
12
+ "metadata": {
13
+ "key1" : "val1",
14
+ "key2" : "val2"
15
+ },
16
+ "indices": [
17
+ {
18
+ "names": "*",
19
+ "privileges": ["all"]
20
+ }
21
+ ]
22
+ }
23
+ - match : { role: { created: true } }
24
+
25
+ - do :
26
+ security.get_role :
27
+ name : " admin_role"
28
+ - match : { admin_role.metadata.key1: "val1" }
29
+ - match : { admin_role.metadata.key2: "val2" }
30
+ - match : { admin_role.indices.0.names.0: "*" }
31
+ - match : { admin_role.indices.0.privileges.0: "all" }
32
+
33
+ - do :
34
+ security.get_builtin_privileges : {}
35
+ # On the client side we don't really care what the values are, just that we've received a correct
36
+ # response and parsed it:
37
+ - is_true : cluster
38
+ - is_true : index
39
+
40
+ - do :
41
+ security.delete_role :
42
+ name : " admin_role"
You can’t perform that action at this time.
0 commit comments