feat: set default connection limit to unlimited (-1) instead of 1 (#2234)
This avoids the confusion behavior of a session terminating as soon as a single connection using that session is closed.
This commit is contained in:
1 parent
83bf38f030
commit
1f66685864
12 files changed
+178
-24
No files matched your search
@@ -133,7 +133,7 @@ func TestGet(t *testing.T) {
|
||||
HostSourceIds: []string{hs[0].GetPublicId(), hs[1].GetPublicId()},
|
||||
Attrs: &pb.Target_TcpTargetAttributes{},
|
||||
SessionMaxSeconds: wrapperspb.UInt32(28800),
|
||||
SessionConnectionLimit: wrapperspb.Int32(1),
|
||||
SessionConnectionLimit: wrapperspb.Int32(-1),
|
||||
AuthorizedActions: testAuthorizedActions,
|
||||
}
|
||||
for _, ihs := range hs {
|
||||
@@ -227,7 +227,7 @@ func TestList(t *testing.T) {
|
||||
Type: tcp.Subtype.String(),
|
||||
Attrs: &pb.Target_TcpTargetAttributes{},
|
||||
SessionMaxSeconds: wrapperspb.UInt32(28800),
|
||||
SessionConnectionLimit: wrapperspb.Int32(1),
|
||||
SessionConnectionLimit: wrapperspb.Int32(-1),
|
||||
AuthorizedActions: testAuthorizedActions,
|
||||
})
|
||||
totalTars = append(totalTars, wantTars[i])
|
||||
@@ -243,7 +243,7 @@ func TestList(t *testing.T) {
|
||||
Type: tcp.Subtype.String(),
|
||||
Attrs: &pb.Target_TcpTargetAttributes{},
|
||||
SessionMaxSeconds: wrapperspb.UInt32(28800),
|
||||
SessionConnectionLimit: wrapperspb.Int32(1),
|
||||
SessionConnectionLimit: wrapperspb.Int32(-1),
|
||||
AuthorizedActions: testAuthorizedActions,
|
||||
})
|
||||
}
|
||||
@@ -466,7 +466,7 @@ func TestCreate(t *testing.T) {
|
||||
},
|
||||
},
|
||||
SessionMaxSeconds: wrapperspb.UInt32(28800),
|
||||
SessionConnectionLimit: wrapperspb.Int32(1),
|
||||
SessionConnectionLimit: wrapperspb.Int32(-1),
|
||||
AuthorizedActions: testAuthorizedActions,
|
||||
WorkerFilter: wrapperspb.String(`type == "bar"`),
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user