-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding for commit phase only dummy impl (#195)
* adding for commit phase only dummy impl Signed-off-by: Sam Yuan <yy19902439@126.com> * fix up Signed-off-by: Sam Yuan <yy19902439@126.com> * impl for endorsement only Signed-off-by: Sam Yuan <yy19902439@126.com> * fix up Signed-off-by: Sam Yuan <yy19902439@126.com> * fix up Signed-off-by: Sam Yuan <yy19902439@126.com>
- Loading branch information
1 parent
b04f171
commit cce0b93
Showing
22 changed files
with
680 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,4 @@ | |
|
||
# Files from IDE | ||
*.idea/ | ||
*.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package e2e | ||
|
||
import ( | ||
"io/ioutil" | ||
"os/exec" | ||
|
||
"tape/e2e/mock" | ||
|
||
. "github.com/onsi/ginkgo" | ||
. "github.com/onsi/gomega" | ||
. "github.com/onsi/gomega/gbytes" | ||
"github.com/onsi/gomega/gexec" | ||
) | ||
|
||
var _ = Describe("Mock test for good path", func() { | ||
|
||
Context("E2E with multi mocked Fabric", func() { | ||
When("envelope only", func() { | ||
It("should work properly", func() { | ||
server, err := mock.NewServer(2, nil) | ||
server.Start() | ||
defer server.Stop() | ||
|
||
config, err := ioutil.TempFile("", "envelop-only-config-*.yaml") | ||
paddrs, oaddr := server.Addresses() | ||
configValue := Values{ | ||
PrivSk: mtlsKeyFile.Name(), | ||
SignCert: mtlsCertFile.Name(), | ||
Mtls: false, | ||
PeersAddrs: paddrs, | ||
OrdererAddr: oaddr, | ||
CommitThreshold: 1, | ||
} | ||
GenerateConfigFile(config.Name(), configValue) | ||
|
||
cmd := exec.Command(tapeBin, "commitOnly", "-c", config.Name(), "-n", "500") | ||
tapeSession, err = gexec.Start(cmd, nil, nil) | ||
Expect(err).NotTo(HaveOccurred()) | ||
Eventually(tapeSession.Out).Should(Say("Time.*Block.*Tx.*")) | ||
}) | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package e2e | ||
|
||
import ( | ||
"io/ioutil" | ||
"os/exec" | ||
|
||
"tape/e2e/mock" | ||
|
||
. "github.com/onsi/ginkgo" | ||
. "github.com/onsi/gomega" | ||
. "github.com/onsi/gomega/gbytes" | ||
"github.com/onsi/gomega/gexec" | ||
) | ||
|
||
var _ = Describe("Mock test for good path", func() { | ||
|
||
Context("E2E with multi mocked Fabric", func() { | ||
When("endorsement only", func() { | ||
It("should work properly", func() { | ||
server, err := mock.NewServer(2, nil) | ||
server.Start() | ||
defer server.Stop() | ||
|
||
config, err := ioutil.TempFile("", "endorsement-only-config-*.yaml") | ||
paddrs, oaddr := server.Addresses() | ||
configValue := Values{ | ||
PrivSk: mtlsKeyFile.Name(), | ||
SignCert: mtlsCertFile.Name(), | ||
Mtls: false, | ||
PeersAddrs: paddrs, | ||
OrdererAddr: oaddr, | ||
CommitThreshold: 1, | ||
} | ||
GenerateConfigFile(config.Name(), configValue) | ||
|
||
cmd := exec.Command(tapeBin, "endorsementOnly", "-c", config.Name(), "-n", "500") | ||
tapeSession, err = gexec.Start(cmd, nil, nil) | ||
Expect(err).NotTo(HaveOccurred()) | ||
Eventually(tapeSession.Out).Should(Say("Time.*Tx.*")) | ||
}) | ||
}) | ||
}) | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.