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