Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test "verifies private data is pulled when joining a new peer with new certs" fix #5029

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions integration/pvtdata/pvtdata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -370,14 +370,21 @@ var _ = Describe("PrivateData", func() {
}

By("verifying peer1.org2 got the private data that was created historically")
sess, err = network.PeerUserSession(org2Peer1, "Admin2", commands.ChaincodeQuery{
ChannelID: channelID,
Name: "marblesp",
Ctor: `{"Args":["readMarble","marble1"]}`,
})
Expect(err).NotTo(HaveOccurred())
Eventually(sess, network.EventuallyTimeout).Should(gexec.Exit(0))
Expect(sess).To(gbytes.Say(`{"docType":"marble","name":"marble1","color":"blue","size":35,"owner":"tom"}`))
Eventually(func() bool {
sess, err = network.PeerUserSession(org2Peer1, "Admin2", commands.ChaincodeQuery{
ChannelID: channelID,
Name: "marblesp",
Ctor: `{"Args":["readMarble","marble1"]}`,
})
Expect(err).NotTo(HaveOccurred())
Eventually(sess, network.EventuallyTimeout).Should(gexec.Exit())
if sess.ExitCode() != 0 {
return false
}
Expect(sess).To(gbytes.Say(`{"docType":"marble","name":"marble1","color":"blue","size":35,"owner":"tom"}`))

return true
}, network.EventuallyTimeout).Should(BeTrue())

sess, err = network.PeerUserSession(org2Peer1, "Admin2", commands.ChaincodeQuery{
ChannelID: channelID,
Expand Down