From a55d135a7cd00c2be9ccba003eedf9c777f2f267 Mon Sep 17 00:00:00 2001 From: Jakub Dzikowski Date: Tue, 15 Oct 2024 19:55:16 +0200 Subject: [PATCH] Update snapshots Signed-off-by: Jakub Dzikowski --- e2e/__snapshots__/extendConfig.test.ts.snap | 786 ++++++++++++++++++++ 1 file changed, 786 insertions(+) diff --git a/e2e/__snapshots__/extendConfig.test.ts.snap b/e2e/__snapshots__/extendConfig.test.ts.snap index 4c88a858..a926ccf3 100644 --- a/e2e/__snapshots__/extendConfig.test.ts.snap +++ b/e2e/__snapshots__/extendConfig.test.ts.snap @@ -8926,3 +8926,789 @@ exports[`extend config samples/fablo-config-hlf2-3orgs-1chaincode-raft-explorer. ], } `; + +exports[`extend config samples/invalid-fablo-config.json 1`] = ` +{ + "chaincodes": [ + { + "channel": { + "instantiatingOrg": { + "anchorPeers": [ + { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "image": "couchdb:\${COUCHDB_VERSION}", + "type": "CouchDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": false, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + ], + "bootstrapPeers": "peer0.org1.example.com:7041", + "ca": { + "address": "ca.org1.example.com", + "caAdminNameVar": "ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", + "db": "postgres", + "exposePort": 7040, + "fullAddress": "ca.org1.example.com:7054", + "port": 7054, + "prefix": "ca", + }, + "cli": { + "address": "cli.org1.example.com", + }, + "cryptoConfigFileName": "crypto-config-org1", + "domain": "org1.example.com", + "headPeer": { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "image": "couchdb:\${COUCHDB_VERSION}", + "type": "CouchDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": false, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + "mspName": "Org1MSP", + "name": "Org1", + "ordererGroups": [], + "peers": [ + { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "image": "couchdb:\${COUCHDB_VERSION}", + "type": "CouchDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": false, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + ], + "peersCount": 1, + "tools": { + "fabloRest": { + "address": "fablo-rest.org1.example.com", + "discoverySslTargetNameOverrides": "", + "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt", + "discoveryUrls": "grpcs://peer0.org1.example.com:7041", + "fabricCaName": "ca.org1.example.com", + "fabricCaUrl": "https://ca.org1.example.com:7054", + "logging": { + "error": "console", + "info": "console", + "warn": "console", + }, + "mspId": "Org1MSP", + "port": 8801, + }, + }, + }, + "name": "my-channel1", + "ordererGroup": { + "configtxOrdererDefaults": "Group1Defaults", + "consensus": "etcdraft", + "genesisBlockName": "Group1Genesis.block", + "hostingOrgs": [ + "some-org1", + ], + "name": "group1", + "ordererHead": { + "address": "orderer0.group1.orderer.example.com", + "consensus": "etcdraft", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "some-org1", + "orgName": "some-org1", + "port": 7030, + }, + "ordererHeads": [ + { + "address": "orderer0.group1.orderer.example.com", + "consensus": "etcdraft", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "some-org1", + "orgName": "some-org1", + "port": 7030, + }, + ], + "orderers": [ + { + "address": "orderer0.group1.orderer.example.com", + "consensus": "etcdraft", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "some-org1", + "orgName": "some-org1", + "port": 7030, + }, + ], + "profileName": "Group1Genesis", + }, + "ordererHead": { + "address": "orderer0.group1.orderer.example.com", + "consensus": "etcdraft", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "some-org1", + "orgName": "some-org1", + "port": 7030, + }, + "orgs": [ + { + "anchorPeers": [ + { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "image": "couchdb:\${COUCHDB_VERSION}", + "type": "CouchDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": false, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + ], + "bootstrapPeers": "peer0.org1.example.com:7041", + "ca": { + "address": "ca.org1.example.com", + "caAdminNameVar": "ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", + "db": "postgres", + "exposePort": 7040, + "fullAddress": "ca.org1.example.com:7054", + "port": 7054, + "prefix": "ca", + }, + "cli": { + "address": "cli.org1.example.com", + }, + "cryptoConfigFileName": "crypto-config-org1", + "domain": "org1.example.com", + "headPeer": { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "image": "couchdb:\${COUCHDB_VERSION}", + "type": "CouchDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": false, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + "mspName": "Org1MSP", + "name": "Org1", + "ordererGroups": [], + "peers": [ + { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "image": "couchdb:\${COUCHDB_VERSION}", + "type": "CouchDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": false, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + ], + "peersCount": 1, + "tools": { + "fabloRest": { + "address": "fablo-rest.org1.example.com", + "discoverySslTargetNameOverrides": "", + "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt", + "discoveryUrls": "grpcs://peer0.org1.example.com:7041", + "fabricCaName": "ca.org1.example.com", + "fabricCaUrl": "https://ca.org1.example.com:7054", + "logging": { + "error": "console", + "info": "console", + "warn": "console", + }, + "mspId": "Org1MSP", + "port": 8801, + }, + }, + }, + ], + "profileName": "MyChannel1", + }, + "directory": "./chaincodes/chaincode-kv-node", + "endorsement": undefined, + "initRequired": false, + "instantiatingOrg": { + "anchorPeers": [ + { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "image": "couchdb:\${COUCHDB_VERSION}", + "type": "CouchDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": false, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + ], + "bootstrapPeers": "peer0.org1.example.com:7041", + "ca": { + "address": "ca.org1.example.com", + "caAdminNameVar": "ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", + "db": "postgres", + "exposePort": 7040, + "fullAddress": "ca.org1.example.com:7054", + "port": 7054, + "prefix": "ca", + }, + "cli": { + "address": "cli.org1.example.com", + }, + "cryptoConfigFileName": "crypto-config-org1", + "domain": "org1.example.com", + "headPeer": { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "image": "couchdb:\${COUCHDB_VERSION}", + "type": "CouchDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": false, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + "mspName": "Org1MSP", + "name": "Org1", + "ordererGroups": [], + "peers": [ + { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "image": "couchdb:\${COUCHDB_VERSION}", + "type": "CouchDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": false, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + ], + "peersCount": 1, + "tools": { + "fabloRest": { + "address": "fablo-rest.org1.example.com", + "discoverySslTargetNameOverrides": "", + "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt", + "discoveryUrls": "grpcs://peer0.org1.example.com:7041", + "fabricCaName": "ca.org1.example.com", + "fabricCaUrl": "https://ca.org1.example.com:7054", + "logging": { + "error": "console", + "info": "console", + "warn": "console", + }, + "mspId": "Org1MSP", + "port": 8801, + }, + }, + }, + "lang": "node", + "name": "chaincode1", + "privateData": [], + "privateDataConfigFile": undefined, + "version": "0.0.1", + }, + ], + "channels": [ + { + "instantiatingOrg": { + "anchorPeers": [ + { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "image": "couchdb:\${COUCHDB_VERSION}", + "type": "CouchDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": false, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + ], + "bootstrapPeers": "peer0.org1.example.com:7041", + "ca": { + "address": "ca.org1.example.com", + "caAdminNameVar": "ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", + "db": "postgres", + "exposePort": 7040, + "fullAddress": "ca.org1.example.com:7054", + "port": 7054, + "prefix": "ca", + }, + "cli": { + "address": "cli.org1.example.com", + }, + "cryptoConfigFileName": "crypto-config-org1", + "domain": "org1.example.com", + "headPeer": { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "image": "couchdb:\${COUCHDB_VERSION}", + "type": "CouchDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": false, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + "mspName": "Org1MSP", + "name": "Org1", + "ordererGroups": [], + "peers": [ + { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "image": "couchdb:\${COUCHDB_VERSION}", + "type": "CouchDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": false, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + ], + "peersCount": 1, + "tools": { + "fabloRest": { + "address": "fablo-rest.org1.example.com", + "discoverySslTargetNameOverrides": "", + "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt", + "discoveryUrls": "grpcs://peer0.org1.example.com:7041", + "fabricCaName": "ca.org1.example.com", + "fabricCaUrl": "https://ca.org1.example.com:7054", + "logging": { + "error": "console", + "info": "console", + "warn": "console", + }, + "mspId": "Org1MSP", + "port": 8801, + }, + }, + }, + "name": "my-channel1", + "ordererGroup": { + "configtxOrdererDefaults": "Group1Defaults", + "consensus": "etcdraft", + "genesisBlockName": "Group1Genesis.block", + "hostingOrgs": [ + "some-org1", + ], + "name": "group1", + "ordererHead": { + "address": "orderer0.group1.orderer.example.com", + "consensus": "etcdraft", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "some-org1", + "orgName": "some-org1", + "port": 7030, + }, + "ordererHeads": [ + { + "address": "orderer0.group1.orderer.example.com", + "consensus": "etcdraft", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "some-org1", + "orgName": "some-org1", + "port": 7030, + }, + ], + "orderers": [ + { + "address": "orderer0.group1.orderer.example.com", + "consensus": "etcdraft", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "some-org1", + "orgName": "some-org1", + "port": 7030, + }, + ], + "profileName": "Group1Genesis", + }, + "ordererHead": { + "address": "orderer0.group1.orderer.example.com", + "consensus": "etcdraft", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "some-org1", + "orgName": "some-org1", + "port": 7030, + }, + "orgs": [ + { + "anchorPeers": [ + { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "image": "couchdb:\${COUCHDB_VERSION}", + "type": "CouchDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": false, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + ], + "bootstrapPeers": "peer0.org1.example.com:7041", + "ca": { + "address": "ca.org1.example.com", + "caAdminNameVar": "ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", + "db": "postgres", + "exposePort": 7040, + "fullAddress": "ca.org1.example.com:7054", + "port": 7054, + "prefix": "ca", + }, + "cli": { + "address": "cli.org1.example.com", + }, + "cryptoConfigFileName": "crypto-config-org1", + "domain": "org1.example.com", + "headPeer": { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "image": "couchdb:\${COUCHDB_VERSION}", + "type": "CouchDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": false, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + "mspName": "Org1MSP", + "name": "Org1", + "ordererGroups": [], + "peers": [ + { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "image": "couchdb:\${COUCHDB_VERSION}", + "type": "CouchDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": false, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + ], + "peersCount": 1, + "tools": { + "fabloRest": { + "address": "fablo-rest.org1.example.com", + "discoverySslTargetNameOverrides": "", + "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt", + "discoveryUrls": "grpcs://peer0.org1.example.com:7041", + "fabricCaName": "ca.org1.example.com", + "fabricCaUrl": "https://ca.org1.example.com:7054", + "logging": { + "error": "console", + "info": "console", + "warn": "console", + }, + "mspId": "Org1MSP", + "port": 8801, + }, + }, + }, + ], + "profileName": "MyChannel1", + }, + ], + "global": { + "capabilities": { + "application": "V2_0", + "channel": "V2_0", + "isV2": true, + "isV3": false, + "orderer": "V2_0", + }, + "engine": "docker", + "fabricBaseosVersion": "2.3.3", + "fabricCaVersion": "1.5.5", + "fabricCcenvVersion": "2.3.3", + "fabricJavaenvVersion": "2.3", + "fabricNodeenvVersion": "2.3", + "fabricRecommendedNodeVersion": "12", + "fabricVersion": "2.3.3", + "monitoring": { + "loglevel": "info", + }, + "paths": { + "chaincodesBaseDir": "", + "fabloConfig": "", + }, + "tls": true, + "tools": { + "explorer": { + "address": "explorer.example.com", + "port": 7010, + }, + }, + }, + "hooks": { + "postGenerate": "perl -i -pe 's/MaxMessageCount: 10/MaxMessageCount: 1/g' "./fablo-target/fabric-config/configtx.yaml"", + }, + "orderedHeadsDistinct": [ + { + "address": "orderer0.group1.orderer.example.com", + "consensus": "etcdraft", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "some-org1", + "orgName": "some-org1", + "port": 7030, + }, + ], + "ordererGroups": [ + { + "configtxOrdererDefaults": "Group1Defaults", + "consensus": "etcdraft", + "genesisBlockName": "Group1Genesis.block", + "hostingOrgs": [ + "some-org1", + ], + "name": "group1", + "ordererHead": { + "address": "orderer0.group1.orderer.example.com", + "consensus": "etcdraft", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "some-org1", + "orgName": "some-org1", + "port": 7030, + }, + "ordererHeads": [ + { + "address": "orderer0.group1.orderer.example.com", + "consensus": "etcdraft", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "some-org1", + "orgName": "some-org1", + "port": 7030, + }, + ], + "orderers": [ + { + "address": "orderer0.group1.orderer.example.com", + "consensus": "etcdraft", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "some-org1", + "orgName": "some-org1", + "port": 7030, + }, + ], + "profileName": "Group1Genesis", + }, + ], + "orgs": [ + { + "anchorPeers": [], + "bootstrapPeers": """", + "ca": { + "address": "ca.orderer.example.com", + "caAdminNameVar": "SOME-ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "SOME-ORG1_CA_ADMIN_PASSWORD", + "db": "sqlite", + "exposePort": 7020, + "fullAddress": "ca.orderer.example.com:7054", + "port": 7054, + "prefix": "ca", + }, + "cli": { + "address": "cli.orderer.example.com", + }, + "cryptoConfigFileName": "crypto-config-some-org1", + "domain": "orderer.example.com", + "headPeer": undefined, + "mspName": "some-org1", + "name": "some-org1", + "ordererGroups": [ + { + "configtxOrdererDefaults": "Group1Defaults", + "consensus": "etcdraft", + "genesisBlockName": "Group1Genesis.block", + "hostingOrgs": [ + "some-org1", + ], + "name": "group1", + "ordererHeads": [ + { + "address": "orderer0.group1.orderer.example.com", + "consensus": "etcdraft", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "some-org1", + "orgName": "some-org1", + "port": 7030, + }, + ], + "orderers": [ + { + "address": "orderer0.group1.orderer.example.com", + "consensus": "etcdraft", + "domain": "orderer.example.com", + "fullAddress": "orderer0.group1.orderer.example.com:7030", + "name": "orderer0.group1", + "orgMspName": "some-org1", + "orgName": "some-org1", + "port": 7030, + }, + ], + "profileName": "Group1Genesis", + }, + ], + "peers": [], + "peersCount": 0, + "tools": {}, + }, + { + "anchorPeers": [ + { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "image": "couchdb:\${COUCHDB_VERSION}", + "type": "CouchDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": false, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + ], + "bootstrapPeers": "peer0.org1.example.com:7041", + "ca": { + "address": "ca.org1.example.com", + "caAdminNameVar": "ORG1_CA_ADMIN_NAME", + "caAdminPassVar": "ORG1_CA_ADMIN_PASSWORD", + "db": "postgres", + "exposePort": 7040, + "fullAddress": "ca.org1.example.com:7054", + "port": 7054, + "prefix": "ca", + }, + "cli": { + "address": "cli.org1.example.com", + }, + "cryptoConfigFileName": "crypto-config-org1", + "domain": "org1.example.com", + "headPeer": { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "image": "couchdb:\${COUCHDB_VERSION}", + "type": "CouchDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": false, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + "mspName": "Org1MSP", + "name": "Org1", + "ordererGroups": [], + "peers": [ + { + "address": "peer0.org1.example.com", + "couchDbExposePort": 5100, + "db": { + "image": "couchdb:\${COUCHDB_VERSION}", + "type": "CouchDb", + }, + "fullAddress": "peer0.org1.example.com:7041", + "gatewayEnabled": false, + "isAnchorPeer": true, + "name": "peer0", + "port": 7041, + }, + ], + "peersCount": 1, + "tools": { + "fabloRest": { + "address": "fablo-rest.org1.example.com", + "discoverySslTargetNameOverrides": "", + "discoveryTlsCaCertFiles": "/crypto/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt", + "discoveryUrls": "grpcs://peer0.org1.example.com:7041", + "fabricCaName": "ca.org1.example.com", + "fabricCaUrl": "https://ca.org1.example.com:7054", + "logging": { + "error": "console", + "info": "console", + "warn": "console", + }, + "mspId": "Org1MSP", + "port": 8801, + }, + }, + }, + ], +} +`;