From faadeb2b5d090c9fb5e4c2eeab56dd682271e770 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 15:06:44 +0000 Subject: [PATCH 1/3] chore: Update snapshot.yml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Made with ❤️️ by updatecli --- dev-tools/integration/.env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev-tools/integration/.env b/dev-tools/integration/.env index a40ce013b..e14b0aaab 100644 --- a/dev-tools/integration/.env +++ b/dev-tools/integration/.env @@ -1,6 +1,6 @@ # If you use change this version without a pinned one, please update # .ci/bump-elastic-stack-snapshot.yml or .github/workflows/bump-golang.yml -ELASTICSEARCH_VERSION=9.0.0-070836bc-SNAPSHOT +ELASTICSEARCH_VERSION=9.0.0-b49e55df-SNAPSHOT ELASTICSEARCH_USERNAME=elastic ELASTICSEARCH_PASSWORD=changeme TEST_ELASTICSEARCH_HOSTS=localhost:9200 From 172d693040a7a02fe6d3ead9712e336d78cf009e Mon Sep 17 00:00:00 2001 From: michel-laterman Date: Tue, 15 Oct 2024 12:20:33 -0700 Subject: [PATCH 2/3] Fix broken integration test --- internal/pkg/bulk/bulk_integration_test.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/internal/pkg/bulk/bulk_integration_test.go b/internal/pkg/bulk/bulk_integration_test.go index 47074d1a3..3b5a4f097 100644 --- a/internal/pkg/bulk/bulk_integration_test.go +++ b/internal/pkg/bulk/bulk_integration_test.go @@ -75,7 +75,7 @@ func TestBulkCreate(t *testing.T) { }, AltErr: es.ErrElastic{ Status: 400, - Type: "json_parse_exception", + Type: "parse_exception", }, }, { @@ -104,10 +104,8 @@ func TestBulkCreate(t *testing.T) { // Create id, err := bulker.Create(ctx, test.Index, test.ID, sampleData) - if !EqualElastic(test.Err, err) { - if test.AltErr == nil || !EqualElastic(test.AltErr, err) { - t.Fatalf("expected error: %+v, got: %+v", test.Err, err) - } + if !EqualElastic(test.Err, err) || (test.AltErr != nil && !EqualElastic(test.AltErr, err)) { + t.Fatalf("expected error: %+v (alt: %+v), got: %+v", test.Err, test.AltErr, err) } if err != nil { return From 591b54c348fab9a89c65b064a193c3198c42503b Mon Sep 17 00:00:00 2001 From: michel-laterman Date: Tue, 15 Oct 2024 13:02:30 -0700 Subject: [PATCH 3/3] fix condition --- internal/pkg/bulk/bulk_integration_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/pkg/bulk/bulk_integration_test.go b/internal/pkg/bulk/bulk_integration_test.go index 3b5a4f097..2ad1c0a41 100644 --- a/internal/pkg/bulk/bulk_integration_test.go +++ b/internal/pkg/bulk/bulk_integration_test.go @@ -104,8 +104,10 @@ func TestBulkCreate(t *testing.T) { // Create id, err := bulker.Create(ctx, test.Index, test.ID, sampleData) - if !EqualElastic(test.Err, err) || (test.AltErr != nil && !EqualElastic(test.AltErr, err)) { - t.Fatalf("expected error: %+v (alt: %+v), got: %+v", test.Err, test.AltErr, err) + if !EqualElastic(test.Err, err) { + if test.AltErr == nil || !EqualElastic(test.AltErr, err) { + t.Fatalf("expected error: %+v (alt: %+v), got: %+v", test.Err, test.AltErr, err) + } } if err != nil { return