Skip to content

Commit

Permalink
Merge "[FAB-5446] Fix orderer metadata local test"
Browse files Browse the repository at this point in the history
  • Loading branch information
yacovm authored and Gerrit Code Review committed Jul 26, 2017
2 parents 5d9c4fc + 7d59d5a commit e5b46d1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions orderer/common/metadata/metadata_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ import (
)

func TestGetVersionInfo(t *testing.T) {
// This test would always fail for development versions because if
// common.Version is not set, the string returned is "development version"
// Set it here for this test to avoid this.
if common.Version == "" {
common.Version = "testVersion"
}

expected := fmt.Sprintf("%s:\n Version: %s\n Go version: %s\n OS/Arch: %s",
metadata.ProgramName, common.Version, runtime.Version(),
fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH))
Expand Down

0 comments on commit e5b46d1

Please sign in to comment.