File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,6 @@ func main() {
2626 logger .Printf ("::Error: %v\n " , err )
2727 os .Exit (1 )
2828 }
29-
30- logger .Printf ("::Type detected as ccaas" )
3129}
3230
3331type chaincodeMetadata struct {
@@ -59,10 +57,12 @@ func run() error {
5957 return errors .WithMessage (err , "Unable to parse the metadata.json file" )
6058 }
6159
62- if strings .ToLower (metadata .Type ) != "ccaas" {
60+ if strings .ToLower (metadata .Type ) != "ccaas" && strings . ToLower ( metadata . Type ) != "remote" {
6361 return fmt .Errorf ("chaincode type not supported: %s" , metadata .Type )
6462 }
6563
64+ logger .Printf ("::Type detected as: " + strings .ToLower (metadata .Type ))
65+
6666 // returning nil indicates to the peer a successful detection
6767 return nil
6868}
Original file line number Diff line number Diff line change @@ -34,6 +34,10 @@ func TestArugments(t *testing.T) {
3434 exitCode : 0 ,
3535 args : []string {"na" , "testdata/validtype" },
3636 },
37+ "validremote" : {
38+ exitCode : 0 ,
39+ args : []string {"na" , "testdata/validremote" },
40+ },
3741 "wrongtype" : {
3842 exitCode : 1 ,
3943 args : []string {"na" , "testdata/wrongtype" },
Original file line number Diff line number Diff line change 1+ {
2+ "type" : " remote" ,
3+ "label" : " audit-trail"
4+ }
You can’t perform that action at this time.
0 commit comments