Use X-Api-Key header in integration tests

pull/4/head
Mark McDowall 9 years ago
parent 986dae590b
commit 2d7774c018

@ -101,6 +101,7 @@ namespace NzbDrone.Integration.Test.Client
}; };
request.AddHeader("Authorization", _apiKey); request.AddHeader("Authorization", _apiKey);
request.AddHeader("X-Api-Key", _apiKey);
return request; return request;
} }

@ -87,6 +87,7 @@ namespace NzbDrone.Integration.Test
{ {
RestClient = new RestClient(RootUrl + "api/"); RestClient = new RestClient(RootUrl + "api/");
RestClient.AddDefaultHeader("Authentication", _runner.ApiKey); RestClient.AddDefaultHeader("Authentication", _runner.ApiKey);
RestClient.AddDefaultHeader("X-Api-Key", _runner.ApiKey);
Series = new SeriesClient(RestClient, _runner.ApiKey); Series = new SeriesClient(RestClient, _runner.ApiKey);
Releases = new ReleaseClient(RestClient, _runner.ApiKey); Releases = new ReleaseClient(RestClient, _runner.ApiKey);

@ -61,6 +61,7 @@ namespace NzbDrone.Test.Common
var request = new RestRequest("system/status"); var request = new RestRequest("system/status");
request.AddHeader("Authorization", ApiKey); request.AddHeader("Authorization", ApiKey);
request.AddHeader("X-Api-Key", ApiKey);
var statusCall = _restClient.Get(request); var statusCall = _restClient.Get(request);

Loading…
Cancel
Save