-
Notifications
You must be signed in to change notification settings - Fork 8.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FAB-6747]configtxgen unable to read V1.1 sample profs
configtxgen is unable to read in the sample V1.1 profiles due to the period in the profile name as defined in sampleconfig/configtx.yaml (e.g. SampleSingleMSPChannelV1.1). This CR updates the profile names to use underscores instead so Viper is able to locate and load them as expected. Change-Id: Ic7bf03199c20eca466519c406c702221b071602c Signed-off-by: Will Lahti <wtlahti@us.ibm.com>
- Loading branch information
Showing
3 changed files
with
61 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/* | ||
Copyright IBM Corp. 2017 All Rights Reserved. | ||
SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package localconfig | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/hyperledger/fabric/common/flogging" | ||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func init() { | ||
flogging.SetModuleLevel(pkgLogID, "DEBUG") | ||
} | ||
|
||
func TestLoadProfile(t *testing.T) { | ||
pNames := []string{ | ||
SampleDevModeKafkaProfile, | ||
SampleDevModeSoloProfile, | ||
SampleInsecureKafkaProfile, | ||
SampleInsecureSoloProfile, | ||
SampleSingleMSPChannelProfile, | ||
SampleSingleMSPChannelV11Profile, | ||
SampleSingleMSPKafkaProfile, | ||
SampleSingleMSPKafkaV11Profile, | ||
SampleSingleMSPSoloProfile, | ||
SampleSingleMSPSoloV11Profile, | ||
} | ||
for _, pName := range pNames { | ||
t.Run(pName, func(t *testing.T) { | ||
p := Load(pName) | ||
assert.NotNil(t, p, "profile should not be nil") | ||
}) | ||
} | ||
} | ||
|
||
func TestLoadTopLevel(t *testing.T) { | ||
topLevel := LoadTopLevel() | ||
assert.NotNil(t, topLevel.Application, "application should not be nil") | ||
assert.NotNil(t, topLevel.Capabilities, "capabilities should not be nil") | ||
assert.NotNil(t, topLevel.Orderer, "orderer should not be nil") | ||
assert.NotNil(t, topLevel.Organizations, "organizations should not be nil") | ||
assert.NotNil(t, topLevel.Profiles, "profiles should not be nil") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters