mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix build and lint (#1613)
Signed-off-by: Spike Curtis <spike@coder.com>
This commit is contained in:
+1
-2
@@ -13,9 +13,8 @@ import (
|
||||
func TestDelete(t *testing.T) {
|
||||
t.Run("WithParameter", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
client := coderdtest.New(t, nil)
|
||||
client := coderdtest.New(t, &coderdtest.Options{IncludeProvisionerD: true})
|
||||
user := coderdtest.CreateFirstUser(t, client)
|
||||
coderdtest.NewProvisionerDaemon(t, client)
|
||||
version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, nil)
|
||||
coderdtest.AwaitTemplateVersionJob(t, client, version.ID)
|
||||
template := coderdtest.CreateTemplate(t, client, user.OrganizationID, version.ID)
|
||||
|
||||
+2
-1
@@ -3,10 +3,11 @@ package cli_test
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/coder/coder/cli/clitest"
|
||||
"github.com/coder/coder/coderd/coderdtest"
|
||||
"github.com/coder/coder/pty/ptytest"
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestLogout(t *testing.T) {
|
||||
|
||||
+1
-1
@@ -110,7 +110,7 @@ func server() *cobra.Command {
|
||||
logger.Warn(cmd.Context(), "failed to start telemetry exporter", slog.Error(err))
|
||||
} else {
|
||||
defer func() {
|
||||
// allow time for traces to flush even if command context is cancelled
|
||||
// allow time for traces to flush even if command context is canceled
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
|
||||
defer cancel()
|
||||
_ = tracerProvider.Shutdown(ctx)
|
||||
|
||||
+1
-1
@@ -103,7 +103,7 @@ func newRouter(options *Options, a *api) chi.Router {
|
||||
})
|
||||
},
|
||||
httpmw.Prometheus,
|
||||
tracing.HTTPMW(api.TracerProvider, "coderd.http"),
|
||||
tracing.HTTPMW(a.TracerProvider, "coderd.http"),
|
||||
)
|
||||
|
||||
r.Route("/api/v2", func(r chi.Router) {
|
||||
|
||||
Reference in New Issue
Block a user