@@ -47,12 +47,10 @@ var defaultLimits = []*adapters.GenerateLimit{
4747func TestLoadGenForLoadGen (t * testing.T ) {
4848 t .Parallel ()
4949 for _ , mode := range test .ServerModes {
50- mode := mode
5150 t .Run (fmt .Sprintf ("tls-mode:%s" , mode ), func (t * testing.T ) {
5251 t .Parallel ()
5352 serverCreds , clientCreds := createServerAndClientTLSCerts (t , mode )
5453 for _ , limit := range defaultLimits {
55- limit := limit
5654 t .Run (limitToString (limit ), func (t * testing.T ) {
5755 t .Parallel ()
5856 clientConf := DefaultClientConf ()
@@ -86,12 +84,10 @@ func TestLoadGenForLoadGen(t *testing.T) {
8684func TestLoadGenForVCService (t * testing.T ) {
8785 t .Parallel ()
8886 for _ , mode := range test .ServerModes {
89- mode := mode
9087 t .Run (fmt .Sprintf ("tls-mode:%s" , mode ), func (t * testing.T ) {
9188 t .Parallel ()
9289 serverCreds , clientCreds := createServerAndClientTLSCerts (t , mode )
9390 for _ , limit := range defaultLimits {
94- limit := limit
9591 t .Run (limitToString (limit ), func (t * testing.T ) {
9692 t .Parallel ()
9793 clientConf := DefaultClientConf ()
@@ -108,12 +104,10 @@ func TestLoadGenForVCService(t *testing.T) {
108104func TestLoadGenForSigVerifier (t * testing.T ) {
109105 t .Parallel ()
110106 for _ , mode := range test .ServerModes {
111- mode := mode
112107 t .Run (fmt .Sprintf ("tls-mode:%s" , mode ), func (t * testing.T ) {
113108 t .Parallel ()
114109 serverCreds , clientCreds := createServerAndClientTLSCerts (t , mode )
115110 for _ , limit := range defaultLimits {
116- limit := limit
117111 t .Run (limitToString (limit ), func (t * testing.T ) {
118112 t .Parallel ()
119113 clientConf := DefaultClientConf ()
@@ -151,7 +145,6 @@ func startVerifiers(t *testing.T, serverCreds, clientCreds connection.TLSConfig)
151145func TestLoadGenForCoordinator (t * testing.T ) {
152146 t .Parallel ()
153147 for _ , mode := range test .ServerModes {
154- mode := mode
155148 t .Run (fmt .Sprintf ("tls-mode:%s" , mode ), func (t * testing.T ) {
156149 t .Parallel ()
157150 serverCreds , clientCreds := createServerAndClientTLSCerts (t , mode )
@@ -162,7 +155,6 @@ func TestLoadGenForCoordinator(t *testing.T) {
162155 Transactions : 5 * defaultBlockSize + 2 , // +2 for the config and meta namespace TXs.
163156 },
164157 ) {
165- limit := limit
166158 t .Run (limitToString (limit ), func (t * testing.T ) {
167159 t .Parallel ()
168160 clientConf := DefaultClientConf ()
@@ -197,7 +189,6 @@ func TestLoadGenForCoordinator(t *testing.T) {
197189func TestLoadGenForSidecar (t * testing.T ) {
198190 t .Parallel ()
199191 for _ , mode := range test .ServerModes {
200- mode := mode
201192 t .Run (fmt .Sprintf ("tls-mode:%s" , mode ), func (t * testing.T ) {
202193 t .Parallel ()
203194 serverCreds , clientCreds := createServerAndClientTLSCerts (t , mode )
@@ -206,7 +197,6 @@ func TestLoadGenForSidecar(t *testing.T) {
206197 & adapters.GenerateLimit {Blocks : 5 },
207198 & adapters.GenerateLimit {Transactions : 5 * defaultBlockSize + 1 }, // +1 for the meta namespace TX.
208199 ) {
209- limit := limit
210200 t .Run (limitToString (limit ), func (t * testing.T ) {
211201 t .Parallel ()
212202 clientConf := DefaultClientConf ()
@@ -264,7 +254,6 @@ func TestLoadGenForSidecar(t *testing.T) {
264254func TestLoadGenForOrderer (t * testing.T ) {
265255 t .Parallel ()
266256 for _ , limit := range defaultLimits {
267- limit := limit
268257 t .Run (limitToString (limit ), func (t * testing.T ) {
269258 t .Parallel ()
270259 clientConf := DefaultClientConf ()
@@ -457,7 +446,8 @@ func limitToString(m *adapters.GenerateLimit) string {
457446 return strings .Join (out , "," )
458447}
459448
460- // createServerAndClientTLSCerts creates a tls configuration using the credential factory.
449+ // createServerAndClientTLSCerts creates tls configurations for
450+ // both the server and client.
461451func createServerAndClientTLSCerts (t * testing.T , tlsMode string ) (
462452 serverCreds , clientCreds connection.TLSConfig ,
463453) {
0 commit comments