Skip to content

Commit

Permalink
Merge "[FAB-4440] Fix Consortium in configtxgen code"
Browse files Browse the repository at this point in the history
  • Loading branch information
christo4ferris authored and Gerrit Code Review committed Jun 10, 2017
2 parents b21b6d4 + 1ddbf1c commit 4eb5815
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion common/configtx/tool/configtxgen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func doOutputChannelCreateTx(conf *genesisconfig.Profile, channelID string, outp
}

if conf.Consortium == "" {
return fmt.Errorf("Cannot define a new channel with no Consortium section")
return fmt.Errorf("Cannot define a new channel with no Consortium value")
}

// XXX we ignore the non-application org names here, once the tool supports configuration updates
Expand Down
4 changes: 2 additions & 2 deletions common/configtx/tool/configtxgen/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ func TestMissingOrdererSection(t *testing.T) {
assert.Error(t, doOutputBlock(config, "foo", blockDest), "Missing orderer section")
}

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

factory.InitFactories(nil)
config := genesisconfig.Load(genesisconfig.SampleSingleMSPChannelProfile)
config.Consortium = ""

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

func TestInspectMissingConfigTx(t *testing.T) {
Expand Down

0 comments on commit 4eb5815

Please sign in to comment.