Makes codexAccessFactory follow configuration-runner location

This commit is contained in:
benbierens 2023-06-30 10:08:51 +02:00
parent b0a4ed93d8
commit 9970f225cc
No known key found for this signature in database
GPG Key ID: FE44815D96D0A1AA
3 changed files with 4 additions and 3 deletions

View File

@ -7,11 +7,12 @@ namespace ContinuousTests
{
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 =>
{
var address = container.ClusterExternalAddress;
if (config.RunnerLocation == TestRunnerLocation.InternalToCluster) address = container.ClusterInternalAddress;
return new CodexAccess(log, container, timeSet, address);
}).ToArray();
}

View File

@ -195,7 +195,7 @@ namespace ContinuousTests
{
var containers = SelectRandomContainers(number);
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)

View File

@ -55,7 +55,7 @@ namespace ContinuousTests
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;
foreach (var n in nodes)
{