diff --git a/tests/replication/replica.yaml b/tests/replication/replica.yaml index c664b12c2..3e4e07eed 100644 --- a/tests/replication/replica.yaml +++ b/tests/replication/replica.yaml @@ -43,6 +43,53 @@ chapters: method: GET parameters: username: admin + + - synopsis: Create leader role. + path: /_plugins/_security/api/roles/leader_role + method: PUT + request: + payload: + cluster_permissions: + - "cluster:monitor/state" + index_permissions: + - index_patterns: ["*"] + allowed_actions: ["indices:data/read/*"] + response: + status: 200 + + - synopsis: Create follower role. + path: /_plugins/_security/api/roles/cross_cluster_replication_follower_full_access + method: PUT + request: + payload: + cluster_permissions: + - "cluster:admin/xpack/ccr/auto_follow_pattern/*" + index_permissions: + - index_patterns: ["*"] + allowed_actions: ["indices:data/write/*"] + response: + status: 200 + + - synopsis: Map leader role to user. + path: /_plugins/_security/api/rolesmapping/leader_role + method: PUT + request: + payload: + backend_roles: ["admin"] + users: ["admin"] + response: + status: 200 + + - synopsis: Map follower role to user. + path: /_plugins/_security/api/rolesmapping/cross_cluster_replication_follower_full_access + method: PUT + request: + payload: + backend_roles: ["admin"] + users: ["admin"] + response: + status: 200 + - synopsis: Establish connection. path: /_cluster/settings method: PUT @@ -55,6 +102,7 @@ chapters: seeds: ['172.22.0.3:9300'] response: status: 200 + - synopsis: Start replication. path: /_plugins/_replication/{index}/_start version: '>= 1.1' @@ -70,6 +118,7 @@ chapters: follower_cluster_role: cross_cluster_replication_follower_full_access response: status: 200 + - synopsis: Get replication stats. path: /_plugins/_replication/{index}/_status version: '>= 1.1' @@ -78,24 +127,28 @@ chapters: index: books-names response: status: 200 + - synopsis: Get leader stats. path: /_plugins/_replication/leader_stats version: '>= 1.1' method: GET response: status: 200 + - synopsis: Get follower stats. path: /_plugins/_replication/follower_stats version: '>= 1.1' method: GET response: status: 200 + - synopsis: Get auto-follow stats. path: /_plugins/_replication/autofollow_stats version: '>= 1.1' method: GET response: status: 200 + - synopsis: Update settings. path: /_plugins/_replication/{index}/_update version: '>= 1.1' @@ -109,6 +162,7 @@ chapters: index.number_of_replicas: 2 response: status: 200 + - synopsis: Create replication rule. path: /_plugins/_replication/_autofollow version: '>= 1.1' @@ -123,6 +177,7 @@ chapters: follower_cluster_role: admin response: status: 200 + - synopsis: Delete replication rule. path: /_plugins/_replication/_autofollow version: '>= 1.1' @@ -132,4 +187,4 @@ chapters: leader_alias: my-connection-alias name: books response: - status: 200 \ No newline at end of file + status: 200