From 0115e463bfcabde79b84b41ede88fd3a3dfa673e Mon Sep 17 00:00:00 2001 From: Shaunak Kashyap Date: Mon, 21 Oct 2024 17:32:44 -0700 Subject: [PATCH] [Integration testing] Remove AltErr and only expect 400 from ES bulk API (#4012) * Remove AltErr * Fixed error type (cherry picked from commit 1ae9ab648ceb0d28ecc337746e786c0a2bd16351) # Conflicts: # internal/pkg/bulk/bulk_integration_test.go --- internal/pkg/bulk/bulk_integration_test.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/internal/pkg/bulk/bulk_integration_test.go b/internal/pkg/bulk/bulk_integration_test.go index 923cf4166..887742573 100644 --- a/internal/pkg/bulk/bulk_integration_test.go +++ b/internal/pkg/bulk/bulk_integration_test.go @@ -69,8 +69,13 @@ func TestBulkCreate(t *testing.T) { Name: "Invalid utf-8", Index: string([]byte{0xfe, 0xfe, 0xff, 0xff}), Err: es.ErrElastic{ +<<<<<<< HEAD Status: 500, Type: "json_parse_exception", +======= + Status: 400, + Type: "parse_exception", +>>>>>>> 1ae9ab6 ([Integration testing] Remove AltErr and only expect 400 from ES bulk API (#4012)) }, }, { @@ -100,7 +105,11 @@ func TestBulkCreate(t *testing.T) { // Create id, err := bulker.Create(ctx, test.Index, test.ID, sampleData) if !EqualElastic(test.Err, err) { +<<<<<<< HEAD t.Fatal(err) +======= + t.Fatalf("expected error: %+v, got: %+v", test.Err, err) +>>>>>>> 1ae9ab6 ([Integration testing] Remove AltErr and only expect 400 from ES bulk API (#4012)) } if err != nil { return