mirror of
https://github.com/logos-storage/logos-storage-nim-cs-dist-tests.git
synced 2026-06-02 14:39:30 +00:00
add --no-bootstrap-node option via WithNoBootstrapNodes()
Follows the same pattern as --log-format / WithLogFormat(): - NoBootstrapNodes bool property on LogosStorageStartupConfig - WithNoBootstrapNodes() method on ILogosStorageSetup - Passes --no-bootstrap-node CLI flag in LogosStorageProcessRecipe - Sets STORAGE_NO_BOOTSTRAP_NODE=true env var in ContainerRecipe - Applied to bootstrap nodes in AutoBootstrapDistTest
This commit is contained in:
parent
c0cbe608e2
commit
497a48696c
@ -67,6 +67,10 @@ namespace StoragePlugin
|
||||
{
|
||||
AddEnvVar("STORAGE_BOOTSTRAP_NODE", config.BootstrapSpr);
|
||||
}
|
||||
if (config.NoBootstrapNodes)
|
||||
{
|
||||
AddEnvVar("STORAGE_NO_BOOTSTRAP_NODE", "true");
|
||||
}
|
||||
if (config.StorageQuota != null)
|
||||
{
|
||||
AddEnvVar("STORAGE_STORAGE_QUOTA", config.StorageQuota.SizeInBytes.ToString()!);
|
||||
|
||||
@ -72,6 +72,10 @@ namespace StoragePlugin
|
||||
{
|
||||
AddArg("--bootstrap-node", config.BootstrapSpr);
|
||||
}
|
||||
if (config.NoBootstrapNodes)
|
||||
{
|
||||
AddArg("--no-bootstrap-node");
|
||||
}
|
||||
if (config.StorageQuota != null)
|
||||
{
|
||||
AddArg("--storage-quota", config.StorageQuota.SizeInBytes.ToString()!);
|
||||
@ -121,5 +125,10 @@ namespace StoragePlugin
|
||||
{
|
||||
args.Add($"{arg}={val}");
|
||||
}
|
||||
|
||||
private void AddArg(string arg)
|
||||
{
|
||||
args.Add(arg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,6 +12,7 @@ namespace StoragePlugin
|
||||
ILogosStorageSetup WithLogLevel(LogosStorageLogLevel level);
|
||||
ILogosStorageSetup WithLogLevel(LogosStorageLogLevel level, LogosStorageLogCustomTopics customTopics);
|
||||
ILogosStorageSetup WithLogFormat(LogosStorageLogFormat format);
|
||||
ILogosStorageSetup WithNoBootstrapNodes();
|
||||
ILogosStorageSetup WithStorageQuota(ByteSize storageQuota);
|
||||
ILogosStorageSetup WithBlockTTL(TimeSpan duration);
|
||||
ILogosStorageSetup WithBlockMaintenanceInterval(TimeSpan duration);
|
||||
@ -89,6 +90,12 @@ namespace StoragePlugin
|
||||
return this;
|
||||
}
|
||||
|
||||
public ILogosStorageSetup WithNoBootstrapNodes()
|
||||
{
|
||||
NoBootstrapNodes = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ILogosStorageSetup WithStorageQuota(ByteSize storageQuota)
|
||||
{
|
||||
StorageQuota = storageQuota;
|
||||
|
||||
@ -13,6 +13,7 @@ namespace StoragePlugin
|
||||
public LogosStorageLogCustomTopics? CustomTopics { get; set; } = new LogosStorageLogCustomTopics(LogosStorageLogLevel.Info, LogosStorageLogLevel.Warn);
|
||||
public ByteSize? StorageQuota { get; set; }
|
||||
public bool MetricsEnabled { get; set; }
|
||||
public bool NoBootstrapNodes { get; set; }
|
||||
public string? BootstrapSpr { get; set; }
|
||||
public int? BlockTTL { get; set; }
|
||||
public bool? EnableValidator { get; set; }
|
||||
|
||||
@ -14,7 +14,7 @@ namespace LogosStorageTests
|
||||
public void SetupBootstrapNode()
|
||||
{
|
||||
isBooting = true;
|
||||
BootstrapNode = StartLogosStorage(s => s.WithName("BOOTSTRAP_" + GetTestNamespace()).WithLogFormat(LogosStorageLogFormat.Json));
|
||||
BootstrapNode = StartLogosStorage(s => s.WithName("BOOTSTRAP_" + GetTestNamespace()).WithLogFormat(LogosStorageLogFormat.Json).WithNoBootstrapNodes());
|
||||
isBooting = false;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user