fix build and lint (#1613)

Signed-off-by: Spike Curtis <spike@coder.com>
This commit is contained in:
Spike Curtis
2022-05-19 23:28:29 +00:00
committed by GitHub
parent 1871b09697
commit d1817310a1
4 changed files with 5 additions and 5 deletions
+1 -2
View File
@@ -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
View File
@@ -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
View File
@@ -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
View File
@@ -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) {