1
0
mirror of https://github.com/Radarr/Radarr.git synced 2024-10-05 15:47:20 +02:00

Don't start integration tests too soon

(cherry picked from commit b284f40716269dc4f641323b8293f40dfda8a424)
This commit is contained in:
ta264 2021-04-27 21:56:11 +01:00
parent e47ceae0c5
commit 5140ee8f2e
3 changed files with 9 additions and 0 deletions

View File

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

View File

@ -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 @@ protected override void StartTestTarget()
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,

View File

@ -25,6 +25,7 @@
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 @@ public abstract class IntegrationTestBase
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 @@ protected virtual void InitRestClients()
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");