diff --git a/e2e-network/docker/test-02-v2-raft-2orgs.sh b/e2e-network/docker/test-02-v2-raft-2orgs.sh index 640cc220..666ee5d1 100755 --- a/e2e-network/docker/test-02-v2-raft-2orgs.sh +++ b/e2e-network/docker/test-02-v2-raft-2orgs.sh @@ -83,7 +83,7 @@ waitForContainer "peer1.org1.example.com" "Membership view has changed. peers we waitForContainer "db.explorer.example.com" "database system is ready to accept connections" "200" # // the next check is not working because explorer needs needs to be restarted first # // see the issue: https://github.com/hyperledger-labs/fablo/issues/604 -# waitForContainer "explorer.example.com" "Successfully created channel event hub for \[my-channel1\]" "200" +waitForContainer "explorer.example.com" "Successfully created channel event hub for \[my-channel1\]" "200" # check if org2 is ready waitForContainer "ca.org2.example.com" "Listening on https://0.0.0.0:7054" 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 19afa8f7..d4a29726 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 @@ -1734,6 +1734,7 @@ installChannels() { printItalics "Joining 'my-channel1' on Org1/peer1" "U1F638" docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';" + } installChaincodes() { 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 c61c8714..947bd00e 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 @@ -2471,6 +2471,7 @@ installChannels() { docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'orderer0.group1.orderer.example.com:7030';" printItalics "Joining 'my-channel1' on Org2/peer0" "U1F638" docker exec -i cli.org2.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoin 'my-channel1' 'Org2MSP' 'peer0.org2.example.com:7061' 'crypto/users/Admin@org2.example.com/msp' 'orderer0.group1.orderer.example.com:7030';" + } installChaincodes() { 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 9cda7928..fcf6576e 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 @@ -4038,6 +4038,9 @@ installChannels() { docker exec -i cli.org2.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel3' 'Org2MSP' 'peer0.org2.example.com:7081' 'crypto/users/Admin@org2.example.com/msp' 'crypto/users/Admin@org2.example.com/tls' 'crypto-orderer/tlsca.orderer2.com-cert.pem' 'orderer0.group2.orderer2.com:7050';" printItalics "Joining 'my-channel3' on Org2/peer1" "U1F638" docker exec -i cli.org2.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel3' 'Org2MSP' 'peer1.org2.example.com:7082' 'crypto/users/Admin@org2.example.com/msp' 'crypto/users/Admin@org2.example.com/tls' 'crypto-orderer/tlsca.orderer2.com-cert.pem' 'orderer0.group2.orderer2.com:7050';" + + echo "Restarting global Explorer: explorer.example.com" + docker restart explorer.example.com || true } installChaincodes() { 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 502978e1..323f64b5 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 @@ -4474,6 +4474,9 @@ installChannels() { docker exec -i cli.org2.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel3' 'Org2MSP' 'peer0.org2.example.com:7061' 'crypto/users/Admin@org2.example.com/msp' 'crypto/users/Admin@org2.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';" printItalics "Joining 'my-channel3' on Org2/peer1" "U1F638" docker exec -i cli.org2.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel3' 'Org2MSP' 'peer1.org2.example.com:7062' 'crypto/users/Admin@org2.example.com/msp' 'crypto/users/Admin@org2.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';" + + echo "Restarting global Explorer: explorer.example.com" + docker restart explorer.example.com || true } installChaincodes() { diff --git a/e2e/__snapshots__/fablo-config-hlf3-1orgs-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf3-1orgs-1chaincode.json.test.ts.snap index 67d53749..9d6ea331 100644 --- a/e2e/__snapshots__/fablo-config-hlf3-1orgs-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf3-1orgs-1chaincode.json.test.ts.snap @@ -1947,6 +1947,7 @@ installChannels() { printItalics "Joining 'my-channel1' on Org1/peer1" "U1F638" docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel1' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';" + } installChaincodes() { diff --git a/e2e/__snapshots__/fablo-config-hlf3-bft-1orgs-1chaincode.json.test.ts.snap b/e2e/__snapshots__/fablo-config-hlf3-bft-1orgs-1chaincode.json.test.ts.snap index fc0723c6..53ce0a80 100644 --- a/e2e/__snapshots__/fablo-config-hlf3-bft-1orgs-1chaincode.json.test.ts.snap +++ b/e2e/__snapshots__/fablo-config-hlf3-bft-1orgs-1chaincode.json.test.ts.snap @@ -1971,6 +1971,7 @@ installChannels() { printItalics "Joining 'my-channel1' on Org1/peer1" "U1F638" docker exec -i cli.org1.example.com bash -c "source scripts/channel_fns.sh; fetchChannelAndJoinTls 'my-channel1' 'Org1MSP' 'peer1.org1.example.com:7042' 'crypto/users/Admin@org1.example.com/msp' 'crypto/users/Admin@org1.example.com/tls' 'crypto-orderer/tlsca.orderer.example.com-cert.pem' 'orderer0.group1.orderer.example.com:7030';" + } installChaincodes() { diff --git a/src/setup-docker/templates/fabric-docker/commands-generated.sh b/src/setup-docker/templates/fabric-docker/commands-generated.sh index 71ac171e..9e89f0a7 100644 --- a/src/setup-docker/templates/fabric-docker/commands-generated.sh +++ b/src/setup-docker/templates/fabric-docker/commands-generated.sh @@ -106,6 +106,17 @@ installChannels() { <% }) -%> <% }) -%> <% } -%> + + <% if (global.tools.explorer) { -%> + echo "Restarting global Explorer: <%= global.tools.explorer.address %>" + docker restart <%= global.tools.explorer.address %> || true + <% } -%> + <% orgs.forEach((org) => { -%> + <% if (org.tools.explorer && !global.tools.explorer) { -%> + echo "Restarting org Explorer: <%= org.tools.explorer.address %>" + docker restart <%= org.tools.explorer.address %> || true + <% } -%> + <% }) -%> } installChaincodes() {