From 9970f225ccc25f5b5b6ca3d1e5bbd8e40d62cf23 Mon Sep 17 00:00:00 2001 From: benbierens Date: Fri, 30 Jun 2023 10:08:51 +0200 Subject: [PATCH] Makes codexAccessFactory follow configuration-runner location --- ContinuousTests/CodexAccessFactory.cs | 3 ++- ContinuousTests/SingleTestRun.cs | 2 +- ContinuousTests/StartupChecker.cs | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ContinuousTests/CodexAccessFactory.cs b/ContinuousTests/CodexAccessFactory.cs index 08eb815..a149017 100644 --- a/ContinuousTests/CodexAccessFactory.cs +++ b/ContinuousTests/CodexAccessFactory.cs @@ -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(); } diff --git a/ContinuousTests/SingleTestRun.cs b/ContinuousTests/SingleTestRun.cs index 2accc79..cb1c801 100644 --- a/ContinuousTests/SingleTestRun.cs +++ b/ContinuousTests/SingleTestRun.cs @@ -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) diff --git a/ContinuousTests/StartupChecker.cs b/ContinuousTests/StartupChecker.cs index e4889b9..4c33ccd 100644 --- a/ContinuousTests/StartupChecker.cs +++ b/ContinuousTests/StartupChecker.cs @@ -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) {