Fixed: Language Upgrade Tests

This commit is contained in:
Qstick 2017-12-24 01:22:48 -05:00
commit a4dacf2812
4 changed files with 24 additions and 5 deletions

View file

@ -129,8 +129,26 @@ namespace NzbDrone.Common.Processes
{ {
foreach (DictionaryEntry environmentVariable in environmentVariables) foreach (DictionaryEntry environmentVariable in environmentVariables)
{ {
try
{
_logger.Trace("Setting environment variable '{0}' to '{1}'", environmentVariable.Key, environmentVariable.Value);
startInfo.EnvironmentVariables.Add(environmentVariable.Key.ToString(), environmentVariable.Value.ToString()); 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;
}
}
} }
logger.Debug("Starting {0} {1}", path, args); logger.Debug("Starting {0} {1}", path, args);

View file

@ -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);

View file

@ -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")]

View file

@ -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";