mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
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:
@@ -4,7 +4,7 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"github.com/coder/coder/cli/cliui"
|
||||
"github.com/coder/coder/coderd/database"
|
||||
@@ -32,7 +32,7 @@ func TestWorkspaceResources(t *testing.T) {
|
||||
}}, cliui.WorkspaceResourcesOptions{
|
||||
WorkspaceName: "example",
|
||||
})
|
||||
require.NoError(t, err)
|
||||
assert.NoError(t, err)
|
||||
close(done)
|
||||
}()
|
||||
ptty.ExpectMatch("coder ssh example")
|
||||
@@ -85,7 +85,7 @@ func TestWorkspaceResources(t *testing.T) {
|
||||
HideAgentState: false,
|
||||
HideAccess: false,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
assert.NoError(t, err)
|
||||
close(done)
|
||||
}()
|
||||
ptty.ExpectMatch("google_compute_disk.root")
|
||||
|
||||
Reference in New Issue
Block a user