diff --git a/DistTestCore/Configuration.cs b/DistTestCore/Configuration.cs index 6ce375f..5de9afc 100644 --- a/DistTestCore/Configuration.cs +++ b/DistTestCore/Configuration.cs @@ -21,7 +21,7 @@ namespace DistTestCore public Logging.LogConfig GetLogConfig() { - return new Logging.LogConfig("CodexTestLogs", debugEnabled: true); + return new Logging.LogConfig("CodexTestLogs", debugEnabled: false); } public string GetFileManagerFolder() diff --git a/DistTestCore/Marketplace/CodexContractsStarter.cs b/DistTestCore/Marketplace/CodexContractsStarter.cs index cb2c414..412c25a 100644 --- a/DistTestCore/Marketplace/CodexContractsStarter.cs +++ b/DistTestCore/Marketplace/CodexContractsStarter.cs @@ -30,7 +30,7 @@ namespace DistTestCore.Marketplace return logHandler.Found; }); - var extractor = new ContainerInfoExtractor(workflow, container); + var extractor = new ContainerInfoExtractor(lifecycle.Log, workflow, container); var marketplaceAddress = extractor.ExtractMarketplaceAddress(); var abi = extractor.ExtractMarketplaceAbi(); diff --git a/DistTestCore/Marketplace/ContainerInfoExtractor.cs b/DistTestCore/Marketplace/ContainerInfoExtractor.cs index e3b6144..c6ab632 100644 --- a/DistTestCore/Marketplace/ContainerInfoExtractor.cs +++ b/DistTestCore/Marketplace/ContainerInfoExtractor.cs @@ -1,4 +1,5 @@ using KubernetesWorkflow; +using Logging; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Utils; @@ -7,17 +8,20 @@ namespace DistTestCore.Marketplace { public class ContainerInfoExtractor { + private readonly BaseLog log; private readonly StartupWorkflow workflow; private readonly RunningContainer container; - public ContainerInfoExtractor(StartupWorkflow workflow, RunningContainer container) + public ContainerInfoExtractor(BaseLog log, StartupWorkflow workflow, RunningContainer container) { + this.log = log; this.workflow = workflow; this.container = container; } public string ExtractAccount() { + log.Debug(); var account = Retry(FetchAccount); if (string.IsNullOrEmpty(account)) throw new InvalidOperationException("Unable to fetch account for geth node. Test infra failure."); @@ -26,6 +30,7 @@ namespace DistTestCore.Marketplace public string ExtractPubKey() { + log.Debug(); var pubKey = Retry(FetchPubKey); if (string.IsNullOrEmpty(pubKey)) throw new InvalidOperationException("Unable to fetch enode from geth node. Test infra failure."); @@ -34,6 +39,7 @@ namespace DistTestCore.Marketplace public string ExtractPrivateKey() { + log.Debug(); var privKey = Retry(FetchPrivateKey); if (string.IsNullOrEmpty(privKey)) throw new InvalidOperationException("Unable to fetch private key from geth node. Test infra failure."); @@ -42,6 +48,7 @@ namespace DistTestCore.Marketplace public string ExtractMarketplaceAddress() { + log.Debug(); var marketplaceAddress = Retry(FetchMarketplaceAddress); if (string.IsNullOrEmpty(marketplaceAddress)) throw new InvalidOperationException("Unable to fetch marketplace account from codex-contracts node. Test infra failure."); @@ -50,6 +57,7 @@ namespace DistTestCore.Marketplace public string ExtractMarketplaceAbi() { + log.Debug(); var marketplaceAbi = Retry(FetchMarketplaceAbi); if (string.IsNullOrEmpty(marketplaceAbi)) throw new InvalidOperationException("Unable to fetch marketplace artifacts from codex-contracts node. Test infra failure."); diff --git a/DistTestCore/Marketplace/GethBootstrapNodeStarter.cs b/DistTestCore/Marketplace/GethBootstrapNodeStarter.cs index 1a68ee9..7bc582c 100644 --- a/DistTestCore/Marketplace/GethBootstrapNodeStarter.cs +++ b/DistTestCore/Marketplace/GethBootstrapNodeStarter.cs @@ -19,7 +19,7 @@ namespace DistTestCore.Marketplace if (containers.Containers.Length != 1) throw new InvalidOperationException("Expected 1 Geth bootstrap node to be created. Test infra failure."); var bootstrapContainer = containers.Containers[0]; - var extractor = new ContainerInfoExtractor(workflow, bootstrapContainer); + var extractor = new ContainerInfoExtractor(lifecycle.Log, workflow, bootstrapContainer); var account = extractor.ExtractAccount(); var pubKey = extractor.ExtractPubKey(); var privateKey = extractor.ExtractPrivateKey(); diff --git a/DistTestCore/Marketplace/GethCompanionNodeStarter.cs b/DistTestCore/Marketplace/GethCompanionNodeStarter.cs index ad61a9d..7556d58 100644 --- a/DistTestCore/Marketplace/GethCompanionNodeStarter.cs +++ b/DistTestCore/Marketplace/GethCompanionNodeStarter.cs @@ -33,7 +33,7 @@ namespace DistTestCore.Marketplace private GethCompanionNodeInfo CreateCompanionInfo(StartupWorkflow workflow, RunningContainer container) { - var extractor = new ContainerInfoExtractor(workflow, container); + var extractor = new ContainerInfoExtractor(lifecycle.Log, workflow, container); var account = extractor.ExtractAccount(); var privKey = extractor.ExtractPrivateKey(); return new GethCompanionNodeInfo(container, account, privKey);