MCPcopy Index your code
hub / github.com/cli/cli / verifyNotifyCodespaceOfClientActivity

Function verifyNotifyCodespaceOfClientActivity

internal/codespaces/rpc/invoker_test.go:90–104  ·  view source on GitHub ↗

Test that the RPC invoker notifies the codespace of client activity on connection

(t *testing.T, server *mockServer)

Source from the content-addressed store, hash-verified

88
89// Test that the RPC invoker notifies the codespace of client activity on connection
90func verifyNotifyCodespaceOfClientActivity(t *testing.T, server *mockServer) {
91 calls := server.CodespaceHostServerMock.NotifyCodespaceOfClientActivityCalls()
92 if len(calls) == 0 {
93 t.Fatalf("no client activity calls")
94 }
95
96 for _, call := range calls {
97 activities := call.NotifyCodespaceOfClientActivityRequest.GetClientActivities()
98 if activities[0] == connectedEventName {
99 return
100 }
101 }
102
103 t.Fatalf("no activity named %s", connectedEventName)
104}
105
106// Test that the RPC invoker returns the correct port and URL when the JupyterLab server starts successfully
107func TestStartJupyterServerSuccess(t *testing.T) {

Tested by

no test coverage detected