diff --git a/itest/assertions.go b/itest/assertions.go index 60cf95eb6..3c5790df2 100644 --- a/itest/assertions.go +++ b/itest/assertions.go @@ -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 { @@ -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 } diff --git a/itest/tapd_harness.go b/itest/tapd_harness.go index 7dd5372e8..ee303723e 100644 --- a/itest/tapd_harness.go +++ b/itest/tapd_harness.go @@ -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 diff --git a/itest/test_harness.go b/itest/test_harness.go index 9e5559a5f..619721392 100644 --- a/itest/test_harness.go +++ b/itest/test_harness.go @@ -4,6 +4,7 @@ import ( "context" "flag" "fmt" + "path/filepath" "testing" "time" @@ -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 ( @@ -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) diff --git a/itest/test_list_on_test.go b/itest/test_list_on_test.go index 646781e2c..dd35a9a7f 100644 --- a/itest/test_list_on_test.go +++ b/itest/test_list_on_test.go @@ -101,6 +101,10 @@ var allTestCases = []*testCase{ name: "min relay fee bump", test: testMinRelayFeeBump, }, + { + name: "zero value anchor sweep", + test: testZeroValueAnchorSweep, + }, { name: "restart receiver check balance", test: testRestartReceiverCheckBalance,