Turns off debug logging

This commit is contained in:
benbierens 2023-04-25 13:38:26 +02:00
parent 62f4eed221
commit 52a3a3014d
No known key found for this signature in database
GPG Key ID: FE44815D96D0A1AA
5 changed files with 13 additions and 5 deletions

View File

@ -21,7 +21,7 @@ namespace DistTestCore
public Logging.LogConfig GetLogConfig() public Logging.LogConfig GetLogConfig()
{ {
return new Logging.LogConfig("CodexTestLogs", debugEnabled: true); return new Logging.LogConfig("CodexTestLogs", debugEnabled: false);
} }
public string GetFileManagerFolder() public string GetFileManagerFolder()

View File

@ -30,7 +30,7 @@ namespace DistTestCore.Marketplace
return logHandler.Found; return logHandler.Found;
}); });
var extractor = new ContainerInfoExtractor(workflow, container); var extractor = new ContainerInfoExtractor(lifecycle.Log, workflow, container);
var marketplaceAddress = extractor.ExtractMarketplaceAddress(); var marketplaceAddress = extractor.ExtractMarketplaceAddress();
var abi = extractor.ExtractMarketplaceAbi(); var abi = extractor.ExtractMarketplaceAbi();

View File

@ -1,4 +1,5 @@
using KubernetesWorkflow; using KubernetesWorkflow;
using Logging;
using Newtonsoft.Json; using Newtonsoft.Json;
using Newtonsoft.Json.Linq; using Newtonsoft.Json.Linq;
using Utils; using Utils;
@ -7,17 +8,20 @@ namespace DistTestCore.Marketplace
{ {
public class ContainerInfoExtractor public class ContainerInfoExtractor
{ {
private readonly BaseLog log;
private readonly StartupWorkflow workflow; private readonly StartupWorkflow workflow;
private readonly RunningContainer container; 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.workflow = workflow;
this.container = container; this.container = container;
} }
public string ExtractAccount() public string ExtractAccount()
{ {
log.Debug();
var account = Retry(FetchAccount); var account = Retry(FetchAccount);
if (string.IsNullOrEmpty(account)) throw new InvalidOperationException("Unable to fetch account for geth node. Test infra failure."); 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() public string ExtractPubKey()
{ {
log.Debug();
var pubKey = Retry(FetchPubKey); var pubKey = Retry(FetchPubKey);
if (string.IsNullOrEmpty(pubKey)) throw new InvalidOperationException("Unable to fetch enode from geth node. Test infra failure."); 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() public string ExtractPrivateKey()
{ {
log.Debug();
var privKey = Retry(FetchPrivateKey); var privKey = Retry(FetchPrivateKey);
if (string.IsNullOrEmpty(privKey)) throw new InvalidOperationException("Unable to fetch private key from geth node. Test infra failure."); 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() public string ExtractMarketplaceAddress()
{ {
log.Debug();
var marketplaceAddress = Retry(FetchMarketplaceAddress); var marketplaceAddress = Retry(FetchMarketplaceAddress);
if (string.IsNullOrEmpty(marketplaceAddress)) throw new InvalidOperationException("Unable to fetch marketplace account from codex-contracts node. Test infra failure."); 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() public string ExtractMarketplaceAbi()
{ {
log.Debug();
var marketplaceAbi = Retry(FetchMarketplaceAbi); var marketplaceAbi = Retry(FetchMarketplaceAbi);
if (string.IsNullOrEmpty(marketplaceAbi)) throw new InvalidOperationException("Unable to fetch marketplace artifacts from codex-contracts node. Test infra failure."); if (string.IsNullOrEmpty(marketplaceAbi)) throw new InvalidOperationException("Unable to fetch marketplace artifacts from codex-contracts node. Test infra failure.");

View File

@ -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."); 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 bootstrapContainer = containers.Containers[0];
var extractor = new ContainerInfoExtractor(workflow, bootstrapContainer); var extractor = new ContainerInfoExtractor(lifecycle.Log, workflow, bootstrapContainer);
var account = extractor.ExtractAccount(); var account = extractor.ExtractAccount();
var pubKey = extractor.ExtractPubKey(); var pubKey = extractor.ExtractPubKey();
var privateKey = extractor.ExtractPrivateKey(); var privateKey = extractor.ExtractPrivateKey();

View File

@ -33,7 +33,7 @@ namespace DistTestCore.Marketplace
private GethCompanionNodeInfo CreateCompanionInfo(StartupWorkflow workflow, RunningContainer container) 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 account = extractor.ExtractAccount();
var privKey = extractor.ExtractPrivateKey(); var privKey = extractor.ExtractPrivateKey();
return new GethCompanionNodeInfo(container, account, privKey); return new GethCompanionNodeInfo(container, account, privKey);