mirror of
https://github.com/coder/coder.git
synced 2025-07-13 21:36:50 +00:00
chore(codersdk): move all tailscale imports out of codersdk
(#12735)
Currently, importing `codersdk` just to interact with the API requires importing tailscale, which causes builds to fail unless manually using our fork.
This commit is contained in:
@ -15,6 +15,7 @@ import (
|
||||
"github.com/coder/coder/v2/coderd/coderdtest"
|
||||
"github.com/coder/coder/v2/codersdk"
|
||||
"github.com/coder/coder/v2/codersdk/agentsdk"
|
||||
"github.com/coder/coder/v2/codersdk/workspacesdk"
|
||||
"github.com/coder/coder/v2/enterprise/coderd/coderdenttest"
|
||||
"github.com/coder/coder/v2/enterprise/coderd/license"
|
||||
"github.com/coder/coder/v2/provisioner/echo"
|
||||
@ -46,7 +47,7 @@ func TestBlockNonBrowser(t *testing.T) {
|
||||
})
|
||||
r := setupWorkspaceAgent(t, client, user, 0)
|
||||
//nolint:gocritic // Testing that even the owner gets blocked.
|
||||
_, err := client.DialWorkspaceAgent(context.Background(), r.sdkAgent.ID, nil)
|
||||
_, err := workspacesdk.New(client).DialAgent(context.Background(), r.sdkAgent.ID, nil)
|
||||
var apiErr *codersdk.Error
|
||||
require.ErrorAs(t, err, &apiErr)
|
||||
require.Equal(t, http.StatusConflict, apiErr.StatusCode())
|
||||
@ -65,7 +66,7 @@ func TestBlockNonBrowser(t *testing.T) {
|
||||
})
|
||||
r := setupWorkspaceAgent(t, client, user, 0)
|
||||
//nolint:gocritic // Testing RBAC is not the point of this test.
|
||||
conn, err := client.DialWorkspaceAgent(context.Background(), r.sdkAgent.ID, nil)
|
||||
conn, err := workspacesdk.New(client).DialAgent(context.Background(), r.sdkAgent.ID, nil)
|
||||
require.NoError(t, err)
|
||||
_ = conn.Close()
|
||||
})
|
||||
|
Reference in New Issue
Block a user