From 6e8dd9e00f4c8039c162d96bdc2b7c76cbeddb1c Mon Sep 17 00:00:00 2001 From: Offer Markovich Date: Tue, 4 Dec 2018 05:53:36 +0200 Subject: [PATCH] htlcswitch: verify test are running with "debug" tag Per team decision all tests should run with "debug" flag. Makefile updated accordingly. A developer may still run the test from command line by "go test ...." The commit protects against this and issue an error if needed. --- htlcswitch/link_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/htlcswitch/link_test.go b/htlcswitch/link_test.go index f52225c3..f14d5bf9 100644 --- a/htlcswitch/link_test.go +++ b/htlcswitch/link_test.go @@ -1758,6 +1758,9 @@ func updateState(batchTick chan time.Time, link *channelLink, // TODO(roasbeef): add sync hook into packet processing so can eliminate all // sleep in this test and the one below func TestChannelLinkBandwidthConsistency(t *testing.T) { + if !hodl.DebugBuild { + t.Fatalf("htlcswitch tests must be run with '-tags debug") + } t.Parallel() // TODO(roasbeef): replace manual bit twiddling with concept of @@ -2693,6 +2696,10 @@ func TestChannelLinkTrimCircuitsPending(t *testing.T) { // TestChannelLinkTrimCircuitsNoCommit checks that the switch and link properly trim // circuits if the ADDs corresponding to open circuits are never committed. func TestChannelLinkTrimCircuitsNoCommit(t *testing.T) { + if !hodl.DebugBuild { + t.Fatalf("htlcswitch tests must be run with '-tags debug") + } + t.Parallel() const (