Debian Codegraph @

fastly/realtime_stats_test.go

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 package fastly
2
3 import "testing"
4
5 func TestClient_GetRealtimeStats_validation(t *testing.T) {
6 var err error
7 _, err = testStatsClient.GetRealtimeStats(&GetRealtimeStatsInput{
8 Service: "",
9 })
10 if err != ErrMissingService {
11 t.Errorf("bad error: %s", err)
12 }
13 }
14
15 func TestStatsClient_GetRealtimeStats(t *testing.T) {
16 t.Parallel()
17
18 var err error
19
20 // Get
21 recordRealtimeStats(t, "realtime_stats/get", func(c *RTSClient) {
22 _, err = c.GetRealtimeStats(&GetRealtimeStatsInput{
23 Service: testServiceID,
24 Timestamp: 0,
25 Limit: 3,
26 })
27 })
28 if err != nil {
29 t.Fatal(err)
30 }
31 }