Adds better check for successful deployment of codex contracts
This commit is contained in:
parent
b590e24de8
commit
99c9b25487
|
@ -5,7 +5,6 @@ namespace DistTestCore.Marketplace
|
||||||
{
|
{
|
||||||
public class CodexContractsStarter : BaseStarter
|
public class CodexContractsStarter : BaseStarter
|
||||||
{
|
{
|
||||||
private const string readyString = "Done! Sleeping indefinitely...";
|
|
||||||
|
|
||||||
public CodexContractsStarter(TestLifecycle lifecycle, WorkflowCreator workflowCreator)
|
public CodexContractsStarter(TestLifecycle lifecycle, WorkflowCreator workflowCreator)
|
||||||
: base(lifecycle, workflowCreator)
|
: base(lifecycle, workflowCreator)
|
||||||
|
@ -25,7 +24,7 @@ namespace DistTestCore.Marketplace
|
||||||
|
|
||||||
WaitUntil(() =>
|
WaitUntil(() =>
|
||||||
{
|
{
|
||||||
var logHandler = new ContractsReadyLogHandler(readyString);
|
var logHandler = new ContractsReadyLogHandler();
|
||||||
workflow.DownloadContainerLog(container, logHandler);
|
workflow.DownloadContainerLog(container, logHandler);
|
||||||
return logHandler.Found;
|
return logHandler.Found;
|
||||||
});
|
});
|
||||||
|
@ -73,18 +72,19 @@ namespace DistTestCore.Marketplace
|
||||||
|
|
||||||
public class ContractsReadyLogHandler : LogHandler
|
public class ContractsReadyLogHandler : LogHandler
|
||||||
{
|
{
|
||||||
private readonly string targetString;
|
// Log should contain 'Compiled 15 Solidity files successfully' at some point.
|
||||||
|
private const string RequiredCompiledString = "Solidity files successfully";
|
||||||
public ContractsReadyLogHandler(string targetString)
|
// When script is done, it prints the ready-string.
|
||||||
{
|
private const string ReadyString = "Done! Sleeping indefinitely...";
|
||||||
this.targetString = targetString;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
public bool SeenCompileString { get; private set; }
|
||||||
public bool Found { get; private set; }
|
public bool Found { get; private set; }
|
||||||
|
|
||||||
protected override void ProcessLine(string line)
|
protected override void ProcessLine(string line)
|
||||||
{
|
{
|
||||||
if (line.Contains(targetString)) Found = true;
|
if (line.Contains(RequiredCompiledString)) SeenCompileString = true;
|
||||||
|
|
||||||
|
if (SeenCompileString && line.Contains(ReadyString)) Found = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,6 @@ namespace KubernetesWorkflow
|
||||||
client = new K8sClient(cluster.GetK8sClientConfig());
|
client = new K8sClient(cluster.GetK8sClientConfig());
|
||||||
|
|
||||||
K8sTestNamespace = cluster.Configuration.K8sNamespacePrefix + testNamespace;
|
K8sTestNamespace = cluster.Configuration.K8sNamespacePrefix + testNamespace;
|
||||||
log.Debug($"Test namespace: '{K8sTestNamespace}'");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Dispose()
|
public void Dispose()
|
||||||
|
|
Loading…
Reference in New Issue