1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-12-16 11:37:58 +02:00

Fixed update test, send os when requesting update packages

This commit is contained in:
Mark McDowall 2014-03-09 00:22:35 -08:00
parent 176f3e0563
commit 57912ab86d
2 changed files with 3 additions and 1 deletions

View File

@ -24,7 +24,7 @@ public class UpdateServiceFixture : CoreTest<InstallUpdateService>
private readonly UpdatePackage _updatePackage = new UpdatePackage private readonly UpdatePackage _updatePackage = new UpdatePackage
{ {
FileName = "NzbDrone.develop.2.0.0.zip", FileName = "NzbDrone.develop.2.0.0.zip",
Url = "http://update.nzbdrone.com/v2/develop/NzbDrone.develop.zip", Url = "http://update.nzbdrone.com/v2/develop/windows/NzbDrone.develop.zip",
Version = new Version("2.0.0") Version = new Version("2.0.0")
}; };

View File

@ -22,6 +22,7 @@ public UpdatePackage GetLatestUpdate(string branch, Version currentVersion)
var request = new RestRequest("/v1/update/{branch}"); var request = new RestRequest("/v1/update/{branch}");
request.AddParameter("version", currentVersion); request.AddParameter("version", currentVersion);
request.AddParameter("os", OsInfo.Os.ToString().ToLowerInvariant());
request.AddUrlSegment("branch", branch); request.AddUrlSegment("branch", branch);
var update = restClient.ExecuteAndValidate<UpdatePackageAvailable>(request); var update = restClient.ExecuteAndValidate<UpdatePackageAvailable>(request);
@ -38,6 +39,7 @@ public List<UpdatePackage> GetRecentUpdates(string branch)
var request = new RestRequest("/v1/update/{branch}/changes"); var request = new RestRequest("/v1/update/{branch}/changes");
request.AddParameter("majorVersion", BuildInfo.Version.Major); request.AddParameter("majorVersion", BuildInfo.Version.Major);
request.AddParameter("os", OsInfo.Os.ToString().ToLowerInvariant());
request.AddUrlSegment("branch", branch); request.AddUrlSegment("branch", branch);
var updates = restClient.ExecuteAndValidate<List<UpdatePackage>>(request); var updates = restClient.ExecuteAndValidate<List<UpdatePackage>>(request);