From 3d2220796278024f8c4c4b05e2eb9de6fd055a30 Mon Sep 17 00:00:00 2001 From: Sanket Teli Date: Wed, 14 Aug 2024 20:27:00 +0530 Subject: [PATCH] fixed the indentation and linting error Signed-off-by: Sanket Teli --- ...1chaincode-raft-explorer.json.test.ts.snap | 59 +++--- ...fig-hlf2-1org-1chaincode.json.test.ts.snap | 59 +++--- ...2chaincodes-private-data.yaml.test.ts.snap | 65 ++++--- ...2-2orgs-2chaincodes-raft.yaml.test.ts.snap | 172 +++++++++--------- ...1chaincode-raft-explorer.json.test.ts.snap | 159 ++++++++-------- .../templates/fabric-config/configtx.yaml | 87 ++++----- 6 files changed, 284 insertions(+), 317 deletions(-) diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap index 886248b4..91103b2e 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode-raft-explorer.json.test.ts.snap @@ -156,40 +156,37 @@ Orderer: &Group1Defaults Profiles: # Profile used to create Genesis block for group group1 # Group1Genesis: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *OrdererCapabilities - - Consortiums: - SampleConsortium: - Organizations: - - *Orderer - - *Org1 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *OrdererCapabilities + Consortiums: + SampleConsortium: + Organizations: + - *Orderer + - *Org1 # Profile used to create channeltx for my-channel1 # MyChannel1: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *ApplicationCapabilities - - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *ApplicationCapabilities + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 " `; diff --git a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap index ae0094f3..cb5ac25d 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-1org-1chaincode.json.test.ts.snap @@ -152,40 +152,37 @@ Orderer: &Group1Defaults Profiles: # Profile used to create Genesis block for group group1 # Group1Genesis: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *OrdererCapabilities - - Consortiums: - SampleConsortium: - Organizations: - - *Orderer - - *Org1 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *OrdererCapabilities + Consortiums: + SampleConsortium: + Organizations: + - *Orderer + - *Org1 # Profile used to create channeltx for my-channel1 # MyChannel1: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *ApplicationCapabilities - - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *ApplicationCapabilities + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 " `; diff --git a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.test.ts.snap index faff020e..5b4bfb00 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-private-data.yaml.test.ts.snap @@ -203,43 +203,40 @@ Orderer: &Group1Defaults Profiles: # Profile used to create Genesis block for group group1 # Group1Genesis: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *OrdererCapabilities - - Consortiums: - SampleConsortium: - Organizations: - - *Orderer - - *Org1 - - *Org2 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *OrdererCapabilities + Consortiums: + SampleConsortium: + Organizations: + - *Orderer + - *Org1 + - *Org2 # Profile used to create channeltx for my-channel1 # MyChannel1: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - Capabilities: - <<: *ApplicationCapabilities - - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - *Org2 - - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 - - *Org2 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + Capabilities: + <<: *ApplicationCapabilities + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + - *Org2 + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 + - *Org2 " `; diff --git a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap index c9e6e800..5cb507bf 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-2orgs-2chaincodes-raft.yaml.test.ts.snap @@ -249,105 +249,97 @@ Orderer: &Group2Defaults Profiles: # Profile used to create Genesis block for group group1 # Group1Genesis: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer1 - Capabilities: - <<: *OrdererCapabilities - - Consortiums: - SampleConsortium: - Organizations: - - *Orderer1 - - *Orderer2 - - *Org1 - - *Org2 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer1 + Capabilities: + <<: *OrdererCapabilities + Consortiums: + SampleConsortium: + Organizations: + - *Orderer1 + - *Orderer2 + - *Org1 + - *Org2 # Profile used to create Genesis block for group group2 # Group2Genesis: - <<: *ChannelDefaults - Orderer: - <<: *Group2Defaults - Organizations: - - *Orderer2 - Capabilities: - <<: *OrdererCapabilities - - Consortiums: - SampleConsortium: - Organizations: - - *Orderer1 - - *Orderer2 - - *Org1 - - *Org2 + <<: *ChannelDefaults + Orderer: + <<: *Group2Defaults + Organizations: + - *Orderer2 + Capabilities: + <<: *OrdererCapabilities + Consortiums: + SampleConsortium: + Organizations: + - *Orderer1 + - *Orderer2 + - *Org1 + - *Org2 # Profile used to create channeltx for my-channel1 # MyChannel1: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer1 - Capabilities: - <<: *ApplicationCapabilities - - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - *Org2 - - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 - - *Org2 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer1 + Capabilities: + <<: *ApplicationCapabilities + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + - *Org2 + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 + - *Org2 # Profile used to create channeltx for my-channel2 # MyChannel2: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer1 - Capabilities: - <<: *ApplicationCapabilities - - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - *Org2 - - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 - - *Org2 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer1 + Capabilities: + <<: *ApplicationCapabilities + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + - *Org2 + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 + - *Org2 # Profile used to create channeltx for my-channel3 # MyChannel3: - <<: *ChannelDefaults - Orderer: - <<: *Group2Defaults - Organizations: - - *Orderer2 - Capabilities: - <<: *ApplicationCapabilities - - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - *Org2 - - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 - - *Org2 + <<: *ChannelDefaults + Orderer: + <<: *Group2Defaults + Organizations: + - *Orderer2 + Capabilities: + <<: *ApplicationCapabilities + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + - *Org2 + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 + - *Org2 " `; diff --git a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap index 019302db..2bcb9006 100644 --- a/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf2-3orgs-1chaincode-raft-explorer.json.test.ts.snap @@ -253,96 +253,89 @@ Orderer: &Group1Defaults Profiles: # Profile used to create Genesis block for group group1 # Group1Genesis: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - - *Org1 - - *Org2 - - *Org3 - Capabilities: - <<: *OrdererCapabilities - - Consortiums: - SampleConsortium: - Organizations: - - *Orderer - - *Org1 - - *Org2 - - *Org3 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + - *Org1 + - *Org2 + - *Org3 + Capabilities: + <<: *OrdererCapabilities + Consortiums: + SampleConsortium: + Organizations: + - *Orderer + - *Org1 + - *Org2 + - *Org3 # Profile used to create channeltx for my-channel1 # MyChannel1: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - - *Org1 - - *Org2 - - *Org3 - Capabilities: - <<: *ApplicationCapabilities - - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + - *Org1 + - *Org2 + - *Org3 + Capabilities: + <<: *ApplicationCapabilities + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 # Profile used to create channeltx for my-channel2 # MyChannel2: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - - *Org1 - - *Org2 - - *Org3 - Capabilities: - <<: *ApplicationCapabilities - - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org2 - - Application: - <<: *ApplicationDefaults - Organizations: - - *Org2 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + - *Org1 + - *Org2 + - *Org3 + Capabilities: + <<: *ApplicationCapabilities + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org2 + Application: + <<: *ApplicationDefaults + Organizations: + - *Org2 # Profile used to create channeltx for my-channel3 # MyChannel3: - <<: *ChannelDefaults - Orderer: - <<: *Group1Defaults - Organizations: - - *Orderer - - *Org1 - - *Org2 - - *Org3 - Capabilities: - <<: *ApplicationCapabilities - - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - - *Org1 - - *Org2 - - Application: - <<: *ApplicationDefaults - Organizations: - - *Org1 - - *Org2 + <<: *ChannelDefaults + Orderer: + <<: *Group1Defaults + Organizations: + - *Orderer + - *Org1 + - *Org2 + - *Org3 + Capabilities: + <<: *ApplicationCapabilities + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + - *Org2 + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 + - *Org2 " `; diff --git a/src/setup-docker/templates/fabric-config/configtx.yaml b/src/setup-docker/templates/fabric-config/configtx.yaml index 816a8633..c3f81a43 100755 --- a/src/setup-docker/templates/fabric-config/configtx.yaml +++ b/src/setup-docker/templates/fabric-config/configtx.yaml @@ -129,57 +129,48 @@ Profiles: <%_ ordererGroups.forEach(function(ordererGroup) { _%> # Profile used to create Genesis block for group <%= ordererGroup.name %> # <%= ordererGroup.profileName %>: - <<: *ChannelDefaults - Orderer: - <<: *<%= ordererGroup.configtxOrdererDefaults %> - Organizations: - <%_ ordererGroup.hostingOrgs.forEach(function(hostingOrg) { _%> - - *<%= hostingOrg %> - <%_ }) _%> - Capabilities: - <<: *OrdererCapabilities - - <%_ if (!global.capabilities.isV3) { _%> - Consortiums: - SampleConsortium: - Organizations: - <%_ orgs.forEach(function(org){ _%> - - *<%= org.name %> - <%_ }) _%> - <%_ } _%> + <<: *ChannelDefaults + Orderer: + <<: *<%= ordererGroup.configtxOrdererDefaults %> + Organizations: + <%_ ordererGroup.hostingOrgs.forEach(function(hostingOrg) { _%> + - *<%= hostingOrg %> + <%_ }) _%> + Capabilities: + <<: *OrdererCapabilities + <%_ if (!global.capabilities.isV3) { _%> + Consortiums: + SampleConsortium: + Organizations: + <%_ orgs.forEach(function(org){ _%> + - *<%= org.name %> + <%_ }) _%> + <%_ } _%> <%_ }) _%> <%_ channels.forEach(function(channel) { _%> # Profile used to create channeltx for <%= channel.name %> # <%= channel.profileName %>: - <<: *ChannelDefaults - Orderer: - <<: *<%= channel.ordererGroup.configtxOrdererDefaults %> - Organizations: - <%_ channel.ordererGroup.hostingOrgs.forEach(function(hostingOrg) { _%> - - *<%= hostingOrg %> - <%_ }) _%> - Capabilities: - <<: *ApplicationCapabilities - - <%_ if (!global.capabilities.isV3) { _%> - Consortium: SampleConsortium - Consortiums: - SampleConsortium: - Organizations: - <%_ channel.orgs.forEach(function(org){ _%> - - *<%= org.name %> - <%_ }) _%> - <%_ } _%> - - <%_ if (global.capabilities.isV3) { _%> - Consortium: SampleConsortium - <%_ } _%> - - Application: - <<: *ApplicationDefaults - Organizations: - <%_ channel.orgs.forEach(function(org){ _%> - - *<%= org.name %> - <%_ }) _%> + <<: *ChannelDefaults + Orderer: + <<: *<%= channel.ordererGroup.configtxOrdererDefaults %> + Organizations: + <%_ channel.ordererGroup.hostingOrgs.forEach(function(hostingOrg) { _%> + - *<%= hostingOrg %> + <%_ }) _%> + Capabilities: + <<: *ApplicationCapabilities + Consortium: SampleConsortium + Consortiums: + SampleConsortium: + Organizations: + <%_ channel.orgs.forEach(function(org){ _%> + - *<%= org.name %> + <%_ }) _%> + Application: + <<: *ApplicationDefaults + Organizations: + <%_ channel.orgs.forEach(function(org){ _%> + - *<%= org.name %> + <%_ }) _%> <%_ }) _%>