From 7da90fc53b5fe292e57061ae90418b36c77f7aa6 Mon Sep 17 00:00:00 2001 From: benbierens Date: Thu, 24 Aug 2023 15:32:08 +0200 Subject: [PATCH] cleanup --- CodexNetDeployer/PeerConnectivityChecker.cs | 8 ++++---- CodexNetDeployer/Program.cs | 3 --- .../FullyConnectedDownloadTests.cs | 2 +- Tests/PeerDiscoveryTests/PeerDiscoveryTests.cs | 5 +---- 4 files changed, 6 insertions(+), 12 deletions(-) diff --git a/CodexNetDeployer/PeerConnectivityChecker.cs b/CodexNetDeployer/PeerConnectivityChecker.cs index a3baa17..6e7eddb 100644 --- a/CodexNetDeployer/PeerConnectivityChecker.cs +++ b/CodexNetDeployer/PeerConnectivityChecker.cs @@ -7,17 +7,17 @@ namespace CodexNetDeployer { public void CheckConnectivity(List startResults) { - var checker = new PeerConnectionTestHelpers(new ConsoleLogger()); - + var log = new ConsoleLog(); + var checker = new PeerConnectionTestHelpers(log); var access = startResults.Select(r => r.Access); checker.AssertFullyConnected(access); } } - public class ConsoleLogger : BaseLog + public class ConsoleLog : BaseLog { - public ConsoleLogger() : base(false) + public ConsoleLog() : base(false) { } diff --git a/CodexNetDeployer/Program.cs b/CodexNetDeployer/Program.cs index da18e01..8ddf527 100644 --- a/CodexNetDeployer/Program.cs +++ b/CodexNetDeployer/Program.cs @@ -56,8 +56,5 @@ public class Program Console.WriteLine("CodexNetDeployer allows you to easily deploy multiple Codex nodes in a Kubernetes cluster. " + "The deployer will set up the required supporting services, deploy the Codex on-chain contracts, start and bootstrap the Codex instances. " + "All Kubernetes objects will be created in the namespace provided, allowing you to easily find, modify, and delete them afterwards." + nl); - - Console.WriteLine("CodexNetDeployer assumes you are running this tool from *inside* the Kubernetes cluster you want to deploy to. " + - "If you are not running this from a container inside the cluster, add the argument '--external'." + nl); } } diff --git a/Tests/DownloadConnectivityTests/FullyConnectedDownloadTests.cs b/Tests/DownloadConnectivityTests/FullyConnectedDownloadTests.cs index 4f91f64..a234aeb 100644 --- a/Tests/DownloadConnectivityTests/FullyConnectedDownloadTests.cs +++ b/Tests/DownloadConnectivityTests/FullyConnectedDownloadTests.cs @@ -12,7 +12,7 @@ namespace Tests.DownloadConnectivityTests [Values(1, 3, 5)] int numberOfNodes, [Values(1, 10)] int sizeMBs) { - for (var i = 0; i < numberOfNodes; i++) SetupCodexNode(); + SetupCodexNodes(numberOfNodes); CreatePeerDownloadTestHelpers().AssertFullDownloadInterconnectivity(GetAllOnlineCodexNodes(), sizeMBs.MB()); } diff --git a/Tests/PeerDiscoveryTests/PeerDiscoveryTests.cs b/Tests/PeerDiscoveryTests/PeerDiscoveryTests.cs index 94e7075..170f850 100644 --- a/Tests/PeerDiscoveryTests/PeerDiscoveryTests.cs +++ b/Tests/PeerDiscoveryTests/PeerDiscoveryTests.cs @@ -22,10 +22,7 @@ namespace Tests.PeerDiscoveryTests [TestCase(20)] public void VariableNodesInPods(int number) { - for (var i = 0; i < number; i++) - { - SetupCodexNode(); - } + SetupCodexNodes(number); AssertAllNodesConnected(); }