Skip to content

Commit 6b6fc08

Browse files
Jun NemotoNao Nishijima
Jun Nemoto
authored and
Nao Nishijima
committed
[FAB-4898] Fix incorrect package and UT failure
UT reports 0% coverage because the test codes use incorrect package in orderer/metadata. Also, the test fails due to the use of unintentional version. This CR fixes it. Change-Id: Ica34ba5ea7b7c454f4bb39bc9a997886f802a965 Signed-off-by: Jun Nemoto <[email protected]> Signed-off-by: Nao Nishijima <[email protected]>
1 parent e28344b commit 6b6fc08

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

orderer/metadata/metadata_test.go

+3-5
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,14 @@ import (
1111
"runtime"
1212
"testing"
1313

14-
"github.com/hyperledger/fabric/common/tools/cryptogen/metadata"
14+
common "github.com/hyperledger/fabric/common/metadata"
15+
"github.com/hyperledger/fabric/orderer/metadata"
1516
"github.com/stretchr/testify/assert"
1617
)
1718

1819
func TestGetVersionInfo(t *testing.T) {
19-
testVersion := "TestVersion"
20-
metadata.Version = testVersion
21-
2220
expected := fmt.Sprintf("%s:\n Version: %s\n Go version: %s\n OS/Arch: %s",
23-
metadata.ProgramName, testVersion, runtime.Version(),
21+
metadata.ProgramName, common.Version, runtime.Version(),
2422
fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH))
2523
assert.Equal(t, expected, metadata.GetVersionInfo())
2624
}

0 commit comments

Comments
 (0)