cs-codex-dist-tests/ContinuousTests/CodexAccessFactory.cs

21 lines
664 B
C#
Raw Normal View History

using DistTestCore;
using DistTestCore.Codex;
2023-06-23 08:14:16 +00:00
using KubernetesWorkflow;
using Logging;
namespace ContinuousTests
{
2023-06-29 14:07:49 +00:00
public class CodexAccessFactory
{
public CodexAccess[] Create(Configuration config, RunningContainer[] containers, BaseLog log, ITimeSet timeSet)
{
2023-06-23 08:14:16 +00:00
return containers.Select(container =>
{
2023-06-25 07:53:10 +00:00
var address = container.ClusterExternalAddress;
if (config.RunnerLocation == TestRunnerLocation.InternalToCluster) address = container.ClusterInternalAddress;
2023-06-29 14:07:49 +00:00
return new CodexAccess(log, container, timeSet, address);
}).ToArray();
}
}
}