Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade test package dependencies #119

Merged
merged 3 commits into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
</PropertyGroup>
<ItemGroup>
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="FluentAssertions" Version="5.9.0" />
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.ServiceFabric.Services" Version="$(NugetPkg_Version_Microsoft_ServiceFabric_Services)" />
<PackageReference Include="Moq" Version="4.13.0" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.9.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PackageReference Include="Moq" Version="4.20.70" />
<PackageReference Include="xunit" Version="2.8.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,10 @@ public static IEnumerable<object[]> HostTypes
/// when constructing url before returning to Naming Service.
/// </summary>
/// <param name="hostType">The type of host used to create the listener.</param>
/// <returns>A <see cref="Task"/> tracking asynchronous test completion.</returns>
[Theory]
[MemberData(nameof(HostTypes))]
public void VerifyReturnCode410(string hostType)
public async Task VerifyReturnCode410(string hostType)
{
var nextCalled = false;

Expand All @@ -86,7 +87,7 @@ public void VerifyReturnCode410(string hostType)

// send a request in which Path is different than urlSuffix
this.httpContext.Request.Path = this.listener.UrlSuffix + "xyz";
middleware.Invoke(this.httpContext).GetAwaiter().GetResult();
await middleware.Invoke(this.httpContext);

this.httpContext.Response.StatusCode.Should().Be(StatusCodes.Status410Gone, "status code should be 410 when path base is different from url suffix.");
nextCalled.Should().BeFalse("next RequestDelegate is not called by middleware.");
Expand Down