You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
chantools/cmd/chantools/walletinfo_test.go

32 lines
590 B
Go

package main
import (
"testing"
"github.com/lightninglabs/chantools/lnd"
"github.com/stretchr/testify/require"
)
const (
walletContent = "03b99ab108e39e9e4cf565c1b706480180a70a4fdc4828e44c50" +
"4530c056be5b5f"
)
func TestWalletInfo(t *testing.T) {
h := newHarness(t)
// Dump the wallet information.
info := &walletInfoCommand{
WalletDB: h.testdataFile("wallet.db"),
WithRootKey: true,
}
t.Setenv(lnd.PasswordEnvName, testPassPhrase)
err := info.Execute(nil, nil)
require.NoError(t, err)
h.assertLogContains(walletContent)
h.assertLogContains(rootKeyAezeed)
}