From 470b283f08dd135e1005256d3e7db84740622f34 Mon Sep 17 00:00:00 2001 From: Mark van Renswoude Date: Wed, 23 Nov 2022 09:19:01 +0100 Subject: [PATCH] Skip tests based on Category instead of ifdef DEBUG --- Tapeti.Tests/Client/TapetiClientTests.cs | 8 +++----- appveyor.yml | 8 ++++++++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Tapeti.Tests/Client/TapetiClientTests.cs b/Tapeti.Tests/Client/TapetiClientTests.cs index 49c3bc0..bfd1cfe 100644 --- a/Tapeti.Tests/Client/TapetiClientTests.cs +++ b/Tapeti.Tests/Client/TapetiClientTests.cs @@ -1,6 +1,4 @@ -// Do not include in the Release build for AppVeyor due to the Docker requirement -#if DEBUG -using System.Text; +using System.Text; using System.Threading; using System.Threading.Tasks; using FluentAssertions; @@ -14,6 +12,7 @@ using Xunit.Abstractions; namespace Tapeti.Tests.Client { [Collection(RabbitMQCollection.Name)] + [Trait("Category", "Requires Docker")] public class TapetiClientTests : IAsyncLifetime { private readonly RabbitMQFixture fixture; @@ -114,5 +113,4 @@ namespace Tapeti.Tests.Client }); } } -} -#endif \ No newline at end of file +} \ No newline at end of file diff --git a/appveyor.yml b/appveyor.yml index 9446a1c..61a51ea 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -32,6 +32,14 @@ after_build: build: project: Tapeti.sln +test: + assemblies: + only: + - Tapeti.Tests\bin\Release\net6.0\Tapeti.Tests.dll + categories: + except: + - Requires Docker + platform: - Any CPU