Skip to content
This repository was archived by the owner on Apr 25, 2025. It is now read-only.

Commit ca6fe20

Browse files
committed
FAB-8262 Clean up base_test_setup.go Initialize
Change-Id: I5bfd776a42d4b0b68d2a34cd4e4e88439997dd33 Signed-off-by: Emil Nikolov <emil.e.nikolov@gmail.com>
1 parent c981b55 commit ca6fe20

File tree

8 files changed

+11
-11
lines changed

8 files changed

+11
-11
lines changed

test/integration/base_test_setup.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func ExampleCCUpgradeArgs() [][]byte {
7575
}
7676

7777
// Initialize reads configuration from file and sets up client, channel and event hub
78-
func (setup *BaseSetupImpl) Initialize(t *testing.T) error {
78+
func (setup *BaseSetupImpl) Initialize() error {
7979
// Create SDK setup for the integration tests
8080
sdk, err := fabsdk.New(config.FromFile(setup.ConfigFile))
8181
if err != nil {
@@ -107,7 +107,7 @@ func (setup *BaseSetupImpl) Initialize(t *testing.T) error {
107107
req := chmgmt.SaveChannelRequest{ChannelID: setup.ChannelID, ChannelConfig: setup.ChannelConfig, SigningIdentity: session}
108108
InitializeChannel(sdk, setup.OrgID, req, targets)
109109

110-
if err := setup.setupEventHub(t, sdk, setup.Identity); err != nil {
110+
if err := setup.setupEventHub(sdk, setup.Identity); err != nil {
111111
return err
112112
}
113113

@@ -161,7 +161,7 @@ func GetChannel(sdk *fabsdk.FabricSDK, ic fab.IdentityContext, config apiconfig.
161161
return channel, nil
162162
}
163163

164-
func (setup *BaseSetupImpl) setupEventHub(t *testing.T, client *fabsdk.FabricSDK, identity fab.IdentityContext) error {
164+
func (setup *BaseSetupImpl) setupEventHub(client *fabsdk.FabricSDK, identity fab.IdentityContext) error {
165165
eventHub, err := client.FabricProvider().CreateEventHub(identity, setup.ChannelID)
166166
if err != nil {
167167
return err

test/integration/fab/install_chaincode_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ func TestChaincodeInstal(t *testing.T) {
3434
ConnectEventHub: true,
3535
}
3636

37-
if err := testSetup.Initialize(t); err != nil {
37+
if err := testSetup.Initialize(); err != nil {
3838
t.Fatalf(err.Error())
3939
}
4040

test/integration/fab/main_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func initializeTests(t *testing.T, chainCodeID string) integration.BaseSetupImpl
5656
ConnectEventHub: true,
5757
}
5858

59-
if err := testSetup.Initialize(t); err != nil {
59+
if err := testSetup.Initialize(); err != nil {
6060
t.Fatalf(err.Error())
6161
}
6262

test/integration/fab/transient_data_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ func TestTransient(t *testing.T) {
2727
ConnectEventHub: true,
2828
}
2929

30-
if err := testSetup.Initialize(t); err != nil {
30+
if err := testSetup.Initialize(); err != nil {
3131
t.Fatalf(err.Error())
3232
}
3333

test/integration/sdk/channel_client_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func TestChannelClient(t *testing.T) {
3636
ConnectEventHub: true,
3737
}
3838

39-
if err := testSetup.Initialize(t); err != nil {
39+
if err := testSetup.Initialize(); err != nil {
4040
t.Fatalf(err.Error())
4141
}
4242

test/integration/sdk/channel_config_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ func TestChannelConfig(t *testing.T) {
3131
ConnectEventHub: true,
3232
}
3333

34-
if err := testSetup.Initialize(t); err != nil {
34+
if err := testSetup.Initialize(); err != nil {
3535
t.Fatalf(err.Error())
3636
}
3737

@@ -81,7 +81,7 @@ func TestChannelConfigWithOrderer(t *testing.T) {
8181
ConnectEventHub: true,
8282
}
8383

84-
if err := testSetup.Initialize(t); err != nil {
84+
if err := testSetup.Initialize(); err != nil {
8585
t.Fatalf(err.Error())
8686
}
8787

test/integration/sdk/custom_cryptosuite_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func TestEndToEndForCustomCryptoSuite(t *testing.T) {
3737
ConnectEventHub: true,
3838
}
3939

40-
if err := testSetup.Initialize(t); err != nil {
40+
if err := testSetup.Initialize(); err != nil {
4141
t.Fatalf(err.Error())
4242
}
4343

test/integration/sdk/sdk_provider_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ func TestDynamicSelection(t *testing.T) {
3535
ConnectEventHub: true,
3636
}
3737

38-
if err := testSetup.Initialize(t); err != nil {
38+
if err := testSetup.Initialize(); err != nil {
3939
t.Fatalf(err.Error())
4040
}
4141

0 commit comments

Comments
 (0)