Skip to content

Commit 59ddcf5

Browse files
author
Jason Yellick
committed
FAB-14035 Add tests for configtxgen encoder
The tests currently covering the configtxgen encoder are almost entirely based on sample config and really cover almost none of the non-green paths. This CR simply replaces all of the existing test with a new ginkgo suite covering 98.4% of lines. The uncovered lines are unreachable and will be removed in a later CR. Change-Id: I2d2bfd7f4437511258a7832a7df0735fab2a2fbf Signed-off-by: Jason Yellick <jyellick@us.ibm.com>
1 parent f8f0da1 commit 59ddcf5

File tree

4 files changed

+1023
-243
lines changed

4 files changed

+1023
-243
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
Copyright IBM Corp. All Rights Reserved.
3+
4+
SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
package encoder_test
8+
9+
import (
10+
"testing"
11+
12+
. "github.com/onsi/ginkgo"
13+
. "github.com/onsi/gomega"
14+
15+
"github.com/hyperledger/fabric/common/crypto"
16+
)
17+
18+
//go:generate counterfeiter -o mock/local_signer.go --fake-name LocalSigner . localSigner
19+
type localSigner interface {
20+
crypto.LocalSigner
21+
}
22+
23+
func TestEncoder(t *testing.T) {
24+
RegisterFailHandler(Fail)
25+
RunSpecs(t, "Encoder Suite")
26+
}

0 commit comments

Comments
 (0)