test: add test for presarvation of unlimited configs for inbound systems
Jorropo committed
Mar 15, 2023 at 17:36 UTC
8b05cf05b05f6362756027e266294032b431411a
1 file changed
+16
test/cli/rcmgr_test.go
+16
@@ -127,6 +127,22 @@ func TestRcmgr(t *testing.T) {
127
})
128
})
129
130
+ t.Run("smoke test unlimited System inbounds", func(t *testing.T) {
131
+ t.Parallel()
132
+ node := harness.NewT(t).NewNode().Init()
133
+ node.UpdateUserSuppliedResourceManagerOverrides(func(overrides *rcmgr.PartialLimitConfig) {
134
+ overrides.System.StreamsInbound = rcmgr.Unlimited
135
+ overrides.System.ConnsInbound = rcmgr.Unlimited
136
+ })
137
+ node.StartDaemon()
138
+
139
+ res := node.RunIPFS("swarm", "resources", "--enc=json")
140
+ limits := unmarshalLimits(t, res.Stdout.Bytes())
141
+
142
+ assert.Equal(t, rcmgr.Unlimited, limits.System.ConnsInbound)
143
+ assert.Equal(t, rcmgr.Unlimited, limits.System.StreamsInbound)
144
+ })
145
+
146
t.Run("smoke test transient scope", func(t *testing.T) {
147
t.Parallel()
148
node := harness.NewT(t).NewNode().Init()