chore: avoid concurrent usage of t.FailNow (#1683)

* chore: golangci: add linter rule to report usage of t.FailNow inside goroutines
* chore: avoid t.FailNow in goroutines to appease the race detector
This commit is contained in:
Cian Johnston
2022-05-24 08:58:39 +01:00
committed by GitHub
parent 9b70a9b2eb
commit c2f74f3cc2
27 changed files with 120 additions and 74 deletions

View File

@ -3,7 +3,7 @@ package cli_test
import (
"testing"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/assert"
"github.com/coder/coder/cli/clitest"
"github.com/coder/coder/coderd/coderdtest"
@ -25,7 +25,7 @@ func TestUserCreate(t *testing.T) {
go func() {
defer close(doneChan)
err := cmd.Execute()
require.NoError(t, err)
assert.NoError(t, err)
}()
matches := []string{
"Username", "dean",