MCPcopy Create free account
hub / github.com/PasarGuard/node / TestGRPC_GetUserOnlineStats_NotFound

Function TestGRPC_GetUserOnlineStats_NotFound

controller/rpc/rpc_test.go:180–189  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

178}
179
180func TestGRPC_GetUserOnlineStats_NotFound(t *testing.T) {
181 ctx, cancel := context.WithTimeout(sharedTestCtx.ctxWithSession, 5*time.Second)
182 defer cancel()
183
184 _, err := sharedTestCtx.client.GetUserOnlineStats(ctx, &common.StatRequest{Name: "does-not-exist@example.com"})
185 st, _ := status.FromError(err)
186 if st.Code() != codes.NotFound {
187 t.Fatalf("Expected NotFound error, got: %v", err)
188 }
189}
190
191func TestGRPC_GetUserOnlineIpListStats_NotFound(t *testing.T) {
192 ctx, cancel := context.WithTimeout(sharedTestCtx.ctxWithSession, 5*time.Second)

Callers

nothing calls this directly

Calls 1

GetUserOnlineStatsMethod · 0.65

Tested by

no test coverage detected