mirror of
https://github.com/coder/coder.git
synced 2025-07-08 11:39:50 +00:00
feat: add more logging around echo tar (#10731)
This commit is contained in:
@ -709,7 +709,7 @@ func createAnotherUserRetry(t testing.TB, client *codersdk.Client, organizationI
|
||||
// with testing.
|
||||
func CreateTemplateVersion(t testing.TB, client *codersdk.Client, organizationID uuid.UUID, res *echo.Responses, mutators ...func(*codersdk.CreateTemplateVersionRequest)) codersdk.TemplateVersion {
|
||||
t.Helper()
|
||||
data, err := echo.Tar(res)
|
||||
data, err := echo.TarWithOptions(context.Background(), client.Logger(), res)
|
||||
require.NoError(t, err)
|
||||
file, err := client.Upload(context.Background(), codersdk.ContentTypeTar, bytes.NewReader(data))
|
||||
require.NoError(t, err)
|
||||
|
@ -15,6 +15,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"cdr.dev/slog"
|
||||
"cdr.dev/slog/sloggers/slogtest"
|
||||
"github.com/coder/coder/v2/agent/agenttest"
|
||||
"github.com/coder/coder/v2/coderd/coderdtest"
|
||||
@ -41,6 +42,7 @@ func TestCollectInsights(t *testing.T) {
|
||||
Pubsub: ps,
|
||||
}
|
||||
client := coderdtest.New(t, options)
|
||||
client.SetLogger(logger.Named("client").Leveled(slog.LevelDebug))
|
||||
|
||||
// Given
|
||||
// Initialize metrics collector
|
||||
|
Reference in New Issue
Block a user