diff --git a/codex/codex_test.go b/codex/codex_test.go index deb7cb7..060a22e 100644 --- a/codex/codex_test.go +++ b/codex/codex_test.go @@ -79,3 +79,13 @@ func TestPeerId(t *testing.T) { t.Logf("Codex PeerId: %s", peerId) } + +func TestStorageQuota(t *testing.T) { + node := newCodexNode(t, Config{ + StorageQuota: 1024 * 1024 * 1024, // 1GB + }) + + if node == nil { + t.Fatal("expected codex node to be created") + } +} diff --git a/codex/testutil.go b/codex/testutil.go index 274495b..fb0471c 100644 --- a/codex/testutil.go +++ b/codex/testutil.go @@ -14,7 +14,7 @@ func defaultConfigHelper(t *testing.T) Config { LogFormat: LogFormatNoColors, MetricsEnabled: false, BlockRetries: 3000, - LogLevel: "ERROR", + Nat: "none", } } @@ -43,6 +43,10 @@ func newCodexNode(t *testing.T, opts ...Config) *CodexNode { if c.DiscoveryPort != 0 { config.DiscoveryPort = c.DiscoveryPort } + + if c.StorageQuota != 0 { + config.StorageQuota = c.StorageQuota + } } node, err := New(config) diff --git a/vendor/nim-codex b/vendor/nim-codex index 480bd3b..5a227db 160000 --- a/vendor/nim-codex +++ b/vendor/nim-codex @@ -1 +1 @@ -Subproject commit 480bd3b65917da0f90ea43146bd73986ef5272e0 +Subproject commit 5a227dbb561672667c5c0285a417175b5004ddf7