mirror of https://github.com/lidarr/Lidarr
Don't start integration tests too soon
This commit is contained in:
parent
cb62775e6b
commit
f1ba8a0d27
|
@ -11,6 +11,8 @@ namespace NzbDrone.Integration.Test.ApiTests
|
||||||
{
|
{
|
||||||
private void GivenExistingArtist()
|
private void GivenExistingArtist()
|
||||||
{
|
{
|
||||||
|
WaitForCompletion(() => Profiles.All().Count > 0);
|
||||||
|
|
||||||
foreach (var name in new[] { "Alien Ant Farm", "Kiss" })
|
foreach (var name in new[] { "Alien Ant Farm", "Kiss" })
|
||||||
{
|
{
|
||||||
var newArtist = Artist.Lookup(name).First();
|
var newArtist = Artist.Lookup(name).First();
|
||||||
|
|
|
@ -2,6 +2,7 @@ using System.Threading;
|
||||||
using Lidarr.Http.ClientSchema;
|
using Lidarr.Http.ClientSchema;
|
||||||
using NLog;
|
using NLog;
|
||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
using NzbDrone.Common.Extensions;
|
||||||
using NzbDrone.Core.Indexers.Newznab;
|
using NzbDrone.Core.Indexers.Newznab;
|
||||||
using NzbDrone.Test.Common;
|
using NzbDrone.Test.Common;
|
||||||
|
|
||||||
|
@ -34,6 +35,9 @@ namespace NzbDrone.Integration.Test
|
||||||
|
|
||||||
protected override void InitializeTestTarget()
|
protected override void InitializeTestTarget()
|
||||||
{
|
{
|
||||||
|
// Make sure tasks have been initialized so the config put below doesn't cause errors
|
||||||
|
WaitForCompletion(() => Tasks.All().SelectList(x => x.TaskName).Contains("RssSync"));
|
||||||
|
|
||||||
Indexers.Post(new Lidarr.Api.V1.Indexers.IndexerResource
|
Indexers.Post(new Lidarr.Api.V1.Indexers.IndexerResource
|
||||||
{
|
{
|
||||||
EnableRss = false,
|
EnableRss = false,
|
||||||
|
|
|
@ -13,6 +13,7 @@ using Lidarr.Api.V1.DownloadClient;
|
||||||
using Lidarr.Api.V1.History;
|
using Lidarr.Api.V1.History;
|
||||||
using Lidarr.Api.V1.Profiles.Quality;
|
using Lidarr.Api.V1.Profiles.Quality;
|
||||||
using Lidarr.Api.V1.RootFolders;
|
using Lidarr.Api.V1.RootFolders;
|
||||||
|
using Lidarr.Api.V1.System.Tasks;
|
||||||
using Lidarr.Api.V1.Tags;
|
using Lidarr.Api.V1.Tags;
|
||||||
using Microsoft.AspNetCore.SignalR.Client;
|
using Microsoft.AspNetCore.SignalR.Client;
|
||||||
using NLog;
|
using NLog;
|
||||||
|
@ -38,6 +39,7 @@ namespace NzbDrone.Integration.Test
|
||||||
|
|
||||||
public ClientBase<BlacklistResource> Blacklist;
|
public ClientBase<BlacklistResource> Blacklist;
|
||||||
public CommandClient Commands;
|
public CommandClient Commands;
|
||||||
|
public ClientBase<TaskResource> Tasks;
|
||||||
public DownloadClientClient DownloadClients;
|
public DownloadClientClient DownloadClients;
|
||||||
public AlbumClient Albums;
|
public AlbumClient Albums;
|
||||||
public TrackClient Tracks;
|
public TrackClient Tracks;
|
||||||
|
@ -103,6 +105,7 @@ namespace NzbDrone.Integration.Test
|
||||||
|
|
||||||
Blacklist = new ClientBase<BlacklistResource>(RestClient, ApiKey);
|
Blacklist = new ClientBase<BlacklistResource>(RestClient, ApiKey);
|
||||||
Commands = new CommandClient(RestClient, ApiKey);
|
Commands = new CommandClient(RestClient, ApiKey);
|
||||||
|
Tasks = new ClientBase<TaskResource>(RestClient, ApiKey, "system/task");
|
||||||
DownloadClients = new DownloadClientClient(RestClient, ApiKey);
|
DownloadClients = new DownloadClientClient(RestClient, ApiKey);
|
||||||
Albums = new AlbumClient(RestClient, ApiKey);
|
Albums = new AlbumClient(RestClient, ApiKey);
|
||||||
Tracks = new TrackClient(RestClient, ApiKey);
|
Tracks = new TrackClient(RestClient, ApiKey);
|
||||||
|
|
Loading…
Reference in New Issue