Restores marketplace test
This commit is contained in:
parent
4f9c0e0ce7
commit
6672427565
|
@ -79,7 +79,7 @@ namespace KubernetesWorkflow
|
|||
|
||||
public string ExecuteCommand(RunningContainer container, string command, params string[] args)
|
||||
{
|
||||
var containerName = container.Name;
|
||||
var containerName = container.Recipe.Name;
|
||||
var cmdAndArgs = $"{containerName}: {command} ({string.Join(",", args)})";
|
||||
log.Debug(cmdAndArgs);
|
||||
|
||||
|
|
|
@ -56,6 +56,13 @@ namespace KubernetesWorkflow
|
|||
}
|
||||
return containerAddress.Address;
|
||||
}
|
||||
|
||||
public Address GetInternalAddress(string portTag)
|
||||
{
|
||||
var containerAddress = Addresses.Single(a => a.PortTag == portTag);
|
||||
if (!containerAddress.IsInteral) throw new Exception(portTag + " refers to an external port");
|
||||
return containerAddress.Address;
|
||||
}
|
||||
}
|
||||
|
||||
public class ContainerAddress
|
||||
|
|
|
@ -95,10 +95,10 @@ namespace CodexPlugin
|
|||
{
|
||||
var mconfig = config.MarketplaceConfig;
|
||||
var gethStart = mconfig.GethNode.StartResult;
|
||||
var wsAddress = gethStart.Container.GetAddress(GethContainerRecipe.WsPortTag);
|
||||
var wsAddress = gethStart.Container.GetInternalAddress(GethContainerRecipe.WsPortTag);
|
||||
var marketplaceAddress = mconfig.CodexContracts.Deployment.MarketplaceAddress;
|
||||
|
||||
AddEnvVar("CODEX_ETH_PROVIDER", $"ws://{wsAddress.Host}:{wsAddress.Port}");
|
||||
AddEnvVar("CODEX_ETH_PROVIDER", $"{wsAddress.Host.Replace("http://", "ws://")}:{wsAddress.Port}");
|
||||
AddEnvVar("CODEX_MARKETPLACE_ADDRESS", marketplaceAddress);
|
||||
AddEnvVar("CODEX_PERSISTENCE", "true");
|
||||
|
||||
|
|
|
@ -1,13 +1,14 @@
|
|||
using Core;
|
||||
using KubernetesWorkflow;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace GethPlugin
|
||||
{
|
||||
public class GethDeployment : IHasContainer
|
||||
{
|
||||
public GethDeployment(RunningContainer container, Port discoveryPort, Port httpPort, Port wsPort, GethAccount account, string pubKey)
|
||||
public GethDeployment(RunningContainers containers, Port discoveryPort, Port httpPort, Port wsPort, GethAccount account, string pubKey)
|
||||
{
|
||||
Container = container;
|
||||
Containers = containers;
|
||||
DiscoveryPort = discoveryPort;
|
||||
HttpPort = httpPort;
|
||||
WsPort = wsPort;
|
||||
|
@ -15,7 +16,9 @@ namespace GethPlugin
|
|||
PubKey = pubKey;
|
||||
}
|
||||
|
||||
public RunningContainer Container { get; }
|
||||
public RunningContainers Containers { get; }
|
||||
[JsonIgnore]
|
||||
public RunningContainer Container { get { return Containers.Containers.Single(); } }
|
||||
public Port DiscoveryPort { get; }
|
||||
public Port HttpPort { get; }
|
||||
public Port WsPort { get; }
|
||||
|
|
|
@ -38,7 +38,7 @@ namespace GethPlugin
|
|||
|
||||
Log($"Geth node started.");
|
||||
|
||||
return new GethDeployment(container, discoveryPort, httpPort, wsPort, account, pubKey);
|
||||
return new GethDeployment(containers, discoveryPort, httpPort, wsPort, account, pubKey);
|
||||
}
|
||||
|
||||
public IGethNode WrapGethContainer(GethDeployment startResult)
|
||||
|
|
Loading…
Reference in New Issue