cs-codex-dist-tests/Tests/CodexLongTests/BasicTests/TestInfraTests.cs

32 lines
858 B
C#
Raw Normal View History

using CodexTests;
using DistTestCore;
2023-03-23 11:35:03 +00:00
using NUnit.Framework;
2023-09-20 08:59:52 +00:00
namespace CodexLongTests.BasicTests
2023-03-23 11:35:03 +00:00
{
2023-09-20 08:59:52 +00:00
public class TestInfraTests : CodexDistTest
2023-03-23 11:35:03 +00:00
{
[Test, UseLongTimeouts]
public void TestInfraShouldHave1000AddressSpacesPerPod()
{
2023-09-20 08:59:52 +00:00
var group = AddCodex(1000, s => s.EnableMetrics());
2023-03-23 11:35:03 +00:00
2024-03-26 07:58:16 +00:00
var nodeIds = group.Select(n => n.GetDebugInfo().Id).ToArray();
2023-03-23 11:35:03 +00:00
Assert.That(nodeIds.Length, Is.EqualTo(nodeIds.Distinct().Count()),
"Not all created nodes provided a unique id.");
}
[Test, UseLongTimeouts]
public void TestInfraSupportsManyConcurrentPods()
{
for (var i = 0; i < 20; i++)
{
2023-09-20 08:59:52 +00:00
var n = AddCodex();
2023-03-23 11:35:03 +00:00
2024-03-26 07:58:16 +00:00
Assert.That(!string.IsNullOrEmpty(n.GetDebugInfo().Id));
2023-03-23 11:35:03 +00:00
}
}
}
}