Skip to content
This repository was archived by the owner on Apr 15, 2025. It is now read-only.

Commit 309cd67

Browse files
committed
chore: added additional test to see if map[string]bool works correctly
1 parent bf45fdc commit 309cd67

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

es_test.go

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1407,6 +1407,29 @@ func TestSnapshotAllIndicesWithAdditionalParameters(t *testing.T) {
14071407
}
14081408
}
14091409

1410+
func TestSnapshotAllIndicesWithAdditionalParametersIncludeGlobalState(t *testing.T) {
1411+
testSetup := &ServerSetup{
1412+
Method: "PUT",
1413+
Path: "/_snapshot/backup-repo/snapshot1",
1414+
Body: `{"include_global_state":true}`,
1415+
Response: `{"acknowledged": true }`,
1416+
}
1417+
1418+
host, port, ts := setupTestServers(t, []*ServerSetup{testSetup})
1419+
defer ts.Close()
1420+
client := NewClient(host, port)
1421+
1422+
bodyParams := map[string]interface{}{
1423+
"include_global_state": true,
1424+
}
1425+
1426+
err := client.SnapshotAllIndicesWithBodyParams("backup-repo", "snapshot1", bodyParams)
1427+
1428+
if err != nil {
1429+
t.Fatalf("Got error taking snapshot: %s", err)
1430+
}
1431+
}
1432+
14101433
func TestSnapshotAllIndicesWithAdditionalParametersErr(t *testing.T) {
14111434
testSetup := &ServerSetup{
14121435
Method: "PUT",

0 commit comments

Comments
 (0)