mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-04-24 15:17:30 -04:00
Add teardown
support for doc tests (#70831)
This adds named `teardown` support for doc tests similar to its support for named `setup` section. This is useful when many doc files want to share a similar `setup` AND `teardown`. I've introduced an example of this in the CCR docs just to prove its works. We expect we'll use it for datastreams as well. Closes #70830 Co-authored-by: James Rodewig <40268737+jrodewig@users.noreply.github.com>
This commit is contained in:
parent
2b9ed7d36f
commit
75342a2a71
5 changed files with 78 additions and 29 deletions
|
@ -1,27 +1,6 @@
|
|||
[role="xpack"]
|
||||
[testenv="platinum"]
|
||||
|
||||
//////////////////////////
|
||||
|
||||
[source,console]
|
||||
--------------------------------------------------
|
||||
PUT /follower_index/_ccr/follow?wait_for_active_shards=1
|
||||
{
|
||||
"remote_cluster" : "remote_cluster",
|
||||
"leader_index" : "leader_index"
|
||||
}
|
||||
--------------------------------------------------
|
||||
// TESTSETUP
|
||||
// TEST[setup:remote_cluster_and_leader_index]
|
||||
|
||||
[source,console]
|
||||
--------------------------------------------------
|
||||
POST /follower_index/_ccr/pause_follow
|
||||
--------------------------------------------------
|
||||
// TEARDOWN
|
||||
|
||||
//////////////////////////
|
||||
|
||||
[[ccr-managing]]
|
||||
=== Manage {ccr}
|
||||
Use the following information to manage {ccr} tasks, such as inspecting
|
||||
|
@ -135,6 +114,7 @@ PUT /follower_index/_ccr/follow?wait_for_active_shards=1
|
|||
"leader_index" : "leader_index"
|
||||
}
|
||||
----------------------------------------------------------------------
|
||||
// TEST[setup:remote_cluster_and_leader_index_and_follower_index teardown:pause_follow]
|
||||
====
|
||||
|
||||
[[ccr-terminate-replication]]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue