Skip to content

Commit

Permalink
test: add test for presarvation of unlimited configs for inbound systems
Browse files Browse the repository at this point in the history
  • Loading branch information
Jorropo committed Mar 15, 2023
1 parent 6388487 commit 74a65cf
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/cli/rcmgr_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,22 @@ func TestRcmgr(t *testing.T) {
})
})

t.Run("smoke test unlimited System inbounds", func(t *testing.T) {
t.Parallel()
node := harness.NewT(t).NewNode().Init()
node.UpdateUserSuppliedResourceManagerOverrides(func(overrides *rcmgr.PartialLimitConfig) {
overrides.System.StreamsInbound = rcmgr.Unlimited
overrides.System.ConnsInbound = rcmgr.Unlimited
})
node.StartDaemon()

res := node.RunIPFS("swarm", "resources", "--enc=json")
limits := unmarshalLimits(t, res.Stdout.Bytes())

assert.Equal(t, rcmgr.Unlimited, limits.System.ConnsInbound)
assert.Equal(t, rcmgr.Unlimited, limits.System.StreamsInbound)
})

t.Run("smoke test transient scope", func(t *testing.T) {
t.Parallel()
node := harness.NewT(t).NewNode().Init()
Expand Down

0 comments on commit 74a65cf

Please sign in to comment.