Skip to content

Commit

Permalink
testing: add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
peterjan committed Dec 6, 2023
1 parent 8283666 commit b413cd3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion internal/testing/pruning_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"go.sia.tech/core/types"
"go.sia.tech/renterd/api"
"go.sia.tech/renterd/hostdb"
"go.uber.org/zap/zapcore"
)

func TestHostPruning(t *testing.T) {
Expand All @@ -21,7 +22,9 @@ func TestHostPruning(t *testing.T) {
}

// create a new test cluster
cluster := newTestCluster(t, clusterOptsDefault)
opts := clusterOptsDefault
opts.logger = newTestLoggerCustom(zapcore.DebugLevel)
cluster := newTestCluster(t, opts)
defer cluster.Shutdown()
b := cluster.Bus
w := cluster.Worker
Expand Down Expand Up @@ -82,6 +85,9 @@ func TestHostPruning(t *testing.T) {
}
time.Sleep(50 * time.Millisecond)
}
if remaining != 0 {
t.Log("failed to trigger")
}

// assert the host was not pruned
hostss, err := b.Hosts(context.Background(), api.GetHostsOptions{})
Expand Down

0 comments on commit b413cd3

Please sign in to comment.