@@ -1366,14 +1366,14 @@ func TestSaveChannelSuccess(t *testing.T) {
13661366 assert .NotNil (t , err , "Should have failed to sign configuration" )
13671367
13681368 // Test valid Save Channel request (success)
1369- txID , err := cc .SaveChannel (SaveChannelRequest {ChannelID : "mychannel" , ChannelConfig : r }, WithOrdererURL ("example.com" ))
1369+ resp , err := cc .SaveChannel (SaveChannelRequest {ChannelID : "mychannel" , ChannelConfig : r }, WithOrdererURL ("example.com" ))
13701370 assert .Nil (t , err , "error should be nil" )
1371- assert .NotEmpty (t , txID , "transaction ID should be populated" )
1371+ assert .NotEmpty (t , resp . TransactionID , "transaction ID should be populated" )
13721372
13731373 // Test valid Save Channel request (success / filename)
1374- txID , err = cc .SaveChannel (SaveChannelRequest {ChannelID : "mychannel" , ChannelConfigPath : channelConfig }, WithOrdererURL ("example.com" ))
1374+ resp , err = cc .SaveChannel (SaveChannelRequest {ChannelID : "mychannel" , ChannelConfigPath : channelConfig }, WithOrdererURL ("example.com" ))
13751375 assert .Nil (t , err , "error should be nil" )
1376- assert .NotEmpty (t , txID , "transaction ID should be populated" )
1376+ assert .NotEmpty (t , resp . TransactionID , "transaction ID should be populated" )
13771377}
13781378
13791379func TestSaveChannelFailure (t * testing.T ) {
@@ -1435,9 +1435,9 @@ func TestSaveChannelWithOpts(t *testing.T) {
14351435
14361436 // Test empty option (default order is random orderer from config)
14371437 opts := WithOrdererURL ("" )
1438- txID , err := cc .SaveChannel (req , opts )
1438+ resp , err := cc .SaveChannel (req , opts )
14391439 assert .Nil (t , err , "error should be nil" )
1440- assert .NotEmpty (t , txID , "transaction ID should be populated" )
1440+ assert .NotEmpty (t , resp . TransactionID , "transaction ID should be populated" )
14411441
14421442 // Test valid orderer ID
14431443 r2 , err := os .Open (channelConfig )
@@ -1447,9 +1447,9 @@ func TestSaveChannelWithOpts(t *testing.T) {
14471447 req = SaveChannelRequest {ChannelID : "mychannel" , ChannelConfig : r2 }
14481448
14491449 opts = WithOrdererURL ("orderer.example.com" )
1450- txID , err = cc .SaveChannel (req , opts )
1450+ resp , err = cc .SaveChannel (req , opts )
14511451 assert .Nil (t , err , "error should be nil" )
1452- assert .NotEmpty (t , txID , "transaction ID should be populated" )
1452+ assert .NotEmpty (t , resp . TransactionID , "transaction ID should be populated" )
14531453
14541454 // Test invalid orderer ID
14551455 r3 , err := os .Open (channelConfig )
@@ -1505,9 +1505,9 @@ func TestSaveChannelWithMultipleSigningIdenities(t *testing.T) {
15051505 defer r1 .Close ()
15061506
15071507 req := SaveChannelRequest {ChannelID : "mychannel" , ChannelConfig : r1 , SigningIdentities : []msp.SigningIdentity {}}
1508- txID , err := cc .SaveChannel (req , WithOrdererURL ("" ))
1508+ resp , err := cc .SaveChannel (req , WithOrdererURL ("" ))
15091509 assert .Nil (t , err , "Failed to save channel with default signing identity: %s" , err )
1510- assert .NotEmpty (t , txID , "transaction ID should be populated" )
1510+ assert .NotEmpty (t , resp . TransactionID , "transaction ID should be populated" )
15111511
15121512 // multiple signing identities
15131513 r2 , err := os .Open (channelConfig )
@@ -1516,9 +1516,9 @@ func TestSaveChannelWithMultipleSigningIdenities(t *testing.T) {
15161516
15171517 secondCtx := fcmocks .NewMockContext (mspmocks .NewMockSigningIdentity ("second" , "second" ))
15181518 req = SaveChannelRequest {ChannelID : "mychannel" , ChannelConfig : r2 , SigningIdentities : []msp.SigningIdentity {cc .ctx , secondCtx }}
1519- txID , err = cc .SaveChannel (req , WithOrdererURL ("" ))
1519+ resp , err = cc .SaveChannel (req , WithOrdererURL ("" ))
15201520 assert .Nil (t , err , "Failed to save channel with multiple signing identities: %s" , err )
1521- assert .NotEmpty (t , txID , "transaction ID should be populated" )
1521+ assert .NotEmpty (t , resp . TransactionID , "transaction ID should be populated" )
15221522}
15231523
15241524func createClientContext (fabCtx context.Client ) context.ClientProvider {
0 commit comments