Skip to content

Commit 1ddbf1c

Browse files
committed
[FAB-4440] Fix Consortium in configtxgen code
[FAB-4355] uses the Consortium section, as suggested by jason and david, this patchset update it to Consortium value. Change-Id: I855d7a698b9c1ca32f79f9f8839a2fe7ac9912e0 Signed-off-by: Baohua Yang <[email protected]>
1 parent c2b5f2d commit 1ddbf1c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

common/configtx/tool/configtxgen/main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ func doOutputChannelCreateTx(conf *genesisconfig.Profile, channelID string, outp
7272
}
7373

7474
if conf.Consortium == "" {
75-
return fmt.Errorf("Cannot define a new channel with no Consortium section")
75+
return fmt.Errorf("Cannot define a new channel with no Consortium value")
7676
}
7777

7878
// XXX we ignore the non-application org names here, once the tool supports configuration updates

common/configtx/tool/configtxgen/main_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ func TestMissingOrdererSection(t *testing.T) {
6262
assert.Error(t, doOutputBlock(config, "foo", blockDest), "Missing orderer section")
6363
}
6464

65-
func TestMissingConsortiumSection(t *testing.T) {
65+
func TestMissingConsortiumValue(t *testing.T) {
6666
configTxDest := tmpDir + string(os.PathSeparator) + "configtx"
6767

6868
factory.InitFactories(nil)
6969
config := genesisconfig.Load(genesisconfig.SampleSingleMSPChannelProfile)
7070
config.Consortium = ""
7171

72-
assert.Error(t, doOutputChannelCreateTx(config, "foo", configTxDest), "Missing Consortium section in Application Profile definition")
72+
assert.Error(t, doOutputChannelCreateTx(config, "foo", configTxDest), "Missing Consortium value in Application Profile definition")
7373
}
7474

7575
func TestInspectConfigTx(t *testing.T) {

0 commit comments

Comments
 (0)