From d4e21df620188083674e72c47321b470178474c0 Mon Sep 17 00:00:00 2001 From: Russ Cam Date: Wed, 15 Apr 2020 11:22:12 +1000 Subject: [PATCH] Fix InvalidSearchApiTests expected status code and message This commit updates the expected status code and error reason assertion for the InvalidSearchApiTests. --- tests/Tests/Search/Search/InvalidSearchApiTests.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/Tests/Search/Search/InvalidSearchApiTests.cs b/tests/Tests/Search/Search/InvalidSearchApiTests.cs index fe188019b4b..1c6558455b5 100644 --- a/tests/Tests/Search/Search/InvalidSearchApiTests.cs +++ b/tests/Tests/Search/Search/InvalidSearchApiTests.cs @@ -38,7 +38,7 @@ public InvalidSearchApiTests(ReadOnlyCluster cluster, EndpointUsage usage) : bas } }; - protected override int ExpectStatusCode => 400; + protected override int ExpectStatusCode => 500; protected override Func, ISearchRequest> Fluent => s => s .From(10) @@ -67,9 +67,9 @@ protected override void ExpectResponse(ISearchResponse response) response.ShouldNotBeValid(); var serverError = response.ServerError; serverError.Should().NotBeNull(); - serverError.Status.Should().Be(400); + serverError.Status.Should().Be(ExpectStatusCode); serverError.Error.Reason.Should().Be("all shards failed"); - serverError.Error.RootCause.First().Reason.Should().Contain("[-1m]"); + serverError.Error.RootCause.First().Reason.Should().Contain("value source config is invalid"); } } }