Skip to content

Commit

Permalink
[FAB-10686] testutil->testify core/ledger/util
Browse files Browse the repository at this point in the history
Change-Id: Ia47fc8f9fa060b4a94f5cce92be624af39148cfa
Signed-off-by: Matthew Sykes <sykesmat@us.ibm.com>
  • Loading branch information
sykesm committed Sep 22, 2018
1 parent 6409c4d commit 58aef40
Show file tree
Hide file tree
Showing 3 changed files with 297 additions and 298 deletions.
14 changes: 7 additions & 7 deletions core/ledger/util/couchdb/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,18 @@ import (
"testing"
"time"

"github.com/hyperledger/fabric/common/ledger/testutil"
"github.com/spf13/viper"
"github.com/stretchr/testify/assert"
)

func TestGetCouchDBDefinition(t *testing.T) {
expectedAddress := viper.GetString("ledger.state.couchDBConfig.couchDBAddress")

couchDBDef := GetCouchDBDefinition()
testutil.AssertEquals(t, couchDBDef.URL, expectedAddress)
testutil.AssertEquals(t, couchDBDef.Username, "")
testutil.AssertEquals(t, couchDBDef.Password, "")
testutil.AssertEquals(t, couchDBDef.MaxRetries, 3)
testutil.AssertEquals(t, couchDBDef.MaxRetriesOnStartup, 10)
testutil.AssertEquals(t, couchDBDef.RequestTimeout, time.Second*35)
assert.Equal(t, expectedAddress, couchDBDef.URL)
assert.Equal(t, "", couchDBDef.Username)
assert.Equal(t, "", couchDBDef.Password)
assert.Equal(t, 3, couchDBDef.MaxRetries)
assert.Equal(t, 10, couchDBDef.MaxRetriesOnStartup)
assert.Equal(t, time.Second*35, couchDBDef.RequestTimeout)
}
Loading

0 comments on commit 58aef40

Please sign in to comment.