mirror of
https://github.com/lidarr/lidarr.git
synced 2025-08-14 18:57:39 -07:00
added commands.
they can be triggered using the api api/command/
This commit is contained in:
parent
68ee71ea81
commit
182192e0ba
31 changed files with 265 additions and 74 deletions
17
NzbDrone.Integration.Test/CommandIntegerationTests.cs
Normal file
17
NzbDrone.Integration.Test/CommandIntegerationTests.cs
Normal file
|
@ -0,0 +1,17 @@
|
|||
using NUnit.Framework;
|
||||
using NzbDrone.Api.Commands;
|
||||
|
||||
namespace NzbDrone.Integration.Test
|
||||
{
|
||||
[TestFixture]
|
||||
public class CommandIntegrationTest : IntegrationTest
|
||||
{
|
||||
[Test]
|
||||
public void should_be_able_to_run_rss_sync()
|
||||
{
|
||||
Commands.Post(new CommandResource {Command = "rsssync"});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -6,6 +6,7 @@ using NLog.Targets;
|
|||
using NUnit.Framework;
|
||||
using Nancy.Hosting.Self;
|
||||
using NzbDrone.Api;
|
||||
using NzbDrone.Api.Commands;
|
||||
using NzbDrone.Api.RootFolders;
|
||||
using NzbDrone.Common;
|
||||
using NzbDrone.Core.Datastore;
|
||||
|
@ -29,6 +30,7 @@ namespace NzbDrone.Integration.Test
|
|||
|
||||
protected SeriesClient Series;
|
||||
protected ClientBase<RootFolderResource> RootFolders;
|
||||
protected ClientBase<CommandResource> Commands;
|
||||
|
||||
static IntegrationTest()
|
||||
{
|
||||
|
@ -84,6 +86,7 @@ namespace NzbDrone.Integration.Test
|
|||
RestClient = new RestClient(url + "/api/");
|
||||
Series = new SeriesClient(RestClient);
|
||||
RootFolders = new ClientBase<RootFolderResource>(RestClient);
|
||||
Commands = new ClientBase<CommandResource>(RestClient);
|
||||
|
||||
_host.Start();
|
||||
}
|
||||
|
@ -96,4 +99,5 @@ namespace NzbDrone.Integration.Test
|
|||
_bootstrapper.Shutdown();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -76,6 +76,7 @@
|
|||
<ItemGroup>
|
||||
<Compile Include="Client\ClientBase.cs" />
|
||||
<Compile Include="Client\SeriesClient.cs" />
|
||||
<Compile Include="CommandIntegerationTests.cs" />
|
||||
<Compile Include="IntegrationTest.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="RootFolderIntegrationTest.cs" />
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue