Makes codexAccessFactory follow configuration-runner location
This commit is contained in:
parent
b0a4ed93d8
commit
9970f225cc
|
@ -7,11 +7,12 @@ namespace ContinuousTests
|
||||||
{
|
{
|
||||||
public class CodexAccessFactory
|
public class CodexAccessFactory
|
||||||
{
|
{
|
||||||
public CodexAccess[] Create(RunningContainer[] containers, BaseLog log, ITimeSet timeSet)
|
public CodexAccess[] Create(Configuration config, RunningContainer[] containers, BaseLog log, ITimeSet timeSet)
|
||||||
{
|
{
|
||||||
return containers.Select(container =>
|
return containers.Select(container =>
|
||||||
{
|
{
|
||||||
var address = container.ClusterExternalAddress;
|
var address = container.ClusterExternalAddress;
|
||||||
|
if (config.RunnerLocation == TestRunnerLocation.InternalToCluster) address = container.ClusterInternalAddress;
|
||||||
return new CodexAccess(log, container, timeSet, address);
|
return new CodexAccess(log, container, timeSet, address);
|
||||||
}).ToArray();
|
}).ToArray();
|
||||||
}
|
}
|
||||||
|
|
|
@ -195,7 +195,7 @@ namespace ContinuousTests
|
||||||
{
|
{
|
||||||
var containers = SelectRandomContainers(number);
|
var containers = SelectRandomContainers(number);
|
||||||
fixtureLog.Log("Selected nodes: " + string.Join(",", containers.Select(c => c.Name)));
|
fixtureLog.Log("Selected nodes: " + string.Join(",", containers.Select(c => c.Name)));
|
||||||
return codexNodeFactory.Create(containers, fixtureLog, handle.Test.TimeSet);
|
return codexNodeFactory.Create(config, containers, fixtureLog, handle.Test.TimeSet);
|
||||||
}
|
}
|
||||||
|
|
||||||
private RunningContainer[] SelectRandomContainers(int number)
|
private RunningContainer[] SelectRandomContainers(int number)
|
||||||
|
|
|
@ -55,7 +55,7 @@ namespace ContinuousTests
|
||||||
|
|
||||||
private void CheckCodexNodes(BaseLog log, Configuration config)
|
private void CheckCodexNodes(BaseLog log, Configuration config)
|
||||||
{
|
{
|
||||||
var nodes = codexNodeFactory.Create(config.CodexDeployment.CodexContainers, log, new DefaultTimeSet());
|
var nodes = codexNodeFactory.Create(config, config.CodexDeployment.CodexContainers, log, new DefaultTimeSet());
|
||||||
var pass = true;
|
var pass = true;
|
||||||
foreach (var n in nodes)
|
foreach (var n in nodes)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue