aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorcvium <clausvium@gmail.com>2022-01-11 23:30:30 +0100
committercvium <clausvium@gmail.com>2022-01-11 23:30:30 +0100
commit6ffa9539bbfbfb1090b02cebc8a28283a8c69041 (patch)
tree13f4a1d968780f90cd7d0c99e422970117a380f0 /tests
parentc658a883a2bc84b46ed73d209d2983e8a324cdce (diff)
Refactor and add scheduled task
Diffstat (limited to 'tests')
-rw-r--r--tests/Jellyfin.MediaEncoding.Hls.Tests/Playlist/DynamicHlsPlaylistGeneratorTests.cs6
-rw-r--r--tests/Jellyfin.MediaEncoding.Keyframes.Tests/FfProbe/FfProbeKeyframeExtractorTests.cs2
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/Jellyfin.MediaEncoding.Hls.Tests/Playlist/DynamicHlsPlaylistGeneratorTests.cs b/tests/Jellyfin.MediaEncoding.Hls.Tests/Playlist/DynamicHlsPlaylistGeneratorTests.cs
index 264fb6f4c..79648c4f6 100644
--- a/tests/Jellyfin.MediaEncoding.Hls.Tests/Playlist/DynamicHlsPlaylistGeneratorTests.cs
+++ b/tests/Jellyfin.MediaEncoding.Hls.Tests/Playlist/DynamicHlsPlaylistGeneratorTests.cs
@@ -38,8 +38,8 @@ namespace Jellyfin.MediaEncoding.Hls.Tests.Playlist
[Theory]
[InlineData("testfile.mkv", new string[0], false)]
- [InlineData("testfile.flv", new[] { "mp4", "mkv", "ts" }, false)]
- [InlineData("testfile.flv", new[] { "mp4", "mkv", "ts", "flv" }, true)]
+ [InlineData("testfile.flv", new[] { ".mp4", ".mkv", ".ts" }, false)]
+ [InlineData("testfile.flv", new[] { ".mp4", ".mkv", ".ts", ".flv" }, true)]
[InlineData("/some/arbitrarily/long/path/testfile.mkv", new[] { "mkv" }, true)]
public void IsExtractionAllowedForFile_Valid_Success(string filePath, string[] allowedExtensions, bool isAllowed)
{
@@ -47,7 +47,7 @@ namespace Jellyfin.MediaEncoding.Hls.Tests.Playlist
}
[Theory]
- [InlineData("testfile", new[] { "mp4" })]
+ [InlineData("testfile", new[] { ".mp4" })]
public void IsExtractionAllowedForFile_Invalid_ReturnsFalse(string filePath, string[] allowedExtensions)
{
Assert.False(DynamicHlsPlaylistGenerator.IsExtractionAllowedForFile(filePath, allowedExtensions));
diff --git a/tests/Jellyfin.MediaEncoding.Keyframes.Tests/FfProbe/FfProbeKeyframeExtractorTests.cs b/tests/Jellyfin.MediaEncoding.Keyframes.Tests/FfProbe/FfProbeKeyframeExtractorTests.cs
index e410fa29f..e5debf8c0 100644
--- a/tests/Jellyfin.MediaEncoding.Keyframes.Tests/FfProbe/FfProbeKeyframeExtractorTests.cs
+++ b/tests/Jellyfin.MediaEncoding.Keyframes.Tests/FfProbe/FfProbeKeyframeExtractorTests.cs
@@ -13,7 +13,7 @@ namespace Jellyfin.MediaEncoding.Keyframes.FfProbe
{
var testDataPath = Path.Combine("FfProbe/Test Data", testDataFileName);
var resultPath = Path.Combine("FfProbe/Test Data", resultFileName);
- var resultFileStream = File.OpenRead(resultPath);
+ using var resultFileStream = File.OpenRead(resultPath);
var expectedResult = JsonSerializer.Deserialize<KeyframeData>(resultFileStream)!;
using var fileStream = File.OpenRead(testDataPath);