From 0ec2695cce379e89322ceda3ca01681245e68e39 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Nov 2023 02:27:06 +0000 Subject: [PATCH 1/3] Bump xunit from 2.4.2 to 2.6.1 Bumps [xunit](https://github.com/xunit/xunit) from 2.4.2 to 2.6.1. - [Commits](https://github.com/xunit/xunit/compare/2.4.2...2.6.1) --- updated-dependencies: - dependency-name: xunit dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .../OpenSearch.OpenSearch.Xunit.csproj | 2 +- tests/Tests.Core/Tests.Core.csproj | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/abstractions/src/OpenSearch.OpenSearch.Xunit/OpenSearch.OpenSearch.Xunit.csproj b/abstractions/src/OpenSearch.OpenSearch.Xunit/OpenSearch.OpenSearch.Xunit.csproj index 319f144aa5..b333b85aff 100644 --- a/abstractions/src/OpenSearch.OpenSearch.Xunit/OpenSearch.OpenSearch.Xunit.csproj +++ b/abstractions/src/OpenSearch.OpenSearch.Xunit/OpenSearch.OpenSearch.Xunit.csproj @@ -8,7 +8,7 @@ true - + diff --git a/tests/Tests.Core/Tests.Core.csproj b/tests/Tests.Core/Tests.Core.csproj index 773568501c..3243ce950d 100644 --- a/tests/Tests.Core/Tests.Core.csproj +++ b/tests/Tests.Core/Tests.Core.csproj @@ -15,7 +15,7 @@ - + From 2ddd580f376245f2c2655b8ba14883a91fb8cbdb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" Date: Mon, 6 Nov 2023 02:27:39 +0000 Subject: [PATCH 2/3] Update changelog Signed-off-by: dependabot[bot] --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e183e2c950..1629e92e6c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) - Bumps `xunit.runner.visualstudio` from 2.5.0 to 2.5.3 - Bumps `Octokit` from 7.1.0 to 8.1.1 - Bumps `FSharp.Core` from 7.0.400 to 7.0.401 +- Bumps `xunit` from 2.4.2 to 2.6.1 ## [1.5.0] ### Fixed @@ -110,4 +111,4 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) [Unreleased]: https://github.com/opensearch-project/opensearch-net/compare/v1.5.0...main [1.5.0]: https://github.com/opensearch-project/opensearch-net/compare/v1.4.0...v1.5.0 [1.4.0]: https://github.com/opensearch-project/opensearch-net/compare/v1.3.0...v1.4.0 -[1.3.0]: https://github.com/opensearch-project/opensearch-net/compare/v1.2.0...v1.3.0 +[1.3.0]: https://github.com/opensearch-project/opensearch-net/compare/v1.2.0...v1.3.0 \ No newline at end of file From 9808b63fe46181fe2c0bcd1bb501c7122664934f Mon Sep 17 00:00:00 2001 From: Thomas Farr Date: Tue, 7 Nov 2023 09:44:15 +1300 Subject: [PATCH 3/3] Replace usages of `Assert.True(false, msg)` with `Assert.Fail(msg)` Signed-off-by: Thomas Farr --- .../AutoExpandReplicas/AutoExpandReplicasTests.cs | 8 ++++---- .../GetIndexSettings/GetIndexSettingsApiTests.cs | 2 +- tests/Tests/Search/Request/HighlightingUsageTests.cs | 2 +- .../HighlightingUsageTestsWithMaxAnalyzerOffset.cs | 6 +++--- .../Tests/Search/Request/SourceFilteringUsageTests.cs | 10 +++++----- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/Tests/CommonOptions/AutoExpandReplicas/AutoExpandReplicasTests.cs b/tests/Tests/CommonOptions/AutoExpandReplicas/AutoExpandReplicasTests.cs index 7e2ea2acea..839b1e6bee 100644 --- a/tests/Tests/CommonOptions/AutoExpandReplicas/AutoExpandReplicasTests.cs +++ b/tests/Tests/CommonOptions/AutoExpandReplicas/AutoExpandReplicasTests.cs @@ -55,7 +55,7 @@ public void ImplicitConversionFromMinAndMaxString() autoExpandReplicas.MinReplicas.Should().Be(0); autoExpandReplicas.MaxReplicas.Match( i => i.Should().Be(5), - s => Assert.True(false, "expecting a match on integer")); + s => Assert.Fail("expecting a match on integer")); autoExpandReplicas.ToString().Should().Be(minAndMax); } @@ -69,7 +69,7 @@ public void ImplicitConversionFromMinAndAllString() autoExpandReplicas.Enabled.Should().BeTrue(); autoExpandReplicas.MinReplicas.Should().Be(0); autoExpandReplicas.MaxReplicas.Match( - i => Assert.True(false, "expecting a match on string"), + i => Assert.Fail("expecting a match on string"), s => s.Should().Be("all")); autoExpandReplicas.ToString().Should().Be(minAndMax); @@ -84,7 +84,7 @@ public void CreateWithMinAndMax() autoExpandReplicas.MinReplicas.Should().Be(2); autoExpandReplicas.MaxReplicas.Match( i => i.Should().Be(3), - s => Assert.True(false, "expecting a match on integer")); + s => Assert.Fail("expecting a match on integer")); autoExpandReplicas.ToString().Should().Be("2-3"); } @@ -97,7 +97,7 @@ public void CreateWithMinAndAll() autoExpandReplicas.Enabled.Should().BeTrue(); autoExpandReplicas.MinReplicas.Should().Be(0); autoExpandReplicas.MaxReplicas.Match( - i => Assert.True(false, "expecting a match on string"), + i => Assert.Fail("expecting a match on string"), s => s.Should().Be("all")); autoExpandReplicas.ToString().Should().Be("0-all"); diff --git a/tests/Tests/Indices/IndexSettings/GetIndexSettings/GetIndexSettingsApiTests.cs b/tests/Tests/Indices/IndexSettings/GetIndexSettings/GetIndexSettingsApiTests.cs index 57c9b8e9c4..208a7d3c8c 100644 --- a/tests/Tests/Indices/IndexSettings/GetIndexSettings/GetIndexSettingsApiTests.cs +++ b/tests/Tests/Indices/IndexSettings/GetIndexSettings/GetIndexSettingsApiTests.cs @@ -82,7 +82,7 @@ protected override void ExpectResponse(GetIndexSettingsResponse response) index.Settings.AutoExpandReplicas.Should().NotBeNull(); index.Settings.AutoExpandReplicas.MinReplicas.Should().Be(0); index.Settings.AutoExpandReplicas.MaxReplicas.Match( - i => { Assert.True(false, "expecting a string"); }, + i => { Assert.Fail("expecting a string"); }, s => s.Should().Be("all")); index.Settings.AutoExpandReplicas.ToString().Should().Be("0-all"); } diff --git a/tests/Tests/Search/Request/HighlightingUsageTests.cs b/tests/Tests/Search/Request/HighlightingUsageTests.cs index 7a05eee5a3..491475435d 100644 --- a/tests/Tests/Search/Request/HighlightingUsageTests.cs +++ b/tests/Tests/Search/Request/HighlightingUsageTests.cs @@ -298,7 +298,7 @@ protected override void ExpectResponse(ISearchResponse response) } } else - Assert.True(false, $"highlights contains unexpected key {highlightField.Key}"); + Assert.Fail($"highlights contains unexpected key {highlightField.Key}"); } } } diff --git a/tests/Tests/Search/Request/HighlightingUsageTestsWithMaxAnalyzerOffset.cs b/tests/Tests/Search/Request/HighlightingUsageTestsWithMaxAnalyzerOffset.cs index 63faf46347..ffe5b5ddff 100644 --- a/tests/Tests/Search/Request/HighlightingUsageTestsWithMaxAnalyzerOffset.cs +++ b/tests/Tests/Search/Request/HighlightingUsageTestsWithMaxAnalyzerOffset.cs @@ -154,8 +154,8 @@ public HighlightingUsageTestsWithMaxAnalyzerOffset(ReadOnlyCluster cluster, Endp }; protected override Func, ISearchRequest> Fluent => s => s - - + + .Query(q => q .Match(m => m .Field(f => f.Name.Suffix("standard")) @@ -308,7 +308,7 @@ protected override void ExpectResponse(ISearchResponse response) } } else - Assert.True(false, $"highlights contains unexpected key {highlightField.Key}"); + Assert.Fail($"highlights contains unexpected key {highlightField.Key}"); } } } diff --git a/tests/Tests/Search/Request/SourceFilteringUsageTests.cs b/tests/Tests/Search/Request/SourceFilteringUsageTests.cs index 30a80db089..7639ac9767 100644 --- a/tests/Tests/Search/Request/SourceFilteringUsageTests.cs +++ b/tests/Tests/Search/Request/SourceFilteringUsageTests.cs @@ -133,7 +133,7 @@ public void CanDeserializeBoolean() falseCase.SourceFilter.Should().NotBeNull(); falseCase.SourceFilter.Match (b => b.Should().BeFalse(), - f => Assert.True(false, "Expected bool but found ISourceFilter") + f => Assert.Fail("Expected bool but found ISourceFilter") ); var trueCase = Expect("{ \"_source\": true }").DeserializesTo(); @@ -141,7 +141,7 @@ public void CanDeserializeBoolean() trueCase.SourceFilter.Should().NotBeNull(); trueCase.SourceFilter.Match (b => b.Should().BeTrue(), - f => Assert.True(false, "Expected bool but found ISourceFilter") + f => Assert.Fail("Expected bool but found ISourceFilter") ); } @@ -151,7 +151,7 @@ public void CanDeserializeArray() var o = Expect("{ \"_source\": [\"obj.*\"] }").DeserializesTo(); o.Should().NotBeNull(); o.SourceFilter.Match( - b => Assert.True(false, "Expected ISourceFilter but found bool"), + b => Assert.Fail("Expected ISourceFilter but found bool"), f => { f.Should().NotBeNull(); @@ -166,7 +166,7 @@ public void CanDeserializeString() var o = Expect("{ \"_source\": \"obj.*\" }").DeserializesTo(); o.Should().NotBeNull(); o.SourceFilter.Match( - b => Assert.True(false, "Expected ISourceFilter but found bool"), + b => Assert.Fail("Expected ISourceFilter but found bool"), f => { f.Should().NotBeNull(); @@ -181,7 +181,7 @@ public void CanDeserializeObject() var o = Expect("{ \"_source\": { \"includes\": [\"obj.*\"], \"excludes\": [\"foo.*\"] } }").DeserializesTo(); o.Should().NotBeNull(); o.SourceFilter.Match( - b => Assert.True(false, "Expected ISourceFilter but found bool"), + b => Assert.Fail("Expected ISourceFilter but found bool"), f => { f.Should().NotBeNull();