MCPcopy Index your code
hub / github.com/coder/coder / TestWebSocketUnknownMessageType

Function TestWebSocketUnknownMessageType

agent/agentgit/agentgit_test.go:859–874  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

857}
858
859func TestWebSocketUnknownMessageType(t *testing.T) {
860 t.Parallel()
861
862 ctx := testutil.Context(t, testutil.WaitLong)
863 stream := dialGitWatch(t)
864 ch := stream.Chan()
865
866 err := stream.Send(codersdk.WorkspaceAgentGitClientMessage{
867 Type: "bogus",
868 })
869 require.NoError(t, err)
870
871 msg := recvMsg(ctx, t, ch)
872 require.Equal(t, codersdk.WorkspaceAgentGitServerMessageTypeError, msg.Type)
873 require.Contains(t, msg.Message, "unknown")
874}
875
876func TestGetRepoChangesStagedModifiedDeleted(t *testing.T) {
877 t.Parallel()

Callers

nothing calls this directly

Calls 7

ContextFunction · 0.92
dialGitWatchFunction · 0.85
recvMsgFunction · 0.85
SendMethod · 0.65
ChanMethod · 0.45
EqualMethod · 0.45
ContainsMethod · 0.45

Tested by

no test coverage detected