Skip to content

Commit 514c624

Browse files
authored
Fix InvalidSearchApiTests expected status code and message (#4590)
This commit updates the expected status code and error reason assertion for the InvalidSearchApiTests.
1 parent 1fcc178 commit 514c624

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/Tests/Search/Search/InvalidSearchApiTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public InvalidSearchApiTests(ReadOnlyCluster cluster, EndpointUsage usage) : bas
3838
}
3939
};
4040

41-
protected override int ExpectStatusCode => 400;
41+
protected override int ExpectStatusCode => 500;
4242

4343
protected override Func<SearchDescriptor<Project>, ISearchRequest> Fluent => s => s
4444
.From(10)
@@ -67,9 +67,9 @@ protected override void ExpectResponse(ISearchResponse<Project> response)
6767
response.ShouldNotBeValid();
6868
var serverError = response.ServerError;
6969
serverError.Should().NotBeNull();
70-
serverError.Status.Should().Be(400);
70+
serverError.Status.Should().Be(ExpectStatusCode);
7171
serverError.Error.Reason.Should().Be("all shards failed");
72-
serverError.Error.RootCause.First().Reason.Should().Contain("[-1m]");
72+
serverError.Error.RootCause.First().Reason.Should().Contain("value source config is invalid");
7373
}
7474
}
7575
}

0 commit comments

Comments
 (0)