EmbyStat
EmbyStat copied to clipboard
test failure on arch linux
Bug report
Describe the bug One test fails when run on liniux
To Reproduce Steps to reproduce the behavior:
- download and extract the sources for the latest release (beta 24 in this case)
- run
dotnet test
in that directory - See the following error:
Test run for /home/sk/pkg/embystat_pkg/src/EmbyStat-0.2.0-beta.24/Tests.Unit/bin/Debug/netcoreapp3.1/Tests.Unit.dll(.NETCoreApp,Version=v3.1)
Microsoft (R) Test Execution Command Line Tool Version 16.3.0-dev+55e7e45431c9c05656c999b902686e7402664573
Copyright (c) Microsoft Corporation. All rights reserved.
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
[xUnit.net 00:00:05.86] Tests.Unit.Services.LogServiceTests.GetAnonymousLogStream_Should_Return_Log [FAIL]
X Tests.Unit.Services.LogServiceTests.GetAnonymousLogStream_Should_Return_Log [317ms]
Error Message:
Expected lines to be
"Log line: http://xxx.xxx.xxx.xxx:xxxx; ApiKey:xxxxxxxxxxxxxx; wss://xxx.xxx.xxx.xxx:xxxx; serverId:xxxxxxxxxxxxxx
" with a length of 115, but
"Log line: http://xxx.xxx.xxx.xxx:xxxx; ApiKey:xxxxxxxxxxxxxx; wss://xxx.xxx.xxx.xxx:xxxx; serverId:xxxxxxxxxxxxxx
" has a length of 114, differs near "
" (index 113).
Stack Trace:
at FluentAssertions.Execution.XUnit2TestFramework.Throw(String message)
at FluentAssertions.Execution.TestFrameworkProvider.Throw(String message)
at FluentAssertions.Execution.DefaultAssertionStrategy.HandleFailure(String message)
at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
at FluentAssertions.Execution.AssertionScope.FailWith(Func`1 failReasonFunc)
at FluentAssertions.Primitives.StringEqualityValidator.ValidateAgainstLengthDifferences()
at FluentAssertions.Primitives.StringValidator.Validate()
at FluentAssertions.Primitives.StringAssertions.Be(String expected, String because, Object[] becauseArgs)
at Tests.Unit.Services.LogServiceTests.GetAnonymousLogStream_Should_Return_Log() in /home/sk/pkg/embystat_pkg/src/EmbyStat-0.2.0-beta.24/Tests.Unit/Services/LogServiceTests.cs:line 147
Test Run Failed.
Total tests: 462
Passed: 461
Failed: 1
Total time: 14.8769 Seconds
Expected behavior All tests should pass
Screenshots N/A
System (please complete the following information):
- OS: Arch Linux
- Browser: N/A
- Version: 0.2.0-beta.24
- Media server type: N/A
Additional context I am writing a PKGBUILD with the intent of adding it to the AUR. Having the tests pass is needed to implement the recommended check function: https://wiki.archlinux.org/index.php/creating_packages#check()
Thanks for taking the time to create a PKGBUILD for it! Strange that this test is failing because it doesn't fail on my systems. Seems to me that the output strings are identical with a length of 115. I can have a look why this is failing. Maybe some weird stuff is happening when moving from a windows system to a unix system?
my guess is it expects a CRLF line ending (default for windows) but its only getting LF (default on linux)
thisd explain why the differs near
bit is split over 2 lines