2
0
mirror of synced 2025-01-12 17:44:08 +00:00
cs-codex-dist-tests/ContinuousTests/CodexAccessFactory.cs

21 lines
660 B
C#
Raw Normal View History

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