Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
lint and remove accidental code
  • Loading branch information
Emyrk committed Apr 5, 2024
commit b3b1652a237df87803e7561de9de3f61e6021ce4
22 changes: 0 additions & 22 deletions agent/agentssh/agentssh_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ package agentssh
import (
"bufio"
"context"
"fmt"
"io"
"net"
"testing"
Expand All @@ -28,27 +27,6 @@ sleep 30
echo "done"
`

func TestSomeSSHServer(t *testing.T) {

ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitMedium)
defer cancel()
logger := slogtest.Make(t, nil)

s, err := NewServer(ctx, logger, prometheus.NewRegistry(), afero.NewMemMapFs(), &Config{})
require.NoError(t, err)
defer s.Close()
//// Required to not panic on new connection
//s.Manifest = atomic.NewPointer(&agentsdk.Manifest{})
//s.ServiceBanner = atomic.NewPointer(&codersdk.ServiceBannerConfig{})
//s.AgentToken = func() string {
// return "something"
//}

l, err := net.Listen("tcp", "localhost:1828")
require.NoError(t, err)
fmt.Println(s.Serve(l))
}

// Test_sessionStart_orphan tests running a command that takes a long time to
// exit normally, and terminate the SSH session context early to verify that we
// return quickly and don't leave the command running as an "orphan" with no
Expand Down
3 changes: 2 additions & 1 deletion coderd/prometheusmetrics/prometheusmetrics_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ import (
"testing"
"time"

"github.com/coder/coder/v2/cryptorand"
"github.com/google/uuid"
"github.com/prometheus/client_golang/prometheus"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"tailscale.com/tailcfg"

"github.com/coder/coder/v2/cryptorand"

"cdr.dev/slog"
"cdr.dev/slog/sloggers/slogtest"

Expand Down