Skip to content

Commit

Permalink
Fix unstable test code
Browse files Browse the repository at this point in the history
Signed-off-by: Tatsuya Sato <tatsuya.sato.so@hitachi.com>
  • Loading branch information
satota2 authored and denyeart committed Jan 12, 2024
1 parent 91e548d commit 4775d49
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/chaincode/lifecycle/scc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1496,7 +1496,8 @@ var _ = Describe("SCC", func() {
payload := &lb.QueryApprovedChaincodeDefinitionsResult{}
err := proto.Unmarshal(res.Payload, payload)
Expect(err).NotTo(HaveOccurred())
Expect(proto.Equal(payload, &lb.QueryApprovedChaincodeDefinitionsResult{

expectedDefinitions := &lb.QueryApprovedChaincodeDefinitionsResult{
ApprovedChaincodeDefinitions: []*lb.QueryApprovedChaincodeDefinitionsResult_ApprovedChaincodeDefinition{
{
Name: "cc-name1",
Expand Down Expand Up @@ -1550,7 +1551,8 @@ var _ = Describe("SCC", func() {
},
},
},
})).To(BeTrue())
}
Expect(payload.ApprovedChaincodeDefinitions).To(ConsistOf(expectedDefinitions.ApprovedChaincodeDefinitions))

Expect(fakeSCCFuncs.QueryApprovedChaincodeDefinitionsCallCount()).To(Equal(1))
chname, privState := fakeSCCFuncs.QueryApprovedChaincodeDefinitionsArgsForCall(0)
Expand Down

0 comments on commit 4775d49

Please sign in to comment.