Skip to content

Commit

Permalink
chore: added additional test to see if map[string]bool works correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
sarwaan001 committed Dec 29, 2024
1 parent bf45fdc commit 309cd67
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions es_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1407,6 +1407,29 @@ func TestSnapshotAllIndicesWithAdditionalParameters(t *testing.T) {
}
}

func TestSnapshotAllIndicesWithAdditionalParametersIncludeGlobalState(t *testing.T) {
testSetup := &ServerSetup{
Method: "PUT",
Path: "/_snapshot/backup-repo/snapshot1",
Body: `{"include_global_state":true}`,
Response: `{"acknowledged": true }`,
}

host, port, ts := setupTestServers(t, []*ServerSetup{testSetup})
defer ts.Close()
client := NewClient(host, port)

bodyParams := map[string]interface{}{
"include_global_state": true,
}

err := client.SnapshotAllIndicesWithBodyParams("backup-repo", "snapshot1", bodyParams)

if err != nil {
t.Fatalf("Got error taking snapshot: %s", err)
}
}

func TestSnapshotAllIndicesWithAdditionalParametersErr(t *testing.T) {
testSetup := &ServerSetup{
Method: "PUT",
Expand Down

0 comments on commit 309cd67

Please sign in to comment.