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:
parent
176f3e0563
commit
57912ab86d
@ -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")
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user