From 2d7774c018104c40fea09672ef0f17f9426e034f Mon Sep 17 00:00:00 2001 From: Mark McDowall Date: Thu, 1 Oct 2015 13:53:55 -0700 Subject: [PATCH] Use X-Api-Key header in integration tests --- src/NzbDrone.Integration.Test/Client/ClientBase.cs | 1 + src/NzbDrone.Integration.Test/IntegrationTest.cs | 1 + src/NzbDrone.Test.Common/NzbDroneRunner.cs | 1 + 3 files changed, 3 insertions(+) diff --git a/src/NzbDrone.Integration.Test/Client/ClientBase.cs b/src/NzbDrone.Integration.Test/Client/ClientBase.cs index 5d09a7373..a40c7cf2c 100644 --- a/src/NzbDrone.Integration.Test/Client/ClientBase.cs +++ b/src/NzbDrone.Integration.Test/Client/ClientBase.cs @@ -101,6 +101,7 @@ namespace NzbDrone.Integration.Test.Client }; request.AddHeader("Authorization", _apiKey); + request.AddHeader("X-Api-Key", _apiKey); return request; } diff --git a/src/NzbDrone.Integration.Test/IntegrationTest.cs b/src/NzbDrone.Integration.Test/IntegrationTest.cs index f8d045d83..5035b4a36 100644 --- a/src/NzbDrone.Integration.Test/IntegrationTest.cs +++ b/src/NzbDrone.Integration.Test/IntegrationTest.cs @@ -87,6 +87,7 @@ namespace NzbDrone.Integration.Test { RestClient = new RestClient(RootUrl + "api/"); RestClient.AddDefaultHeader("Authentication", _runner.ApiKey); + RestClient.AddDefaultHeader("X-Api-Key", _runner.ApiKey); Series = new SeriesClient(RestClient, _runner.ApiKey); Releases = new ReleaseClient(RestClient, _runner.ApiKey); diff --git a/src/NzbDrone.Test.Common/NzbDroneRunner.cs b/src/NzbDrone.Test.Common/NzbDroneRunner.cs index 50466d5df..fb91f7127 100644 --- a/src/NzbDrone.Test.Common/NzbDroneRunner.cs +++ b/src/NzbDrone.Test.Common/NzbDroneRunner.cs @@ -61,6 +61,7 @@ namespace NzbDrone.Test.Common var request = new RestRequest("system/status"); request.AddHeader("Authorization", ApiKey); + request.AddHeader("X-Api-Key", ApiKey); var statusCall = _restClient.Get(request);