Skip to content

Commit

Permalink
[FAB-10545] extended peer runner for some e2e tests
Browse files Browse the repository at this point in the history
added the option to pass env vars that are needed for
private data e2e tests (leader election flags) and also
added a function that allows to get channel info which
will be used in some e2e tests.

Change-Id: If2de895329f6aa53f7f47d945225fd31d4f1da5f
Signed-off-by: nirro <[email protected]>
  • Loading branch information
nirrozenbaum committed Jun 7, 2018
1 parent 8ba2baf commit 08887b2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions integration/runner/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,19 @@ func (p *Peer) CreateChannel(channel string, filename string, orderer string) *g
return r
}

func (p *Peer) GetChannelInfo(channel string) *ginkgomon.Runner {
cmd := exec.Command(p.Path, "channel", "getinfo", "-c", channel)
p.setupEnvironment(cmd)

r := ginkgomon.New(ginkgomon.Config{
Name: "channel get info",
AnsiColorCode: "4;35m",
Command: cmd,
})

return r
}

func (p *Peer) FetchChannel(channel string, filename string, block string, orderer string) *ginkgomon.Runner {
cmd := exec.Command(p.Path, "channel", "fetch", block, "-c", channel, "-o", orderer, filename)
p.setupEnvironment(cmd)
Expand Down

0 comments on commit 08887b2

Please sign in to comment.