|
|
@ -1,6 +1,6 @@
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
|
|
|
using NzbDrone.Common.Instrumentation;
|
|
|
|
|
|
|
|
using FluentAssertions;
|
|
|
|
using FluentAssertions;
|
|
|
|
|
|
|
|
using NUnit.Framework;
|
|
|
|
|
|
|
|
using NzbDrone.Common.Instrumentation;
|
|
|
|
|
|
|
|
|
|
|
|
namespace NzbDrone.Common.Test.InstrumentationTests
|
|
|
|
namespace NzbDrone.Common.Test.InstrumentationTests
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -17,9 +17,11 @@ namespace NzbDrone.Common.Test.InstrumentationTests
|
|
|
|
[TestCase(@"https://baconbits.org/feeds.php?feed=torrents_tv&user=12345&auth=2b51db35e1910123321025a12b9933d2&passkey=mySecret&authkey=2b51db35e1910123321025a12b9933d2")]
|
|
|
|
[TestCase(@"https://baconbits.org/feeds.php?feed=torrents_tv&user=12345&auth=2b51db35e1910123321025a12b9933d2&passkey=mySecret&authkey=2b51db35e1910123321025a12b9933d2")]
|
|
|
|
[TestCase(@"http://127.0.0.1:9117/dl/indexername?jackett_apikey=flwjiefewklfjacketmySecretsdfldskjfsdlk&path=we0re9f0sdfbase64sfdkfjsdlfjk&file=The+Torrent+File+Name.torrent")]
|
|
|
|
[TestCase(@"http://127.0.0.1:9117/dl/indexername?jackett_apikey=flwjiefewklfjacketmySecretsdfldskjfsdlk&path=we0re9f0sdfbase64sfdkfjsdlfjk&file=The+Torrent+File+Name.torrent")]
|
|
|
|
[TestCase(@"http://nzb.su/getnzb/2b51db35e1912ffc138825a12b9933d2.nzb&i=37292&r=2b51db35e1910123321025a12b9933d2")]
|
|
|
|
[TestCase(@"http://nzb.su/getnzb/2b51db35e1912ffc138825a12b9933d2.nzb&i=37292&r=2b51db35e1910123321025a12b9933d2")]
|
|
|
|
|
|
|
|
|
|
|
|
// NzbGet
|
|
|
|
// NzbGet
|
|
|
|
[TestCase(@"{ ""Name"" : ""ControlUsername"", ""Value"" : ""mySecret"" }, { ""Name"" : ""ControlPassword"", ""Value"" : ""mySecret"" }, ")]
|
|
|
|
[TestCase(@"{ ""Name"" : ""ControlUsername"", ""Value"" : ""mySecret"" }, { ""Name"" : ""ControlPassword"", ""Value"" : ""mySecret"" }, ")]
|
|
|
|
[TestCase(@"{ ""Name"" : ""Server1.Username"", ""Value"" : ""mySecret"" }, { ""Name"" : ""Server1.Password"", ""Value"" : ""mySecret"" }, ")]
|
|
|
|
[TestCase(@"{ ""Name"" : ""Server1.Username"", ""Value"" : ""mySecret"" }, { ""Name"" : ""Server1.Password"", ""Value"" : ""mySecret"" }, ")]
|
|
|
|
|
|
|
|
|
|
|
|
// Sabnzbd
|
|
|
|
// Sabnzbd
|
|
|
|
[TestCase(@"http://127.0.0.1:1234/api/call?vv=1&apikey=mySecret")]
|
|
|
|
[TestCase(@"http://127.0.0.1:1234/api/call?vv=1&apikey=mySecret")]
|
|
|
|
[TestCase(@"http://127.0.0.1:1234/api/call?vv=1&ma_username=mySecret&ma_password=mySecret")]
|
|
|
|
[TestCase(@"http://127.0.0.1:1234/api/call?vv=1&ma_username=mySecret&ma_password=mySecret")]
|
|
|
@ -30,6 +32,7 @@ namespace NzbDrone.Common.Test.InstrumentationTests
|
|
|
|
[TestCase(@"""misc"":{""username"":""mySecret"",""api_key"":""mySecret"",""password"":""mySecret"",""nzb_key"":""mySecret""}")]
|
|
|
|
[TestCase(@"""misc"":{""username"":""mySecret"",""api_key"":""mySecret"",""password"":""mySecret"",""nzb_key"":""mySecret""}")]
|
|
|
|
[TestCase(@"""servers"":[{""username"":""mySecret"",""password"":""mySecret""}]")]
|
|
|
|
[TestCase(@"""servers"":[{""username"":""mySecret"",""password"":""mySecret""}]")]
|
|
|
|
[TestCase(@"""misc"":{""email_account"":""mySecret"",""email_to"":[],""email_from"":"""",""email_pwd"":""mySecret""}")]
|
|
|
|
[TestCase(@"""misc"":{""email_account"":""mySecret"",""email_to"":[],""email_from"":"""",""email_pwd"":""mySecret""}")]
|
|
|
|
|
|
|
|
|
|
|
|
// uTorrent
|
|
|
|
// uTorrent
|
|
|
|
[TestCase(@"http://localhost:9091/gui/?token=wThmph5l0ZXfH-a6WOA4lqiLvyjCP0FpMrMeXmySecret_VXBO11HoKL751MAAAAA&list=1")]
|
|
|
|
[TestCase(@"http://localhost:9091/gui/?token=wThmph5l0ZXfH-a6WOA4lqiLvyjCP0FpMrMeXmySecret_VXBO11HoKL751MAAAAA&list=1")]
|
|
|
|
[TestCase(@",[""boss_key"",0,""mySecret"",{""access"":""Y""}],[""boss_key_salt"",0,""mySecret"",{""access"":""W""}]")]
|
|
|
|
[TestCase(@",[""boss_key"",0,""mySecret"",{""access"":""Y""}],[""boss_key_salt"",0,""mySecret"",{""access"":""W""}]")]
|
|
|
@ -37,23 +40,25 @@ namespace NzbDrone.Common.Test.InstrumentationTests
|
|
|
|
[TestCase(@",[""webui.uconnect_username"",2,""mySecret"",{""access"":""Y""}],[""webui.uconnect_password"",2,""mySecret"",{""access"":""Y""}]")]
|
|
|
|
[TestCase(@",[""webui.uconnect_username"",2,""mySecret"",{""access"":""Y""}],[""webui.uconnect_password"",2,""mySecret"",{""access"":""Y""}]")]
|
|
|
|
[TestCase(@",[""proxy.proxy"",2,""mySecret"",{""access"":""Y""}]")]
|
|
|
|
[TestCase(@",[""proxy.proxy"",2,""mySecret"",{""access"":""Y""}]")]
|
|
|
|
[TestCase(@",[""proxy.username"",2,""mySecret"",{""access"":""Y""}],[""proxy.password"",2,""mySecret"",{""access"":""Y""}]")]
|
|
|
|
[TestCase(@",[""proxy.username"",2,""mySecret"",{""access"":""Y""}],[""proxy.password"",2,""mySecret"",{""access"":""Y""}]")]
|
|
|
|
|
|
|
|
|
|
|
|
// Deluge
|
|
|
|
// Deluge
|
|
|
|
[TestCase(@",{""download_location"": ""C:\Users\\mySecret mySecret\\Downloads""}")]
|
|
|
|
[TestCase(@",{""download_location"": ""C:\Users\\mySecret mySecret\\Downloads""}")]
|
|
|
|
[TestCase(@",{""download_location"": ""/home/mySecret/Downloads""}")]
|
|
|
|
[TestCase(@",{""download_location"": ""/home/mySecret/Downloads""}")]
|
|
|
|
[TestCase(@"auth.login(""mySecret"")")]
|
|
|
|
[TestCase(@"auth.login(""mySecret"")")]
|
|
|
|
|
|
|
|
|
|
|
|
// Download Station
|
|
|
|
// Download Station
|
|
|
|
[TestCase(@"webapi/entry.cgi?api=(removed)&version=2&method=login&account=01233210&passwd=mySecret&format=sid&session=DownloadStation")]
|
|
|
|
[TestCase(@"webapi/entry.cgi?api=(removed)&version=2&method=login&account=01233210&passwd=mySecret&format=sid&session=DownloadStation")]
|
|
|
|
|
|
|
|
|
|
|
|
// BroadcastheNet
|
|
|
|
// BroadcastheNet
|
|
|
|
[TestCase(@"method: ""getTorrents"", ""params"": [ ""mySecret"",")]
|
|
|
|
[TestCase(@"method: ""getTorrents"", ""params"": [ ""mySecret"",")]
|
|
|
|
[TestCase(@"getTorrents(""mySecret"", [asdfasdf], 100, 0)")]
|
|
|
|
[TestCase(@"getTorrents(""mySecret"", [asdfasdf], 100, 0)")]
|
|
|
|
[TestCase(@"""DownloadURL"":""https:\/\/broadcasthe.net\/torrents.php?action=download&id=123&authkey=mySecret&torrent_pass=mySecret""")]
|
|
|
|
[TestCase(@"""DownloadURL"":""https:\/\/broadcasthe.net\/torrents.php?action=download&id=123&authkey=mySecret&torrent_pass=mySecret""")]
|
|
|
|
// Plex
|
|
|
|
|
|
|
|
[TestCase(@" http://localhost:32400/library/metadata/12345/refresh?X-Plex-Client-Identifier=1234530f-422f-4aac-b6b3-01233210aaaa&X-Plex-Product=Sonarr&X-Plex-Platform=Windows&X-Plex-Platform-Version=7&X-Plex-Device-Name=Sonarr&X-Plex-Version=3.0.3.833&X-Plex-Token=mySecret")]
|
|
|
|
|
|
|
|
// Internal
|
|
|
|
// Internal
|
|
|
|
[TestCase(@"OutputPath=/home/mySecret/Downloads")]
|
|
|
|
[TestCase(@"OutputPath=/home/mySecret/Downloads")]
|
|
|
|
[TestCase("Hardlinking episode file: /home/mySecret/Downloads to /media/abc.mkv")]
|
|
|
|
[TestCase("Hardlinking episode file: /home/mySecret/Downloads to /media/abc.mkv")]
|
|
|
|
[TestCase("Hardlink '/home/mySecret/Downloads/abs.mkv' to '/media/abc.mkv' failed.")]
|
|
|
|
[TestCase("Hardlink '/home/mySecret/Downloads/abs.mkv' to '/media/abc.mkv' failed.")]
|
|
|
|
[TestCase("https://discordnotifier.com/notifier.php: api=1234530f-422f-4aac-b6b3-01233210aaaa&radarr_health_issue_message=Download")]
|
|
|
|
[TestCase("https://notifiarr.com/notifier.php: api=1234530f-422f-4aac-b6b3-01233210aaaa&radarr_health_issue_message=Download")]
|
|
|
|
|
|
|
|
|
|
|
|
// Announce URLs (passkeys) Magnet & Tracker
|
|
|
|
// Announce URLs (passkeys) Magnet & Tracker
|
|
|
|
[TestCase(@"magnet_uri"":""magnet:?xt=urn:btih:9pr04sgkillroyimaveql2tyu8xyui&dn=&tr=https%3a%2f%2fxxx.yyy%2f9pr04sg601233210imaveql2tyu8xyui%2fannounce""}")]
|
|
|
|
[TestCase(@"magnet_uri"":""magnet:?xt=urn:btih:9pr04sgkillroyimaveql2tyu8xyui&dn=&tr=https%3a%2f%2fxxx.yyy%2f9pr04sg601233210imaveql2tyu8xyui%2fannounce""}")]
|
|
|
@ -73,7 +78,7 @@ namespace NzbDrone.Common.Test.InstrumentationTests
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//GoodReads
|
|
|
|
//GoodReads
|
|
|
|
[TestCase(@"{""signatureMethod"": ""hmacSha1"",""signatureTreatment"": ""escaped"",""type"": ""protectedResource"",""method"": ""GET"",""token"": ""mytoken"",""tokenSecret"": ""mytokensecret"",""requestUrl"": ""https://www.goodreads.com/review/list.xml"",""parameters"": { ""_nc"": ""1"", ""v"": ""2"", ""id"": ""999999999"", ""shelf"": ""currently-reading"", ""per_page"": ""200"", ""page"": ""1""}")]
|
|
|
|
[TestCase(@"{""signatureMethod"": ""hmacSha1"",""signatureTreatment"": ""escaped"",""type"": ""protectedResource"",""method"": ""GET"",""token"": ""mytoken"",""tokenSecret"": ""mytokensecret"",""requestUrl"": ""https://www.goodreads.com/review/list.xml"",""parameters"": { ""_nc"": ""1"", ""v"": ""2"", ""id"": ""999999999"", ""shelf"": ""currently-reading"", ""per_page"": ""200"", ""page"": ""1""}")]
|
|
|
|
public void should_cleanGoodRead_message(string message)
|
|
|
|
public void should_cleanGoodRead_message(string message)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var cleansedMessage = CleanseLogMessage.Cleanse(message);
|
|
|
|
var cleansedMessage = CleanseLogMessage.Cleanse(message);
|
|
|
|