Don't start integration tests too soon

(cherry picked from commit b284f40716269dc4f641323b8293f40dfda8a424)
pull/6279/head
ta264 3 years ago
parent e47ceae0c5
commit 5140ee8f2e

@ -11,6 +11,8 @@ namespace NzbDrone.Integration.Test.ApiTests
{
private void GivenExistingMovie()
{
WaitForCompletion(() => Profiles.All().Count > 0);
foreach (var title in new[] { "The Dark Knight", "Pulp Fiction" })
{
var newMovie = Movies.Lookup(title).First();

@ -1,6 +1,7 @@
using System.Threading;
using NLog;
using NUnit.Framework;
using NzbDrone.Common.Extensions;
using NzbDrone.Core.Indexers.Newznab;
using NzbDrone.Test.Common;
using Radarr.Http.ClientSchema;
@ -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 Radarr.Api.V3.Indexers.IndexerResource
{
EnableRss = false,

@ -25,6 +25,7 @@ using Radarr.Api.V3.MovieFiles;
using Radarr.Api.V3.Movies;
using Radarr.Api.V3.Profiles.Quality;
using Radarr.Api.V3.RootFolders;
using Radarr.Api.V3.System.Tasks;
using Radarr.Api.V3.Tags;
using RestSharp;
@ -37,6 +38,7 @@ namespace NzbDrone.Integration.Test
public ClientBase<BlacklistResource> Blacklist;
public CommandClient Commands;
public ClientBase<TaskResource> Tasks;
public DownloadClientClient DownloadClients;
public ClientBase<HistoryResource> History;
public ClientBase<HostConfigResource> HostConfig;
@ -98,6 +100,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);
History = new ClientBase<HistoryResource>(RestClient, ApiKey);
HostConfig = new ClientBase<HostConfigResource>(RestClient, ApiKey, "config/host");

Loading…
Cancel
Save