Start Tor process when Tor is needed. (Also test CI]
MODIFY
WalletWasabi.Tests/ExternalApiTests.cs
WalletWasabi.Tests/ExternalApiTests.cs
@@ -28,6 +28,7 @@ namespace WalletWasabi.Tests
[Theory]
[InlineData("test")]
[InlineData("main")]
+ [Trait("Category", "TorNotNeeded")]
public async Task SmartBitTestsAsync(string networkString)
{
if (!await TestAsync("https://api.smartbit.com.au/v1/blockchain/stats"))

MODIFY
WalletWasabi.Tests/LiveServerTests.cs
WalletWasabi.Tests/LiveServerTests.cs
@@ -9,6 +9,7 @@ using WalletWasabi.Crypto;
using WalletWasabi.Models;
using WalletWasabi.Services;
using WalletWasabi.Tests.XunitConfiguration;
+using WalletWasabi.TorSocks5;
using WalletWasabi.WebClients.Wasabi;
using WalletWasabi.WebClients.Wasabi.ChaumianCoinJoin;
using Xunit;
@@ -26,6 +27,9 @@ namespace WalletWasabi.Tests
{
SharedFixture = sharedFixture;
LiveServerTestsFixture = liveServerTestsFixture;
+
+ var torManager = new TorProcessManager(SharedFixture.TorSocks5Endpoint);
+ torManager.StartAsync().GetAwaiter().GetResult();
}
#region Blockchain

MODIFY
WalletWasabi.Tests/RpcMethodTests.cs
WalletWasabi.Tests/RpcMethodTests.cs
@@ -19,6 +19,7 @@ namespace WalletWasabi.Tests
#region RpcMethodTests
[Fact]
+ [Trait("Category", "TorNotNeeded")]
public async Task CanWaitForNewBlockFromRpcAsync()
{
using (var builder = await NodeBuilder.CreateAsync())

MODIFY
WalletWasabi.Tests/TorTests.cs
WalletWasabi.Tests/TorTests.cs
@@ -18,6 +18,8 @@ namespace WalletWasabi.Tests
public TorTests(SharedFixture sharedFixture)
{
SharedFixture = sharedFixture;
+ var torManager = new TorProcessManager(SharedFixture.TorSocks5Endpoint);
+ torManager.StartAsync().GetAwaiter().GetResult();
}
[Fact]

Start Tor process when Tor is needed. (Also test CI]