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
2021-04-14 12:58:12 +08:00
parent 8172811e74
commit 54aacacc11
3 changed files with 194 additions and 374 deletions

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