@@ -7,7 +7,6 @@ SPDX-License-Identifier: Apache-2.0
77package ttx_test
88
99import (
10- "context"
1110 "testing"
1211
1312 "github.com/hyperledger-labs/fabric-smart-client/pkg/utils/errors"
@@ -52,7 +51,7 @@ func TestCleanupExternalWallets_Success(t *testing.T) {
5251 // Create a minimal view and context
5352 view := & ttx.CollectEndorsementsView {}
5453 ctx := & mock2.Context {}
55- ctx .ContextReturns (context . Background ())
54+ ctx .ContextReturns (t . Context ())
5655
5756 // Call the cleanup method
5857 view .CleanupExternalWallets (ctx , externalWallets )
@@ -74,7 +73,7 @@ func TestCleanupExternalWallets_MultipleWallets(t *testing.T) {
7473
7574 view := & ttx.CollectEndorsementsView {}
7675 ctx := & mock2.Context {}
77- ctx .ContextReturns (context . Background ())
76+ ctx .ContextReturns (t . Context ())
7877
7978 view .CleanupExternalWallets (ctx , externalWallets )
8079
@@ -105,7 +104,7 @@ func TestCleanupExternalWallets_DoneError(t *testing.T) {
105104
106105 view := & ttx.CollectEndorsementsView {}
107106 ctx := & mock2.Context {}
108- ctx .ContextReturns (context . Background ())
107+ ctx .ContextReturns (t . Context ())
109108
110109 // Should not panic even if Done() returns errors
111110 view .CleanupExternalWallets (ctx , externalWallets )
@@ -121,7 +120,7 @@ func TestCleanupExternalWallets_EmptyMap(t *testing.T) {
121120
122121 view := & ttx.CollectEndorsementsView {}
123122 ctx := & mock2.Context {}
124- ctx .ContextReturns (context . Background ())
123+ ctx .ContextReturns (t . Context ())
125124
126125 // Should not panic with empty map
127126 view .CleanupExternalWallets (ctx , externalWallets )
0 commit comments