Don't start integration tests too soon

(cherry picked from commit b284f40716269dc4f641323b8293f40dfda8a424)
(cherry picked from commit d549975d96f04cc6b197d719d8389110cb24b8e6)
pull/1012/head
ta264 4 years ago
parent a8388e12c1
commit 23f2bbc700

@ -11,6 +11,8 @@ namespace NzbDrone.Integration.Test.ApiTests
{
private void GivenExistingAuthor()
{
WaitForCompletion(() => Profiles.All().Count > 0);
foreach (var name in new[] { "Alien Ant Farm", "Kiss" })
{
var newAuthor = Author.Lookup(name).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 Readarr.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 Readarr.Api.V1.Indexers.IndexerResource
{
EnableRss = false,

@ -24,6 +24,7 @@ using Readarr.Api.V1.DownloadClient;
using Readarr.Api.V1.History;
using Readarr.Api.V1.Profiles.Quality;
using Readarr.Api.V1.RootFolders;
using Readarr.Api.V1.System.Tasks;
using Readarr.Api.V1.Tags;
using RestSharp;
using RestSharp.Serializers.SystemTextJson;
@ -37,6 +38,7 @@ namespace NzbDrone.Integration.Test
public ClientBase<BlacklistResource> Blacklist;
public CommandClient Commands;
public ClientBase<TaskResource> Tasks;
public DownloadClientClient DownloadClients;
public BookClient Books;
public ClientBase<HistoryResource> History;
@ -101,6 +103,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);
Books = new BookClient(RestClient, ApiKey);
History = new ClientBase<HistoryResource>(RestClient, ApiKey);

Loading…
Cancel
Save