Skip to content

Commit

Permalink
Add test for goroutine leak
Browse files Browse the repository at this point in the history
Signed-off-by: Hayden Blauzvern <hblauzvern@google.com>
  • Loading branch information
haydentherapper committed May 10, 2023
1 parent 98cb398 commit 2112494
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/witness/publish_checkpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import (
"github.com/prometheus/client_golang/prometheus/testutil"
"github.com/sigstore/rekor/pkg/witness/mockclient"
"github.com/sigstore/sigstore/pkg/signature"
"go.uber.org/goleak"
)

func TestPublishCheckpoint(t *testing.T) {
Expand Down Expand Up @@ -317,3 +318,7 @@ func TestPublishCheckpointRedisLatestFailure(t *testing.T) {
t.Fatalf("unexpected number of metrics: %2f", res)
}
}

func TestMain(m *testing.M) {
goleak.VerifyTestMain(m)
}

0 comments on commit 2112494

Please sign in to comment.