mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-07-01 11:23:36 +02:00
Fix Jellyfin.Networking.Tests (#10055)
This commit is contained in:
parent
148c86ee0d
commit
d3c7af0d5c
|
@ -18,12 +18,7 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ProjectReference Include="../../Emby.Server.Implementations/Emby.Server.Implementations.csproj" />
|
<ProjectReference Include="../../Jellyfin.Networking/Jellyfin.Networking.csproj" />
|
||||||
<ProjectReference Include="../../MediaBrowser.Common/MediaBrowser.Common.csproj" />
|
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
|
||||||
<DefineConstants>DEBUG</DefineConstants>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -97,7 +97,7 @@ namespace Jellyfin.Networking.Tests
|
||||||
/// Checks if IPv4 address is within a defined subnet.
|
/// Checks if IPv4 address is within a defined subnet.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="netMask">Network mask.</param>
|
/// <param name="netMask">Network mask.</param>
|
||||||
/// <param name="IPAddress">IP Address.</param>
|
/// <param name="ipAddress">IP Address.</param>
|
||||||
[Theory]
|
[Theory]
|
||||||
[InlineData("192.168.5.85/24", "192.168.5.1")]
|
[InlineData("192.168.5.85/24", "192.168.5.1")]
|
||||||
[InlineData("192.168.5.85/24", "192.168.5.254")]
|
[InlineData("192.168.5.85/24", "192.168.5.254")]
|
||||||
|
@ -211,7 +211,7 @@ namespace Jellyfin.Networking.Tests
|
||||||
|
|
||||||
if (nm.TryParseInterface(result, out var resultObj))
|
if (nm.TryParseInterface(result, out var resultObj))
|
||||||
{
|
{
|
||||||
result = resultObj.First().Address.ToString();
|
result = resultObj[0].Address.ToString();
|
||||||
var intf = nm.GetBindAddress(source, out _);
|
var intf = nm.GetBindAddress(source, out _);
|
||||||
|
|
||||||
Assert.Equal(intf, result);
|
Assert.Equal(intf, result);
|
||||||
|
@ -270,7 +270,7 @@ namespace Jellyfin.Networking.Tests
|
||||||
if (nm.TryParseInterface(result, out IReadOnlyList<IPData>? resultObj) && resultObj is not null)
|
if (nm.TryParseInterface(result, out IReadOnlyList<IPData>? resultObj) && resultObj is not null)
|
||||||
{
|
{
|
||||||
// Parse out IPAddresses so we can do a string comparison (ignore subnet masks).
|
// Parse out IPAddresses so we can do a string comparison (ignore subnet masks).
|
||||||
result = resultObj.First().Address.ToString();
|
result = resultObj[0].Address.ToString();
|
||||||
}
|
}
|
||||||
|
|
||||||
var intf = nm.GetBindAddress(source, out int? _);
|
var intf = nm.GetBindAddress(source, out int? _);
|
||||||
|
|
Loading…
Reference in a new issue