Fixed: Language Upgrade Tests

pull/170/head
Qstick 7 years ago
parent 8b7b2e6a83
commit a4dacf2812

@ -129,7 +129,25 @@ namespace NzbDrone.Common.Processes
{ {
foreach (DictionaryEntry environmentVariable in environmentVariables) foreach (DictionaryEntry environmentVariable in environmentVariables)
{ {
startInfo.EnvironmentVariables.Add(environmentVariable.Key.ToString(), environmentVariable.Value.ToString()); try
{
_logger.Trace("Setting environment variable '{0}' to '{1}'", environmentVariable.Key, environmentVariable.Value);
startInfo.EnvironmentVariables.Add(environmentVariable.Key.ToString(), environmentVariable.Value.ToString());
}
catch (Exception e)
{
if (environmentVariable.Value == null)
{
_logger.Error(e, "Unable to set environment variable '{0}', value is null", environmentVariable.Key);
}
else
{
_logger.Error(e, "Unable to set environment variable '{0}'", environmentVariable.Key);
}
throw;
}
} }
} }

@ -31,8 +31,8 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
new object[] { Quality.MP3_192, 1, Language.English, Quality.MP3_192, 1, Language.Spanish, Quality.MP3_192, Language.Spanish, true }, new object[] { Quality.MP3_192, 1, Language.English, Quality.MP3_192, 1, Language.Spanish, Quality.MP3_192, Language.Spanish, true },
new object[] { Quality.MP3_320, 1, Language.French, Quality.MP3_320, 2, Language.English, Quality.MP3_320, Language.Spanish, true }, new object[] { Quality.MP3_320, 1, Language.French, Quality.MP3_320, 2, Language.English, Quality.MP3_320, Language.Spanish, true },
new object[] { Quality.MP3_192, 1, Language.English, Quality.MP3_192, 1, Language.English, Quality.MP3_192, Language.English, false }, new object[] { Quality.MP3_192, 1, Language.English, Quality.MP3_192, 1, Language.English, Quality.MP3_192, Language.English, false },
new object[] { Quality.MP3_320, 1, Language.English, Quality.MP3_320, 2, Language.Spanish, Quality.FLAC, Language.Spanish, false }, new object[] { Quality.MP3_320, 1, Language.English, Quality.MP3_256, 2, Language.Spanish, Quality.FLAC, Language.Spanish, false },
new object[] { Quality.MP3_320, 1, Language.Spanish, Quality.MP3_320, 2, Language.French, Quality.MP3_320, Language.Spanish, false } new object[] { Quality.MP3_320, 1, Language.Spanish, Quality.MP3_256, 2, Language.French, Quality.MP3_320, Language.Spanish, false }
}; };
[SetUp] [SetUp]
@ -70,7 +70,7 @@ namespace NzbDrone.Core.Test.DecisionEngineTests
.Should().Be(expected); .Should().Be(expected);
} }
[Test, TestCaseSource("IsUpgradeTestCasesLanguages")] [Test, TestCaseSource(nameof(IsUpgradeTestCasesLanguages))]
public void IsUpgradeTestLanguage(Quality current, int currentVersion, Language currentLanguage, Quality newQuality, int newVersion, Language newLanguage, Quality cutoff, Language languageCutoff, bool expected) public void IsUpgradeTestLanguage(Quality current, int currentVersion, Language currentLanguage, Quality newQuality, int newVersion, Language newLanguage, Quality cutoff, Language languageCutoff, bool expected)
{ {
GivenAutoDownloadPropers(true); GivenAutoDownloadPropers(true);

@ -254,7 +254,6 @@ namespace NzbDrone.Core.Test.IndexerTests.TorrentRssIndexerTests
} }
[TestCase("IPTorrents/IPTorrents.xml")] [TestCase("IPTorrents/IPTorrents.xml")]
[TestCase("Newznab/newznab_nzb_su.xml")]
[TestCase("Nyaa/Nyaa.xml")] [TestCase("Nyaa/Nyaa.xml")]
[TestCase("Torznab/torznab_hdaccess_net.xml")] [TestCase("Torznab/torznab_hdaccess_net.xml")]
[TestCase("Torznab/torznab_tpb.xml")] [TestCase("Torznab/torznab_tpb.xml")]

@ -38,6 +38,7 @@ namespace NzbDrone.Core.Test.ParserTests
} }
[Test] [Test]
[Ignore("Artist Don't have year association thus we dont use this currently")]
public void should_have_year_in_title_when_title_has_a_year() public void should_have_year_in_title_when_title_has_a_year()
{ {
const string title = "House.2004.S01E01.pilot.720p.hdtv"; const string title = "House.2004.S01E01.pilot.720p.hdtv";
@ -48,6 +49,7 @@ namespace NzbDrone.Core.Test.ParserTests
} }
[Test] [Test]
[Ignore("Artist Don't have year association thus we dont use this currently")]
public void should_title_without_year_should_not_contain_year() public void should_title_without_year_should_not_contain_year()
{ {
const string title = "House.2004.S01E01.pilot.720p.hdtv"; const string title = "House.2004.S01E01.pilot.720p.hdtv";

Loading…
Cancel
Save