Filter CI tests
MODIFY
WalletWasabi.Tests/CryptoTests.cs
WalletWasabi.Tests/CryptoTests.cs
@@ -18,7 +18,6 @@ namespace WalletWasabi.Tests
}
[Fact]
- [Trait("Category", "RunOnCi")]
public void CipherTests()
{
var toEncrypt = "hello";
@@ -52,7 +51,6 @@ namespace WalletWasabi.Tests
}
[Fact]
- [Trait("Category", "RunOnCi")]
public void AuthenticateMessageTest()
{
var count = 0;
@@ -80,7 +78,6 @@ namespace WalletWasabi.Tests
}
[Fact]
- [Trait("Category", "RunOnCi")]
public void CanBlindSign()
{
// generate rsa keypair
@@ -102,7 +99,6 @@ namespace WalletWasabi.Tests
}
[Fact]
- [Trait("Category", "RunOnCi")]
public void CanSerialize()
{
var key = new BlindingRsaKey();
@@ -132,7 +128,6 @@ namespace WalletWasabi.Tests
}
[Fact]
- [Trait("Category", "RunOnCi")]
public void CanEncodeDecodeBlinding()
{
var key = new BlindingRsaKey();

MODIFY
WalletWasabi.Tests/ExternalApiTests.cs
WalletWasabi.Tests/ExternalApiTests.cs
@@ -52,7 +52,6 @@ namespace WalletWasabi.Tests
[Theory]
[InlineData("test")]
[InlineData("main")]
- [Trait("Category", "RunOnCi")]
public async Task BlockCypherTestsAsync(string networkString)
{
if (!await TestAsync("https://api.blockcypher.com/v1/btc/main"))

MODIFY
WalletWasabi.Tests/KeyManagementTests.cs
WalletWasabi.Tests/KeyManagementTests.cs
@@ -19,7 +19,6 @@ namespace WalletWasabi.Tests
}
[Fact]
- [Trait("Category", "RunOnCi")]
public void CanCreateNew()
{
string password = "password";
@@ -70,7 +69,6 @@ namespace WalletWasabi.Tests
}
[Fact]
- [Trait("Category", "RunOnCi")]
public void CanRecover()
{
string password = "password";
@@ -88,7 +86,6 @@ namespace WalletWasabi.Tests
}
[Fact]
- [Trait("Category", "RunOnCi")]
public void CanSerialize()
{
string password = "password";
@@ -130,7 +127,6 @@ namespace WalletWasabi.Tests
}
[Fact]
- [Trait("Category", "RunOnCi")]
public void CanGenerateKeys()
{
string password = "password";

MODIFY
WalletWasabi.Tests/ModelTests.cs
WalletWasabi.Tests/ModelTests.cs
@@ -23,7 +23,6 @@ namespace WalletWasabi.Tests
}
[Fact]
- [Trait("Category", "RunOnCi")]
public void SmartTransactionEquality()
{
var hex = "0100000000010176f521a178a4b394b647169a89b29bb0d95b6bce192fd686d533eb4ea98464a20000000000ffffffff02ed212d020000000016001442da650f25abde0fef57badd745df7346e3e7d46fbda6400000000001976a914bd2e4029ce7d6eca7d2c3779e8eac36c952afee488ac02483045022100ea43ccf95e1ac4e8b305c53761da7139dbf6ff164e137a6ce9c09e15f316c22902203957818bc505bbafc181052943d7ab1f3ae82c094bf749813e8f59108c6c268a012102e59e61f20c7789aa73faf5a92dc8c0424e538c635c55d64326d95059f0f8284200000000";
@@ -47,7 +46,6 @@ namespace WalletWasabi.Tests
}
[Fact]
- [Trait("Category", "RunOnCi")]
public void SmartCoinEquality()
{
var tx = Transaction.Parse("0100000000010176f521a178a4b394b647169a89b29bb0d95b6bce192fd686d533eb4ea98464a20000000000ffffffff02ed212d020000000016001442da650f25abde0fef57badd745df7346e3e7d46fbda6400000000001976a914bd2e4029ce7d6eca7d2c3779e8eac36c952afee488ac02483045022100ea43ccf95e1ac4e8b305c53761da7139dbf6ff164e137a6ce9c09e15f316c22902203957818bc505bbafc181052943d7ab1f3ae82c094bf749813e8f59108c6c268a012102e59e61f20c7789aa73faf5a92dc8c0424e538c635c55d64326d95059f0f8284200000000", Network.TestNet);
@@ -77,7 +75,6 @@ namespace WalletWasabi.Tests
}
[Fact]
- [Trait("Category", "RunOnCi")]
public void SmartTransactionSerialization()
{
var tx = Transaction.Parse("02000000040aa8d0af84518df6e3a60c5bb19d9c3fcc3dc6e26b2f2449e8d7bf8d3fe84b87010000006a473044022018dfe9216c1209dd6c2b6c1607dbac4e499c1fce4878bc7d5d83fccbf3e24c9402202cac351c9c6a2b5eef338cbf0ec000d8de1c05e96a904cbba2b9e6ffc2d4e19501210364cc39da1091b1a9c12ec905a14a9e8478f951f7a1accdabeb40180533f2eaa5feffffff112c07d0f5e0617d720534f0b2b84dc0d5b7314b358c3ab338823b9e5bfbddf5010000006b483045022100ec155e7141e74661ee511ae980150a6c89261f31070999858738369afc28f2b6022006230d2aa24fac110b74ef15b84371486cf76c539b335a253c14462447912a300121020c2f41390f031d471b22abdb856e6cdbe0f4d74e72c197469bfd54e5a08f7e67feffffff38e799b8f6cf04fd021a9b135cdcd347da7aac4fd8bb8d0da9316a9fb228bb6e000000006b483045022100fc1944544a3f96edd8c8a9795c691e2725612b5ab2e1c999be11a2a4e3f841f1022077b2e088877829edeada0c707a9bb577aa79f26dafacba3d1d2d047f52524296012102e6015963dff9826836400cf8f45597c0705757d5dcdc6bf734f661c7dab89e69feffffff64c3f0377e86625123f2f1ee229319ed238e8ca8b7dda5bc080a2c5ecb984629000000006a47304402204233a90d6296182914424fd2901e16e6f5b13b451b67b0eec25a5eaacc5033c902203d8a13ef0b494c12009663475458e51da6bd55cc67688264230ece81d3eeca24012102f806d7152da2b52c1d9ad928e4a6253ccba080a5b9ab9efdd80e37274ac67f9bfeffffff0290406900000000001976a91491ac4e49b66f845180d98d8f8be6121588be6e3b88ac52371600000000001976a9142f44ed6749e8c84fd476e4440741f7e6f55542fa88acadd30700", Network.TestNet);
@@ -118,7 +115,6 @@ namespace WalletWasabi.Tests
}
[Fact]
- [Trait("Category", "RunOnCi")]
public void UtxoRefereeSerialization()
{
var record = UtxoReferee.BannedRecordFromLine("2018-11-23 15-23-14:1:44:2716e680f47d74c1bc6f031da22331564dd4c6641d7216576aad1b846c85d492:True:195");
@@ -144,7 +140,6 @@ namespace WalletWasabi.Tests
}
[Fact]
- [Trait("Category", "RunOnCi")]
public void SmartCoinSerialization()
{
var tx = Transaction.Parse("02000000040aa8d0af84518df6e3a60c5bb19d9c3fcc3dc6e26b2f2449e8d7bf8d3fe84b87010000006a473044022018dfe9216c1209dd6c2b6c1607dbac4e499c1fce4878bc7d5d83fccbf3e24c9402202cac351c9c6a2b5eef338cbf0ec000d8de1c05e96a904cbba2b9e6ffc2d4e19501210364cc39da1091b1a9c12ec905a14a9e8478f951f7a1accdabeb40180533f2eaa5feffffff112c07d0f5e0617d720534f0b2b84dc0d5b7314b358c3ab338823b9e5bfbddf5010000006b483045022100ec155e7141e74661ee511ae980150a6c89261f31070999858738369afc28f2b6022006230d2aa24fac110b74ef15b84371486cf76c539b335a253c14462447912a300121020c2f41390f031d471b22abdb856e6cdbe0f4d74e72c197469bfd54e5a08f7e67feffffff38e799b8f6cf04fd021a9b135cdcd347da7aac4fd8bb8d0da9316a9fb228bb6e000000006b483045022100fc1944544a3f96edd8c8a9795c691e2725612b5ab2e1c999be11a2a4e3f841f1022077b2e088877829edeada0c707a9bb577aa79f26dafacba3d1d2d047f52524296012102e6015963dff9826836400cf8f45597c0705757d5dcdc6bf734f661c7dab89e69feffffff64c3f0377e86625123f2f1ee229319ed238e8ca8b7dda5bc080a2c5ecb984629000000006a47304402204233a90d6296182914424fd2901e16e6f5b13b451b67b0eec25a5eaacc5033c902203d8a13ef0b494c12009663475458e51da6bd55cc67688264230ece81d3eeca24012102f806d7152da2b52c1d9ad928e4a6253ccba080a5b9ab9efdd80e37274ac67f9bfeffffff0290406900000000001976a91491ac4e49b66f845180d98d8f8be6121588be6e3b88ac52371600000000001976a9142f44ed6749e8c84fd476e4440741f7e6f55542fa88acadd30700", Network.TestNet);
@@ -182,7 +177,6 @@ namespace WalletWasabi.Tests
}
[Fact]
- [Trait("Category", "RunOnCi")]
public void ObservableConcurrentHashSetTest()
{
var set = new ObservableConcurrentHashSet<int>();

MODIFY
WalletWasabi.Tests/P2pTests.cs
WalletWasabi.Tests/P2pTests.cs
@@ -32,7 +32,6 @@ namespace WalletWasabi.Tests
[Theory]
[InlineData("test")]
[InlineData("main")]
- [Trait("Category", "RunOnCi")]
public async Task TestServicesAsync(string networkString)
{
var network = Network.GetNetwork(networkString);
@@ -190,7 +189,6 @@ namespace WalletWasabi.Tests
}
[Fact]
- [Trait("Category", "RunOnCi")]
public async Task FilterBuilderTestAsync()
{
using (var builder = await NodeBuilder.CreateAsync())

MODIFY
WalletWasabi.Tests/RegTests.cs
WalletWasabi.Tests/RegTests.cs
@@ -34,7 +34,6 @@ using Xunit;
namespace WalletWasabi.Tests
{
[Collection("RegTest collection")]
- [TestCaseOrderer("WalletWasabi.Tests.XunitConfiguration.PriorityOrderer", "WalletWasabi.Tests")]
public class RegTests : IClassFixture<SharedFixture>
{
private SharedFixture SharedFixture { get; }
@@ -83,8 +82,7 @@ namespace WalletWasabi.Tests
#region BackendTests
- [Fact, TestPriority(1)]
- [Trait("Category", "RunOnCi")]
+ [Fact]
public async Task GetExchangeRatesAsync()
{
using (var client = new TorHttpClient(new Uri(RegTestFixture.BackendEndPoint), SharedFixture.TorSocks5Endpoint))
@@ -101,8 +99,7 @@ namespace WalletWasabi.Tests
}
}
- [Fact, TestPriority(1)]
- [Trait("Category", "RunOnCi")]
+ [Fact]
public async Task GetClientVersionAsync()
{
using (var client = new WasabiClient(new Uri(RegTestFixture.BackendEndPoint)))
@@ -113,8 +110,7 @@ namespace WalletWasabi.Tests
}
}
- [Fact, TestPriority(3)]
- [Trait("Category", "RunOnCi")]
+ [Fact]
public async Task BroadcastReplayTxAsync()
{
(string password, RPCClient rpc, Network network, CcjCoordinator coordinator) = await InitializeTestEnvironmentAsync(1);
@@ -134,8 +130,7 @@ namespace WalletWasabi.Tests
Logger.TurnOn();
}
- [Fact, TestPriority(4)]
- [Trait("Category", "RunOnCi")]
+ [Fact]
public async Task BroadcastInvalidTxAsync()
{
(string password, RPCClient rpc, Network network, CcjCoordinator coordinator) = await InitializeTestEnvironmentAsync(1);
@@ -157,8 +152,7 @@ namespace WalletWasabi.Tests
#region ServicesTests
- [Fact, TestPriority(5)]
- [Trait("Category", "RunOnCi")]
+ [Fact]
public async Task MempoolAsync()
{
(string password, RPCClient rpc, Network network, CcjCoordinator coordinator) = await InitializeTestEnvironmentAsync(1);
@@ -203,11 +197,10 @@ namespace WalletWasabi.Tests
private void MempoolAsync_MemPoolService_TransactionReceived(object sender, SmartTransaction e)
{
Interlocked.Increment(ref _mempoolTransactionCount);
- Logger.LogDebug<P2pTests>($"Mempool transaction received: {e.GetHash()}.");
+ Logger.LogDebug<RegTests>($"Mempool transaction received: {e.GetHash()}.");
}
- [Fact, TestPriority(6)]
- [Trait("Category", "RunOnCi")]
+ [Fact]
public async Task FilterDownloaderTestAsync()
{
(string password, RPCClient rpc, Network network, CcjCoordinator coordinator) = await InitializeTestEnvironmentAsync(1);
@@ -262,8 +255,7 @@ namespace WalletWasabi.Tests
}
}
- [Fact, TestPriority(7)]
- [Trait("Category", "RunOnCi")]
+ [Fact]
public async Task ReorgTestAsync()
{
(string password, RPCClient rpc, Network network, CcjCoordinator coordinator) = await InitializeTestEnvironmentAsync(1);
@@ -397,8 +389,7 @@ namespace WalletWasabi.Tests
#region ClientTests
- [Fact, TestPriority(8)]
- [Trait("Category", "RunOnCi")]
+ [Fact]
public async Task WalletTestsAsync()
{
(string password, RPCClient rpc, Network network, CcjCoordinator coordinator) = await InitializeTestEnvironmentAsync(1);
@@ -628,8 +619,7 @@ namespace WalletWasabi.Tests
{
}
- [Fact, TestPriority(9)]
- [Trait("Category", "RunOnCi")]
+ [Fact]
public async Task SendTestsFromHiddenWalletAsync() // These tests are taken from HiddenWallet, they were tests on the testnet.
{
(string password, RPCClient rpc, Network network, CcjCoordinator coordinator) = await InitializeTestEnvironmentAsync(1);
@@ -1073,8 +1063,7 @@ namespace WalletWasabi.Tests
}
}
- [Fact, TestPriority(11)]
- [Trait("Category", "RunOnCi")]
+ [Fact]
public async Task BuildTransactionValidationsTestAsync()
{
(string password, RPCClient rpc, Network network, CcjCoordinator coordinator) = await InitializeTestEnvironmentAsync(1);
@@ -1238,8 +1227,7 @@ namespace WalletWasabi.Tests
}
}
- [Fact, TestPriority(12)]
- [Trait("Category", "RunOnCi")]
+ [Fact]
public async Task BuildTransactionReorgsTestAsync()
{
(string password, RPCClient rpc, Network network, CcjCoordinator coordinator) = await InitializeTestEnvironmentAsync(1);
@@ -1404,8 +1392,7 @@ namespace WalletWasabi.Tests
}
}
- [Fact, TestPriority(0)]
- [Trait("Category", "RunOnCi")]
+ [Fact]
public async Task SpendUnconfirmedTxTestAsync()
{
(string password, RPCClient rpc, Network network, CcjCoordinator coordinator) = await InitializeTestEnvironmentAsync(1);
@@ -1567,8 +1554,7 @@ namespace WalletWasabi.Tests
}
}
- [Fact, TestPriority(13)]
- [Trait("Category", "RunOnCi")]
+ [Fact]
public async Task CcjCoordinatorCtorTestsAsync()
{
(string password, RPCClient rpc, Network network, CcjCoordinator coordinator) = await InitializeTestEnvironmentAsync(1);
@@ -1618,8 +1604,7 @@ namespace WalletWasabi.Tests
Logger.TurnOn();
}
- [Fact, TestPriority(14)]
- [Trait("Category", "RunOnCi")]
+ [Fact]
public async Task CcjTestsAsync()
{
(string password, RPCClient rpc, Network network, CcjCoordinator coordinator) = await InitializeTestEnvironmentAsync(1);
@@ -2086,8 +2071,7 @@ namespace WalletWasabi.Tests
}
}
- [Fact, TestPriority(19)]
- [Trait("Category", "RunOnCi")]
+ [Fact]
public async Task NotingTestsAsync()
{
(string password, RPCClient rpc, Network network, CcjCoordinator coordinator) = await InitializeTestEnvironmentAsync(1);
@@ -2162,8 +2146,7 @@ namespace WalletWasabi.Tests
}
}
- [Fact, TestPriority(19)]
- [Trait("Category", "RunOnCi")]
+ [Fact]
public async Task BanningTestsAsync()
{
(string password, RPCClient rpc, Network network, CcjCoordinator coordinator) = await InitializeTestEnvironmentAsync(1);
@@ -2368,8 +2351,7 @@ namespace WalletWasabi.Tests
}
}
- [Fact, TestPriority(15)]
- [Trait("Category", "RunOnCi")]
+ [Fact]
public async Task Ccj100ParticipantsTestsAsync()
{
(string password, RPCClient rpc, Network network, CcjCoordinator coordinator) = await InitializeTestEnvironmentAsync(1);
@@ -2576,8 +2558,7 @@ namespace WalletWasabi.Tests
}
}
- [Fact, TestPriority(16)]
- [Trait("Category", "RunOnCi")]
+ [Fact]
public async Task CcjClientTestsAsync()
{
(string password, RPCClient rpc, Network network, CcjCoordinator coordinator) = await InitializeTestEnvironmentAsync(1);
@@ -2721,8 +2702,7 @@ namespace WalletWasabi.Tests
}
}
- [Fact, TestPriority(17)]
- [Trait("Category", "RunOnCi")]
+ [Fact]
public async Task CcjClientCustomOutputScriptTestsAsync()
{
(string password, RPCClient rpc, Network network, CcjCoordinator coordinator) = await InitializeTestEnvironmentAsync(1);
@@ -2818,8 +2798,7 @@ namespace WalletWasabi.Tests
}
}
- [Fact, TestPriority(18)]
- [Trait("Category", "RunOnCi")]
+ [Fact]
public async Task CoinJoinMultipleRoundTestsAsync()
{
(string password, RPCClient rpc, Network network, CcjCoordinator coordinator) = await InitializeTestEnvironmentAsync(3);

DELETE
WalletWasabi.Tests/RpcMethodTests.cs
-using WalletWasabi.Tests.NodeBuilding;
-using NBitcoin.RPC;
-using System.Linq;
-using System.Threading.Tasks;
-using Xunit;
-using WalletWasabi.Tests.XunitConfiguration;
-
-namespace WalletWasabi.Tests
-{
- public class RpcMethodTests : IClassFixture<SharedFixture>
- {
- private SharedFixture SharedFixture { get; }
-
- public RpcMethodTests(SharedFixture sharedFixture)
- {
- SharedFixture = sharedFixture;
- }
-
- #region RpcMethodTests
-
- [Fact]
- [Trait("Category", "RunOnCi")]
- public async Task CanWaitForNewBlockFromRpcAsync()
- {
- using (var builder = await NodeBuilder.CreateAsync())
- {
- var rpc = (await builder.CreateNodeAsync()).CreateRpcClient();
- await builder.StartAllAsync();
- var latestBlockTask = rpc.WaitForNewBlockAsync(2 * 1000); // wait for 2 seconds
- var generatedBlock = builder.Nodes.First().Generate(1);
- var latestBlock = await latestBlockTask;
- Assert.True(latestBlockTask.IsCompleted && !latestBlockTask.IsFaulted);
- Assert.Equal(generatedBlock[0].GetHash(), latestBlock.hash);
- }
- }
-
- [Fact]
- [Trait("Category", "RunOnCi")]
- public async Task CanWaitForBlockFromRpcAsync()
- {
- using (var builder = await NodeBuilder.CreateAsync())
- {
- var rpc = (await builder.CreateNodeAsync()).CreateRpcClient();
- await builder.StartAllAsync();
- var generatedBlocks = builder.Nodes.First().Generate(10);
- var latestBlockHash = generatedBlocks.Last().GetHash();
- var latestBlockTask = rpc.WaitForBlockAsync(latestBlockHash);
-
- builder.Nodes.First().BroadcastBlocks(generatedBlocks);
- var latestBlock = await latestBlockTask;
- Assert.True(latestBlockTask.IsCompleted && !latestBlockTask.IsFaulted);
- Assert.Equal(latestBlockHash, latestBlock.hash);
- }
- }
-
- #endregion RpcMethodTests
- }
-}

MODIFY
azure-pipelines-linux.yml
azure-pipelines-linux.yml
@@ -21,4 +21,4 @@ jobs:
inputs:
command: test
projects: 'WalletWasabi.Tests/WalletWasabi.Tests.csproj'
- arguments: --filter Category=RunOnCi --configuration $(testConfiguration)
+ arguments: --filter --configuration $(testConfiguration) --filter "CryptoTests | ModelTests | KeyManagementTests | LiveServerTests | ModelTests | P2pTests"

MODIFY
azure-pipelines-osx.yml
azure-pipelines-osx.yml
@@ -21,4 +21,4 @@ jobs:
inputs:
command: test
projects: 'WalletWasabi.Tests/WalletWasabi.Tests.csproj'
- arguments: --filter Category=RunOnCi --configuration $(testConfiguration)
\ No newline at end of file
+ arguments: --filter --configuration $(testConfiguration) --filter "CryptoTests | ModelTests | KeyManagementTests | LiveServerTests | ModelTests | P2pTests"

MODIFY
azure-pipelines-windows.yml
azure-pipelines-windows.yml
@@ -21,4 +21,4 @@ jobs:
inputs:
command: test
projects: 'WalletWasabi.Tests/WalletWasabi.Tests.csproj'
- arguments: --filter Category=RunOnCi --configuration $(testConfiguration)
+ arguments: --filter --configuration $(testConfiguration) --filter "CryptoTests | ModelTests | KeyManagementTests | LiveServerTests | ModelTests | P2pTests"

Filter CI tests