mirror of
https://github.com/coder/coder.git
synced 2025-07-23 21:32:07 +00:00
chore: Fix golangci-lint configuration and patch errors (#34)
* chore: Fix golangci-lint configuration and patch errors Due to misconfiguration of a linting rules directory, our linter has not been working properly. This change fixes the configuration issue, and all remaining linting errors. * Fix race in peer logging * Fix race and return * Lock on bufferred amount low * Fix mutex lock
This commit is contained in:
@ -1,7 +1,9 @@
|
||||
package site
|
||||
|
||||
import (
|
||||
"context"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/http/httptest"
|
||||
"testing"
|
||||
|
||||
@ -13,8 +15,11 @@ func TestIndexPageRenders(t *testing.T) {
|
||||
|
||||
srv := httptest.NewServer(Handler())
|
||||
|
||||
resp, err := srv.Client().Get(srv.URL)
|
||||
req, err := http.NewRequestWithContext(context.Background(), "GET", srv.URL, nil)
|
||||
require.NoError(t, err)
|
||||
resp, err := http.DefaultClient.Do(req)
|
||||
require.NoError(t, err, "get index")
|
||||
defer resp.Body.Close()
|
||||
data, _ := io.ReadAll(resp.Body)
|
||||
require.NotEmpty(t, data, "index should have contents")
|
||||
}
|
||||
|
Reference in New Issue
Block a user