From a49dc90386d80bb963e1af24a4f5bd9983385be2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Magiera?= Date: Mon, 1 Jun 2020 21:11:37 +0200 Subject: [PATCH] Fix version test --- api/test/test.go | 8 ++++---- build/version.go | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/api/test/test.go b/api/test/test.go index 5972ca757..d28f2e0ee 100644 --- a/api/test/test.go +++ b/api/test/test.go @@ -4,9 +4,11 @@ import ( "context" "testing" + "github.com/stretchr/testify/assert" + "github.com/stretchr/testify/require" + "github.com/filecoin-project/lotus/api" "github.com/filecoin-project/lotus/build" - "github.com/stretchr/testify/assert" ) type TestNode struct { @@ -62,9 +64,7 @@ func (ts *testSuite) testVersion(t *testing.T) { if err != nil { t.Fatal(err) } - if v.Version != build.BuildVersion { - t.Error("Version didn't work properly") - } + require.Equal(t, v.Version, build.BuildVersion) } func (ts *testSuite) testID(t *testing.T) { diff --git a/build/version.go b/build/version.go index 7ee2afe65..51ef3e79d 100644 --- a/build/version.go +++ b/build/version.go @@ -14,7 +14,7 @@ const ( func buildType() string { switch BuildType { case BuildDefault: - return "+default" + return "" case BuildDebug: return "+debug" case Build2k: