Runner correctly ingests codex-deployment.json
This commit is contained in:
parent
091eae36cc
commit
9d3874c88f
|
@ -94,7 +94,7 @@ namespace ContinuousTests
|
|||
throw new Exception($"Unvalid logpath set: '{configuration.LogPath}'");
|
||||
}
|
||||
|
||||
if (configuration.CodexDeployment != null && configuration.CodexDeployment.CodexContainers.Any())
|
||||
if (configuration.CodexDeployment == null || !configuration.CodexDeployment.CodexContainers.Any())
|
||||
{
|
||||
throw new Exception("No Codex deployment found.");
|
||||
}
|
||||
|
|
|
@ -1,4 +1,6 @@
|
|||
namespace DistTestCore.Marketplace
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace DistTestCore.Marketplace
|
||||
{
|
||||
public class GethStartResult
|
||||
{
|
||||
|
@ -9,6 +11,7 @@
|
|||
CompanionNode = companionNode;
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
public IMarketplaceAccessFactory MarketplaceAccessFactory { get; }
|
||||
public MarketplaceNetwork MarketplaceNetwork { get; }
|
||||
public GethCompanionNodeInfo CompanionNode { get; }
|
||||
|
|
|
@ -23,12 +23,12 @@ namespace KubernetesWorkflow
|
|||
|
||||
public class RunningContainer
|
||||
{
|
||||
public RunningContainer(RunningPod pod, ContainerRecipe recipe, Port[] servicePorts, StartupConfig startupConfig, Address clusterExternalAddress, Address clusterInternalAddress)
|
||||
public RunningContainer(RunningPod pod, ContainerRecipe recipe, Port[] servicePorts, string name, Address clusterExternalAddress, Address clusterInternalAddress)
|
||||
{
|
||||
Pod = pod;
|
||||
Recipe = recipe;
|
||||
ServicePorts = servicePorts;
|
||||
Name = GetContainerName(recipe, startupConfig);
|
||||
Name = name;
|
||||
ClusterExternalAddress = clusterExternalAddress;
|
||||
ClusterInternalAddress = clusterInternalAddress;
|
||||
}
|
||||
|
@ -39,17 +39,5 @@ namespace KubernetesWorkflow
|
|||
public Port[] ServicePorts { get; }
|
||||
public Address ClusterExternalAddress { get; }
|
||||
public Address ClusterInternalAddress { get; }
|
||||
|
||||
private string GetContainerName(ContainerRecipe recipe, StartupConfig startupConfig)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(startupConfig.NameOverride))
|
||||
{
|
||||
return $"<{startupConfig.NameOverride}{recipe.Number}>";
|
||||
}
|
||||
else
|
||||
{
|
||||
return $"<{recipe.Name}>";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,13 +81,28 @@ namespace KubernetesWorkflow
|
|||
var servicePorts = runningPod.GetServicePortsForContainerRecipe(r);
|
||||
log.Debug($"{r} -> service ports: {string.Join(",", servicePorts.Select(p => p.Number))}");
|
||||
|
||||
return new RunningContainer(runningPod, r, servicePorts, startupConfig,
|
||||
var name = GetContainerName(r, startupConfig);
|
||||
|
||||
return new RunningContainer(runningPod, r, servicePorts, name,
|
||||
GetContainerExternalAddress(runningPod, servicePorts),
|
||||
GetContainerInternalAddress(r));
|
||||
|
||||
}).ToArray();
|
||||
}
|
||||
|
||||
private string GetContainerName(ContainerRecipe recipe, StartupConfig startupConfig)
|
||||
{
|
||||
if (startupConfig == null) return "";
|
||||
if (!string.IsNullOrEmpty(startupConfig.NameOverride))
|
||||
{
|
||||
return $"<{startupConfig.NameOverride}{recipe.Number}>";
|
||||
}
|
||||
else
|
||||
{
|
||||
return $"<{recipe.Name}>";
|
||||
}
|
||||
}
|
||||
|
||||
private Address GetContainerExternalAddress(RunningPod pod, Port[] servicePorts)
|
||||
{
|
||||
return new Address(
|
||||
|
|
Loading…
Reference in New Issue