Don't start integration tests too soon

pull/2307/head
ta264 3 years ago committed by Qstick
parent cb62775e6b
commit f1ba8a0d27

@ -11,6 +11,8 @@ namespace NzbDrone.Integration.Test.ApiTests
{
private void GivenExistingArtist()
{
WaitForCompletion(() => Profiles.All().Count > 0);
foreach (var name in new[] { "Alien Ant Farm", "Kiss" })
{
var newArtist = Artist.Lookup(name).First();

@ -2,6 +2,7 @@ using System.Threading;
using Lidarr.Http.ClientSchema;
using NLog;
using NUnit.Framework;
using NzbDrone.Common.Extensions;
using NzbDrone.Core.Indexers.Newznab;
using NzbDrone.Test.Common;
@ -34,6 +35,9 @@ namespace NzbDrone.Integration.Test
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
{
EnableRss = false,

@ -13,6 +13,7 @@ using Lidarr.Api.V1.DownloadClient;
using Lidarr.Api.V1.History;
using Lidarr.Api.V1.Profiles.Quality;
using Lidarr.Api.V1.RootFolders;
using Lidarr.Api.V1.System.Tasks;
using Lidarr.Api.V1.Tags;
using Microsoft.AspNetCore.SignalR.Client;
using NLog;
@ -38,6 +39,7 @@ namespace NzbDrone.Integration.Test
public ClientBase<BlacklistResource> Blacklist;
public CommandClient Commands;
public ClientBase<TaskResource> Tasks;
public DownloadClientClient DownloadClients;
public AlbumClient Albums;
public TrackClient Tracks;
@ -103,6 +105,7 @@ namespace NzbDrone.Integration.Test
Blacklist = new ClientBase<BlacklistResource>(RestClient, ApiKey);
Commands = new CommandClient(RestClient, ApiKey);
Tasks = new ClientBase<TaskResource>(RestClient, ApiKey, "system/task");
DownloadClients = new DownloadClientClient(RestClient, ApiKey);
Albums = new AlbumClient(RestClient, ApiKey);
Tracks = new TrackClient(RestClient, ApiKey);

Loading…
Cancel
Save