mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-25 22:36:59 -04:00
Fixed: All the tests
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using RestSharp;
|
||||
|
||||
namespace NzbDrone.Integration.Test.Client
|
||||
{
|
||||
public class LogsClient : ClientBase
|
||||
{
|
||||
public LogsClient(IRestClient restClient, string apiKey)
|
||||
: base(restClient, apiKey, "log/file")
|
||||
{
|
||||
}
|
||||
|
||||
public string[] GetLogFileLines(string filename)
|
||||
{
|
||||
var request = BuildRequest(filename);
|
||||
var content = Execute(request, System.Net.HttpStatusCode.OK);
|
||||
|
||||
var lines = content.Split('\n');
|
||||
lines = Array.ConvertAll(lines, s => s.TrimEnd('\r'));
|
||||
Array.Resize(ref lines, lines.Length - 1);
|
||||
return lines;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user