Eric 13d453d5ed
chore: Docker updates to support release tests in logos-storage-nim, and remove Codex references (#124)
* ci(docker): build dist-tests images

* Update to .net 10, kubernetes client 18.0.13

Kubernetes client 18.0.13 is compatible with Kubernetes 1.34.x. The Kubernetes version is selected automatically by kubeadm in docker desktop (v1.34.1). See https://github.com/kubernetes-client/csharp#version-compatibility for a compatibility table.

* Updates to support Kubernetes upgrade

* bump openapi.yaml to match openapi.yaml in the logos-storage-nim docker image

* bump doc to .net 10

* bump docker to .net 10

* Build image with latest tag always

Always build an image with a latest tag (as well as a sha commit hash) when there's a push to master

* docker image tag as "latest" only when pushing to master

* Update docker image to install doctl

* Remove doctl install

kubeconfig is now created and uses a plain bearer token instead of using doctl as a credential mgr

* Rename and remove all instances of Codex

* Further remove CodexNetDeployer as it is no longer needed

---------

Co-authored-by: Adam Uhlíř <adam@uhlir.dev>
2026-04-17 15:03:22 +10:00

61 lines
1.8 KiB
C#

using LogosStorageClient;
using LogosStorageTests;
using Logging;
using NUnit.Framework;
using Utils;
namespace LogosStorageReleaseTests.DataTests.DHT
{
[Ignore("work in progress")]
[TestFixture(10, 1000)]
[TestFixture(50, 1000)]
[TestFixture(10, 10000)]
[TestFixture(20, 10000)]
[TestFixture(30, 10000)]
[TestFixture(50, 10000)]
public class DhtTest : AutoBootstrapDistTest
{
public DhtTest(int nodes, int files)
{
numNodes = nodes;
numFilesPerNode = files;
}
private readonly int numNodes;
private readonly int numFilesPerNode;
private readonly int numToFetch = 200;
private readonly ByteSize fileSize = 100.KB();
private readonly TimeSpan maxDownloadDuration = TimeSpan.FromSeconds(5.0);
[Test]
public void PressureTest()
{
var cids = new List<ContentId>();
var nodes = StartLogosStorage(numNodes);
for (var i = 0; i < numFilesPerNode; i++)
{
foreach (var n in nodes)
{
cids.Add(n.UploadFile(GenerateTestFile(fileSize)));
}
}
// We announce both manifest-cid and tree-cid for each file;
var estimate = numNodes * numFilesPerNode * 2;
Log($"Estimate of DHT records: {estimate}");
var node = StartLogosStorage();
for (var i = 0; i < numToFetch; i++)
{
var timing = Stopwatch.Measure(GetTestLog(), nameof(PressureTest) + i, () =>
{
node.DownloadContent(cids.PickOneRandom());
});
Assert.That(timing, Is.LessThan(maxDownloadDuration));
}
}
}
}