Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions itest/assertions.go
Original file line number Diff line number Diff line change
Expand Up @@ -1275,11 +1275,6 @@ func AssertAssetOutboundTransferWithOutputs(t *testing.T,
outpoints[o.Anchor.Outpoint] = struct{}{}
scripts[string(o.ScriptKey)] = struct{}{}
}

sendRespJSON, err := formatProtoJSON(transfer)
require.NoError(t, err)
t.Logf("Got response from sending assets: %v", sendRespJSON)

// Mine a block to force the send event to complete (confirm on-chain).
var newBlock *wire.MsgBlock
if confirm {
Expand Down Expand Up @@ -1318,23 +1313,11 @@ func AssertAssetOutboundTransferWithOutputs(t *testing.T,
inputAssetIDs, hex.EncodeToString,
)

t.Logf("Want input asset IDs: %v, got: %v",
expectedInputAssetIDs, actualInputAssetIDs)
return fn.All(
expectedInputAssetIDs, func(id string) bool {
return slices.Contains(actualInputAssetIDs, id)
})
}, defaultTimeout, wait.PollInterval)
require.NoError(t, err)

transferResp, err := sender.ListTransfers(
ctxb, &taprpc.ListTransfersRequest{},
)
require.NoError(t, err)

transferRespJSON, err := formatProtoJSON(transferResp)
require.NoError(t, err)
t.Logf("Got response from list transfers: %v", transferRespJSON)

return newBlock
}
Expand Down
2 changes: 1 addition & 1 deletion itest/tapd_harness.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ func newTapdHarness(t *testing.T, ht *harnessTest, cfg tapdConfig,
}

tapCfg := tapcfg.DefaultConfig()
tapCfg.LogDir = "."
tapCfg.LogDir = *logDir
tapCfg.MaxLogFiles = 99
tapCfg.MaxLogFileSize = 999

Expand Down
15 changes: 13 additions & 2 deletions itest/test_harness.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"flag"
"fmt"
"path/filepath"
"testing"
"time"

Expand Down Expand Up @@ -45,8 +46,12 @@ var (

// logLevel is a command line flag for setting the log level of the
// integration test output.
logLevel = flag.String("loglevel", "info", "Set the log level of the "+
logLevel = flag.String("loglevel", "debug", "Set the log level of the "+
"integration test output")

// logDir is the directory for tapd and test logs.
// We hardcode this to match the Makefile's -logdir=regtest flag.
logDir = &[]string{"regtest"}[0]
)

const (
Expand Down Expand Up @@ -201,12 +206,18 @@ func (h *harnessTest) shutdown(_ *testing.T) error {
func (h *harnessTest) setupLogging() {
h.logWriter = build.NewRotatingLogWriter()

// Initialize the log rotator with a file in the log directory.
logConfig := build.DefaultLogConfig()
// Disable console logging to avoid mixing with test output
logConfig.Console.Disable = true
logFile := filepath.Join(*logDir, "tapd.log")
err := h.logWriter.InitLogRotator(logConfig.File, logFile)
require.NoError(h.t, err)

h.logMgr = build.NewSubLoggerManager(
build.NewDefaultLogHandlers(logConfig, h.logWriter)...,
)

var err error
h.interceptor, err = signal.Intercept()
require.NoError(h.t, err)

Expand Down
4 changes: 4 additions & 0 deletions itest/test_list_on_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@
name: "min relay fee bump",
test: testMinRelayFeeBump,
},
{
name: "zero value anchor sweep",
test: testZeroValueAnchorSweep,

Check failure on line 106 in itest/test_list_on_test.go

View workflow job for this annotation

GitHub Actions / run itests postgres

undefined: testZeroValueAnchorSweep

Check failure on line 106 in itest/test_list_on_test.go

View workflow job for this annotation

GitHub Actions / run itests

undefined: testZeroValueAnchorSweep
},
{
name: "restart receiver check balance",
test: testRestartReceiverCheckBalance,
Expand Down
Loading