-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for retry in prologues/epilogues, added replication tes…
…ts. (#713) Signed-off-by: dblock <[email protected]> Signed-off-by: Thomas Farr <[email protected]> Co-authored-by: Thomas Farr <[email protected]>
- Loading branch information
Showing
16 changed files
with
583 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
$schema: ../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test replication APIs specs. | ||
version: '>= 1.1' | ||
prologues: | ||
- path: /{index} | ||
method: PUT | ||
parameters: | ||
index: movies | ||
request: | ||
payload: {} | ||
- path: /_bulk | ||
method: POST | ||
parameters: | ||
refresh: true | ||
request: | ||
content_type: application/x-ndjson | ||
payload: | ||
- {create: {_index: movies, _id: movie_1392214}} | ||
- {director: Bennett Miller, title: Moneyball, year: 2011} | ||
- {create: {_index: movies, _id: movie_1392215}} | ||
- {director: Badge Dale, title: The Secret Soldiers, year: 2016} | ||
- path: /_cluster/settings | ||
method: PUT | ||
request: | ||
payload: | ||
persistent: | ||
cluster: | ||
remote: | ||
leader-cluster: | ||
seeds: ['172.22.0.3:9300'] | ||
- path: /_plugins/_replication/{index}/_start | ||
method: PUT | ||
parameters: | ||
index: movies-names | ||
request: | ||
payload: | ||
leader_alias: leader-cluster | ||
leader_index: movies | ||
use_roles: | ||
leader_cluster_role: all_access | ||
follower_cluster_role: all_access | ||
- path: /_plugins/_replication/_autofollow | ||
method: POST | ||
request: | ||
payload: | ||
leader_alias: leader-cluster | ||
name: movies | ||
pattern: 'movies-*' | ||
use_roles: | ||
leader_cluster_role: leader_role | ||
follower_cluster_role: admin | ||
epilogues: | ||
- path: /_plugins/_replication/_autofollow | ||
method: DELETE | ||
request: | ||
payload: | ||
leader_alias: leader-cluster | ||
name: movies | ||
status: [200, 404] | ||
- path: /_plugins/_replication/{index}/_stop | ||
method: POST | ||
parameters: | ||
index: movies-names | ||
request: | ||
payload: {} | ||
- path: /movies-names | ||
method: DELETE | ||
status: [200, 404] | ||
- path: /movies | ||
method: DELETE | ||
status: [200, 404] | ||
chapters: | ||
- synopsis: Get auto-follow stats. | ||
path: /_plugins/_replication/autofollow_stats | ||
method: GET | ||
response: | ||
status: 200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
$schema: ../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test pausing a replication. | ||
version: '>= 1.1' | ||
warnings: | ||
multiple-paths-detected: false | ||
prologues: | ||
- path: /_bulk | ||
method: POST | ||
parameters: | ||
refresh: true | ||
request: | ||
content_type: application/x-ndjson | ||
payload: | ||
- {create: {_index: music, _id: music_1392214}} | ||
- {author: Selena Gomez, title: Love you like a love song, year: 2011} | ||
- {create: {_index: music, _id: music_1392215}} | ||
- {author: Justin Bieber, title: Baby, year: 2010} | ||
- path: /_cluster/settings | ||
method: PUT | ||
request: | ||
payload: | ||
persistent: | ||
cluster: | ||
remote: | ||
leader-cluster: | ||
seeds: ['172.22.0.3:9300'] | ||
- path: /_plugins/_replication/{index}/_start | ||
method: PUT | ||
parameters: | ||
index: music-names | ||
request: | ||
payload: | ||
leader_alias: leader-cluster | ||
leader_index: music | ||
use_roles: | ||
leader_cluster_role: all_access | ||
follower_cluster_role: all_access | ||
epilogues: | ||
- path: /_plugins/_replication/{index}/_stop | ||
method: POST | ||
parameters: | ||
index: music-names | ||
request: | ||
payload: {} | ||
- path: /music-names | ||
method: DELETE | ||
status: [200, 404] | ||
- path: /music | ||
method: DELETE | ||
status: [200, 404] | ||
chapters: | ||
- synopsis: Pause replication. | ||
path: /_plugins/_replication/{index}/_pause | ||
method: POST | ||
retry: | ||
count: 3 | ||
parameters: | ||
index: music-names | ||
request: | ||
payload: {} | ||
response: | ||
status: 200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
$schema: ../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test pausing a replication. | ||
version: '>= 1.1' | ||
warnings: | ||
multiple-paths-detected: false | ||
prologues: | ||
- path: /_bulk | ||
method: POST | ||
parameters: | ||
refresh: true | ||
request: | ||
content_type: application/x-ndjson | ||
payload: | ||
- {create: {_index: music, _id: music_1392214}} | ||
- {author: Selena Gomez, title: Love you like a love song, year: 2011} | ||
- {create: {_index: music, _id: music_1392215}} | ||
- {author: Justin Bieber, title: Baby, year: 2010} | ||
- path: /_cluster/settings | ||
method: PUT | ||
request: | ||
payload: | ||
persistent: | ||
cluster: | ||
remote: | ||
leader-cluster: | ||
seeds: ['172.22.0.3:9300'] | ||
- path: /_plugins/_replication/{index}/_start | ||
method: PUT | ||
parameters: | ||
index: music-names | ||
request: | ||
payload: | ||
leader_alias: leader-cluster | ||
leader_index: music | ||
use_roles: | ||
leader_cluster_role: all_access | ||
follower_cluster_role: all_access | ||
- path: /_plugins/_replication/music-names/_pause | ||
method: POST | ||
retry: | ||
count: 3 | ||
request: | ||
payload: {} | ||
epilogues: | ||
- path: /_plugins/_replication/{index}/_stop | ||
method: POST | ||
parameters: | ||
index: music-names | ||
request: | ||
payload: {} | ||
- path: /music-names | ||
method: DELETE | ||
status: [200, 404] | ||
- path: /music | ||
method: DELETE | ||
status: [200, 404] | ||
chapters: | ||
- synopsis: Resume replication. | ||
path: /_plugins/_replication/{index}/_resume | ||
method: POST | ||
retry: | ||
count: 3 | ||
parameters: | ||
index: music-names | ||
request: | ||
payload: {} | ||
response: | ||
status: 200 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
$schema: ../../../json_schemas/test_story.schema.yaml | ||
|
||
description: Test starting replication. | ||
version: '>= 1.1' | ||
prologues: | ||
- path: /_bulk | ||
method: POST | ||
parameters: | ||
refresh: true | ||
request: | ||
content_type: application/x-ndjson | ||
payload: | ||
- {create: {_index: books, _id: book_1392214}} | ||
- {author: Harper Lee, title: To Kill a Mockingbird, year: 1960} | ||
- {create: {_index: books, _id: book_1392215}} | ||
- {author: Elizabeth Rudnick, title: Beauty and the Beast, year: 1991} | ||
- path: /_cluster/settings | ||
method: PUT | ||
request: | ||
payload: | ||
persistent: | ||
cluster: | ||
remote: | ||
leader-cluster: | ||
seeds: ['172.22.0.3:9300'] | ||
epilogues: | ||
- path: /_plugins/_replication/{index}/_stop | ||
method: POST | ||
parameters: | ||
index: books-names | ||
request: | ||
payload: {} | ||
- path: /books-names | ||
method: DELETE | ||
status: [200, 404] | ||
- path: /books | ||
method: DELETE | ||
status: [200, 404] | ||
chapters: | ||
- synopsis: Start replication. | ||
path: /_plugins/_replication/{index}/_start | ||
method: PUT | ||
parameters: | ||
index: books-names | ||
request: | ||
payload: | ||
leader_alias: leader-cluster | ||
leader_index: books | ||
use_roles: | ||
leader_cluster_role: all_access | ||
follower_cluster_role: all_access | ||
response: | ||
status: 200 |
Oops, something went wrong.