Skip to content

Commit 9529b4f

Browse files
committed
Tests: Use nominal payload for get_alias
1 parent 568cdf7 commit 9529b4f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

internal/testing/e2e/elasticsearch_integration_test.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ import (
2626
"crypto/tls"
2727
"crypto/x509"
2828
"encoding/json"
29-
"errors"
3029
"fmt"
3130
"log"
3231
"net"
@@ -331,9 +330,9 @@ func TestElasticsearchIntegration(t *testing.T) {
331330
}
332331

333332
// Same faulty index name with error handling
334-
_, err = es.Get("non-existent-index", "9999").Do(context.Background())
335-
if !errors.As(err, &types.ElasticsearchError{}) && !errors.Is(err, &types.ElasticsearchError{Status: 404}) {
336-
t.Fatalf("expected ElasticsearchError, got: %v", err)
333+
indexget, err := es.Get("non-existent-index", "9999").Do(context.Background())
334+
if indexget.Found == true {
335+
t.Fatalf("expected Found to be false, got: %v", indexget)
337336
}
338337

339338
// Simple search matching name

0 commit comments

Comments
 (0)