57 lines
1.5 KiB
C#
Raw Normal View History

2025-04-25 15:42:13 +02:00
using CodexTests;
2024-11-21 14:17:57 +01:00
using NUnit.Framework;
using Utils;
2024-11-21 10:03:09 +01:00
namespace CodexReleaseTests.NodeTests
{
2024-11-21 14:17:57 +01:00
[TestFixture]
public class BasicInfoTests : CodexDistTest
2024-11-21 10:03:09 +01:00
{
2024-11-21 14:17:57 +01:00
[Test]
public void QuotaTest()
{
var size = 3.GB();
var node = StartCodex(s => s.WithStorageQuota(size));
var space = node.Space();
Assert.That(space.QuotaMaxBytes, Is.EqualTo(size.SizeInBytes));
}
[Test]
public void Spr()
{
var node = StartCodex();
var info = node.GetDebugInfo();
Assert.That(!string.IsNullOrEmpty(info.Spr));
var spr = node.GetSpr();
Assert.That(!string.IsNullOrEmpty(spr));
Assert.That(info.Spr, Is.EqualTo(spr));
}
[Test]
public void VersionInfo()
{
var node = StartCodex();
var info = node.GetDebugInfo();
Assert.That(!string.IsNullOrEmpty(info.Version.Version));
Assert.That(!string.IsNullOrEmpty(info.Version.Revision));
}
[Test]
public void AnnounceAddress()
{
var node = StartCodex();
var addr = node.GetListenEndpoint();
2024-11-21 14:17:57 +01:00
var info = node.GetDebugInfo();
Assert.That(info.AnnounceAddresses.Count, Is.GreaterThan(0));
// Ideally we'd assert the pod IP is in the announce address, but we can't access it from here.
}
2024-11-21 10:03:09 +01:00
}
}