Skip to content

Commit

Permalink
FAB-8262 Clean up base_test_setup.go Initialize
Browse files Browse the repository at this point in the history
Change-Id: I5bfd776a42d4b0b68d2a34cd4e4e88439997dd33
Signed-off-by: Emil Nikolov <emil.e.nikolov@gmail.com>
  • Loading branch information
e-nikolov committed Feb 14, 2018
1 parent c981b55 commit ca6fe20
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions test/integration/base_test_setup.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func ExampleCCUpgradeArgs() [][]byte {
}

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

if err := setup.setupEventHub(t, sdk, setup.Identity); err != nil {
if err := setup.setupEventHub(sdk, setup.Identity); err != nil {
return err
}

Expand Down Expand Up @@ -161,7 +161,7 @@ func GetChannel(sdk *fabsdk.FabricSDK, ic fab.IdentityContext, config apiconfig.
return channel, nil
}

func (setup *BaseSetupImpl) setupEventHub(t *testing.T, client *fabsdk.FabricSDK, identity fab.IdentityContext) error {
func (setup *BaseSetupImpl) setupEventHub(client *fabsdk.FabricSDK, identity fab.IdentityContext) error {
eventHub, err := client.FabricProvider().CreateEventHub(identity, setup.ChannelID)
if err != nil {
return err
Expand Down
2 changes: 1 addition & 1 deletion test/integration/fab/install_chaincode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func TestChaincodeInstal(t *testing.T) {
ConnectEventHub: true,
}

if err := testSetup.Initialize(t); err != nil {
if err := testSetup.Initialize(); err != nil {
t.Fatalf(err.Error())
}

Expand Down
2 changes: 1 addition & 1 deletion test/integration/fab/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func initializeTests(t *testing.T, chainCodeID string) integration.BaseSetupImpl
ConnectEventHub: true,
}

if err := testSetup.Initialize(t); err != nil {
if err := testSetup.Initialize(); err != nil {
t.Fatalf(err.Error())
}

Expand Down
2 changes: 1 addition & 1 deletion test/integration/fab/transient_data_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func TestTransient(t *testing.T) {
ConnectEventHub: true,
}

if err := testSetup.Initialize(t); err != nil {
if err := testSetup.Initialize(); err != nil {
t.Fatalf(err.Error())
}

Expand Down
2 changes: 1 addition & 1 deletion test/integration/sdk/channel_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func TestChannelClient(t *testing.T) {
ConnectEventHub: true,
}

if err := testSetup.Initialize(t); err != nil {
if err := testSetup.Initialize(); err != nil {
t.Fatalf(err.Error())
}

Expand Down
4 changes: 2 additions & 2 deletions test/integration/sdk/channel_config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func TestChannelConfig(t *testing.T) {
ConnectEventHub: true,
}

if err := testSetup.Initialize(t); err != nil {
if err := testSetup.Initialize(); err != nil {
t.Fatalf(err.Error())
}

Expand Down Expand Up @@ -81,7 +81,7 @@ func TestChannelConfigWithOrderer(t *testing.T) {
ConnectEventHub: true,
}

if err := testSetup.Initialize(t); err != nil {
if err := testSetup.Initialize(); err != nil {
t.Fatalf(err.Error())
}

Expand Down
2 changes: 1 addition & 1 deletion test/integration/sdk/custom_cryptosuite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestEndToEndForCustomCryptoSuite(t *testing.T) {
ConnectEventHub: true,
}

if err := testSetup.Initialize(t); err != nil {
if err := testSetup.Initialize(); err != nil {
t.Fatalf(err.Error())
}

Expand Down
2 changes: 1 addition & 1 deletion test/integration/sdk/sdk_provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func TestDynamicSelection(t *testing.T) {
ConnectEventHub: true,
}

if err := testSetup.Initialize(t); err != nil {
if err := testSetup.Initialize(); err != nil {
t.Fatalf(err.Error())
}

Expand Down

0 comments on commit ca6fe20

Please sign in to comment.