routing: use require in router test

This commit refactors some of the tests in router_test.go to use the
require package.
This commit is contained in:
yyforyongyu committed 2021-06-23 18:13:03 +08:00
1 parent 8172811e74
commit 54aacacc11
3 files changed
+194 -374

No files matched your search

+3 -4
View File
@@ -2111,10 +2111,9 @@ func TestPathFindSpecExample(t *testing.T) {
// we'll pass that in to ensure that the router uses 100 as the current
// height.
const startingHeight = 100
ctx, cleanUp, err := createTestCtxFromFile(startingHeight, specExampleFilePath)
if err != nil {
t.Fatalf("unable to create router: %v", err)
}
ctx, cleanUp := createTestCtxFromFile(
t, startingHeight, specExampleFilePath,
)
defer cleanUp()
// We'll first exercise the scenario of a direct payment from Bob to