Skip to content

Commit 21281c6

Browse files
committed
[FAB-8453] Add tests to cc instantiate package
Tests to ensure that the policy parser supports MSP IDs with '.' characters have been added to the package that handles chaincode instantiation as well. Change-Id: I0614ef04920d27716bdefd59cfe961ff8396cf46 Signed-off-by: Alessandro Sorniotti <ale.linux@sopit.net>
1 parent f66e8fd commit 21281c6

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

peer/chaincode/instantiate_test.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ func TestInstantiateCmd(t *testing.T) {
7171
errorExpected: true,
7272
errMsg: "Expected error executing instantiate command without the -c option",
7373
},
74+
{
75+
name: "successful with policy",
76+
args: []string{"-P", "OR('MSP.member', 'MSP.WITH.DOTS.member', 'MSP-WITH-DASHES.member')", "-n", "example02", "-v", "anotherversion", "-C", "mychannel", "-c", "{\"Args\": [\"init\",\"a\",\"100\",\"b\",\"200\"]}"},
77+
errorExpected: false,
78+
errMsg: "Run chaincode instantiate cmd error",
79+
},
7480
}
7581
for _, test := range tests {
7682
t.Run(test.name, func(t *testing.T) {

0 commit comments

Comments
 (0)