Skip to content

Commit

Permalink
[FAB-5750] Fix invalid assertion in ca integration test
Browse files Browse the repository at this point in the history
We need check whether the block is nil after decode the public cert

Change-Id: I8ae9c7a62bd15023cc40d049d4f219fef15d3e9d
Signed-off-by: David Geng <david@arxanfintech.com>
  • Loading branch information
David Geng committed Aug 13, 2017
1 parent 6ed4b84 commit 7392c6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/integration/fabric_ca_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ func TestRegisterEnrollRevoke(t *testing.T) {
}

certPem, _ := pem.Decode(cert)
if err != nil {
t.Fatalf("pem Decode return error: %v", err)
if certPem == nil {
t.Fatal("Fail to decode pem block")
}

cert509, err := x509.ParseCertificate(certPem.Bytes)
Expand Down

0 comments on commit 7392c6e

Please sign in to comment.