Skip to content

Commit

Permalink
fix up
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Yuan <yy19902439@126.com>
  • Loading branch information
SamYuan1990 authored and github-actions[bot] committed Apr 5, 2024
1 parent 1c09326 commit a5c6b1e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 35 deletions.
26 changes: 0 additions & 26 deletions pkg/infra/basic/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,6 @@ import (
)

var _ = Describe("Client", func() {

Context("Client Error handling", func() {
dummy := basic.Node{
Addr: "invalid_addr",
}
logger := log.New()

It("captures error from endorser", func() {
_, err := basic.CreateEndorserClient(dummy, logger)
Expect(err).Should(MatchError(ContainSubstring("error connecting to invalid_addr")))
})
It("captures error from broadcaster", func() {
_, err := basic.CreateBroadcastClient(context.Background(), dummy, logger)
Expect(err).Should(MatchError(ContainSubstring("error connecting to invalid_addr")))
})
It("captures error from DeliverFilter", func() {
_, err := basic.CreateDeliverFilteredClient(context.Background(), dummy, logger)
Expect(err).Should(MatchError(ContainSubstring("error connecting to invalid_addr")))
})

It("captures error from CreateDeliverClient", func() {
_, err := basic.CreateDeliverClient(dummy)
Expect(err).Should(MatchError(ContainSubstring("failed to create new connection")))
})
})

Context("connect with mock peer", func() {
var mockserver *mock.Server
var peerNode, OrdererNode basic.Node
Expand Down
9 changes: 0 additions & 9 deletions pkg/infra/trafficGenerator/proposer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,6 @@ var _ = Describe("Proposer", func() {
Expect(Proposer.Addr).To(Equal(addr))
Expect(err).NotTo(HaveOccurred())
})

It("handle error ", func() {
dummy := basic.Node{
Addr: "invalid_addr",
}
rule := "1 == 1"
_, err := trafficGenerator.CreateProposer(dummy, logger, rule)
Expect(err).Should(MatchError(ContainSubstring("error connecting to invalid_addr")))
})
})

Context("CreateBroadcasters", func() {
Expand Down

0 comments on commit a5c6b1e

Please sign in to comment.