itest: require no error when tearing down miners

This commit is contained in:
yyforyongyu 2020-09-03 02:38:54 +08:00
parent c704c5747a
commit 933d84273a
No known key found for this signature in database
GPG Key ID: 9BCD95C4FF296868

@ -2477,7 +2477,12 @@ func testOpenChannelAfterReorg(net *lntest.NetworkHarness, t *harnessTest) {
if err := tempMiner.SetUp(false, 0); err != nil { if err := tempMiner.SetUp(false, 0); err != nil {
t.Fatalf("unable to set up mining node: %v", err) t.Fatalf("unable to set up mining node: %v", err)
} }
defer tempMiner.TearDown() defer func() {
require.NoError(
t.t, tempMiner.TearDown(),
"failed to tear down temp miner",
)
}()
// We start by connecting the new miner to our original miner, // We start by connecting the new miner to our original miner,
// such that it will sync to our original chain. // such that it will sync to our original chain.
@ -14414,7 +14419,9 @@ func TestLightningNetworkDaemon(t *testing.T) {
ht.Fatalf("unable to create mining node: %v", err) ht.Fatalf("unable to create mining node: %v", err)
} }
defer func() { defer func() {
miner.TearDown() require.NoError(
t, miner.TearDown(), "failed to tear down miner",
)
// After shutting down the miner, we'll make a copy of the log // After shutting down the miner, we'll make a copy of the log
// file before deleting the temporary log dir. // file before deleting the temporary log dir.