Skip to content

Commit 71b7e14

Browse files
committed
Fix missing get-snapshots docs reference elastic#31645
This is related to elastic#31537. It fixes a missing docs references in get_snapshots.asciidoc.
1 parent cd1b120 commit 71b7e14

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

client/rest-high-level/src/test/java/org/elasticsearch/client/documentation/SnapshotClientDocumentationIT.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -466,9 +466,13 @@ public void testSnapshotGetSnapshots() throws IOException {
466466
createTestSnapshots();
467467

468468
// tag::get-snapshots-request
469-
GetSnapshotsRequest request = new GetSnapshotsRequest(repositoryName);
469+
GetSnapshotsRequest request = new GetSnapshotsRequest();
470470
// end::get-snapshots-request
471471

472+
// tag::get-snapshots-request-repositoryName
473+
request.repository(repositoryName);
474+
// end::get-snapshots-request-repositoryName
475+
472476
// tag::get-snapshots-request-snapshots
473477
String[] snapshots = { snapshotName };
474478
request.snapshots(snapshots); // <1>
@@ -500,13 +504,13 @@ public void testSnapshotGetSnapshots() throws IOException {
500504
public void testSnapshotGetSnapshotsAsync() throws InterruptedException {
501505
RestHighLevelClient client = highLevelClient();
502506
{
503-
GetSnapshotsRequest request = new GetSnapshotsRequest();
507+
GetSnapshotsRequest request = new GetSnapshotsRequest(repositoryName);
504508

505509
// tag::get-snapshots-execute-listener
506510
ActionListener<GetSnapshotsResponse> listener =
507511
new ActionListener<GetSnapshotsResponse>() {
508512
@Override
509-
public void onResponse(GetSnapshotsResponse deleteSnapshotResponse) {
513+
public void onResponse(GetSnapshotsResponse getSnapshotsResponse) {
510514
// <1>
511515
}
512516

0 commit comments

Comments
 (0)