Skip to content

Commit

Permalink
Bump xunit from 2.4.2 to 2.6.1 (opensearch-project#416)
Browse files Browse the repository at this point in the history
* 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](xunit/xunit@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] <[email protected]>

* Update changelog

Signed-off-by: dependabot[bot] <[email protected]>

* Replace usages of `Assert.True(false, msg)` with `Assert.Fail(msg)`

Signed-off-by: Thomas Farr <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Signed-off-by: Thomas Farr <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <dependabot[bot]@users.noreply.github.com>
Co-authored-by: Thomas Farr <[email protected]>
  • Loading branch information
3 people authored Nov 6, 2023
1 parent 232594d commit 91117e4
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 16 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 9.0.0
- 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit" Version="2.6.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\OpenSearch.OpenSearch.Ephemeral\OpenSearch.OpenSearch.Ephemeral.csproj" />
Expand Down
2 changes: 1 addition & 1 deletion tests/Tests.Core/Tests.Core.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<ProjectReference Include="$(SolutionRoot)\tests\Tests.Domain\Tests.Domain.csproj" />
<PackageReference Include="Microsoft.TestPlatform.ObjectModel" Version="17.7.2" />

<PackageReference Include="xunit" Version="2.4.2" />
<PackageReference Include="xunit" Version="2.6.1" />
<ProjectReference Include="$(SolutionRoot)\abstractions\src\OpenSearch.OpenSearch.Xunit\OpenSearch.OpenSearch.Xunit.csproj" />
<PackageReference Include="JunitXml.TestLogger" Version="3.0.134" />

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -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);
Expand All @@ -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");
}
Expand All @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
Expand Down
2 changes: 1 addition & 1 deletion tests/Tests/Search/Request/HighlightingUsageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ protected override void ExpectResponse(ISearchResponse<Project> response)
}
}
else
Assert.True(false, $"highlights contains unexpected key {highlightField.Key}");
Assert.Fail($"highlights contains unexpected key {highlightField.Key}");
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ public HighlightingUsageTestsWithMaxAnalyzerOffset(ReadOnlyCluster cluster, Endp
};

protected override Func<SearchDescriptor<Project>, ISearchRequest> Fluent => s => s


.Query(q => q
.Match(m => m
.Field(f => f.Name.Suffix("standard"))
Expand Down Expand Up @@ -308,7 +308,7 @@ protected override void ExpectResponse(ISearchResponse<Project> response)
}
}
else
Assert.True(false, $"highlights contains unexpected key {highlightField.Key}");
Assert.Fail($"highlights contains unexpected key {highlightField.Key}");
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions tests/Tests/Search/Request/SourceFilteringUsageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,15 @@ 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<WithSourceFilterProperty>();
trueCase.Should().NotBeNull();
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")
);
}

Expand All @@ -151,7 +151,7 @@ public void CanDeserializeArray()
var o = Expect("{ \"_source\": [\"obj.*\"] }").DeserializesTo<WithSourceFilterProperty>();
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();
Expand All @@ -166,7 +166,7 @@ public void CanDeserializeString()
var o = Expect("{ \"_source\": \"obj.*\" }").DeserializesTo<WithSourceFilterProperty>();
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();
Expand All @@ -181,7 +181,7 @@ public void CanDeserializeObject()
var o = Expect("{ \"_source\": { \"includes\": [\"obj.*\"], \"excludes\": [\"foo.*\"] } }").DeserializesTo<WithSourceFilterProperty>();
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();
Expand Down

0 comments on commit 91117e4

Please sign in to comment.