Skip to content

Commit

Permalink
Removing opensearchapi.Error usage from snapshot tests introduced in PR
Browse files Browse the repository at this point in the history
#237

Signed-off-by: Vacha Shah <vachshah@amazon.com>
  • Loading branch information
VachaShah committed May 18, 2023
1 parent 733f709 commit e3079ee
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions opensearchapi/opensearchapi_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import (
"bytes"
"context"
"encoding/json"
"errors"
"fmt"
"strings"
"testing"
Expand Down Expand Up @@ -225,13 +224,7 @@ func TestAPI(t *testing.T) {
opensearchDo := func(ctx context.Context, client *opensearch.Client, req opensearchapi.Request, msg string, t *testing.T) {
_, err := req.Do(ctx, client)
if err != nil {
var opensearchError *opensearchapi.Error
if errors.As(err, &opensearchError) {
if opensearchError.Err.Type == "snapshot_missing_exception" {
return
}
t.Fatalf("Failed to %s: %s", msg, err)
}
t.Fatalf("Error performing the request: %s\n", err)
}
}

Expand Down

0 comments on commit e3079ee

Please sign in to comment.