Debian Codegraph @

fastly/syslog_test.go

raw symbols ◀ ▶ SCIP
1 Debian patch touch this file
1 package fastly
2
3 import (
4 "testing"
5 )
6
7 func TestClient_Syslogs(t *testing.T) {
8 }
9
10 func TestClient_ListSyslogs_validation(t *testing.T) {
11 var err error
12 _, err = testClient.ListSyslogs(&ListSyslogsInput{
13 Service: "",
14 })
15 if err != ErrMissingService {
16 t.Errorf("bad error: %s", err)
17 }
18
19 _, err = testClient.ListSyslogs(&ListSyslogsInput{
20 Service: "foo",
21 Version: 0,
22 })
23 if err != ErrMissingVersion {
24 t.Errorf("bad error: %s", err)
25 }
26 }
27
28 func TestClient_CreateSyslog_validation(t *testing.T) {
29 var err error
30 _, err = testClient.CreateSyslog(&CreateSyslogInput{
31 Service: "",
32 })
33 if err != ErrMissingService {
34 t.Errorf("bad error: %s", err)
35 }
36
37 _, err = testClient.CreateSyslog(&CreateSyslogInput{
38 Service: "foo",
39 Version: 0,
40 })
41 if err != ErrMissingVersion {
42 t.Errorf("bad error: %s", err)
43 }
44 }
45
46 func TestClient_GetSyslog_validation(t *testing.T) {
47 var err error
48 _, err = testClient.GetSyslog(&GetSyslogInput{
49 Service: "",
50 })
51 if err != ErrMissingService {
52 t.Errorf("bad error: %s", err)
53 }
54
55 _, err = testClient.GetSyslog(&GetSyslogInput{
56 Service: "foo",
57 Version: 0,
58 })
59 if err != ErrMissingVersion {
60 t.Errorf("bad error: %s", err)
61 }
62
63 _, err = testClient.GetSyslog(&GetSyslogInput{
64 Service: "foo",
65 Version: 1,
66 Name: "",
67 })
68 if err != ErrMissingName {
69 t.Errorf("bad error: %s", err)
70 }
71 }
72
73 func TestClient_UpdateSyslog_validation(t *testing.T) {
74 var err error
75 _, err = testClient.UpdateSyslog(&UpdateSyslogInput{
76 Service: "",
77 })
78 if err != ErrMissingService {
79 t.Errorf("bad error: %s", err)
80 }
81
82 _, err = testClient.UpdateSyslog(&UpdateSyslogInput{
83 Service: "foo",
84 Version: 0,
85 })
86 if err != ErrMissingVersion {
87 t.Errorf("bad error: %s", err)
88 }
89
90 _, err = testClient.UpdateSyslog(&UpdateSyslogInput{
91 Service: "foo",
92 Version: 1,
93 Name: "",
94 })
95 if err != ErrMissingName {
96 t.Errorf("bad error: %s", err)
97 }
98 }
99
100 func TestClient_DeleteSyslog_validation(t *testing.T) {
101 var err error
102 err = testClient.DeleteSyslog(&DeleteSyslogInput{
103 Service: "",
104 })
105 if err != ErrMissingService {
106 t.Errorf("bad error: %s", err)
107 }
108
109 err = testClient.DeleteSyslog(&DeleteSyslogInput{
110 Service: "foo",
111 Version: 0,
112 })
113 if err != ErrMissingVersion {
114 t.Errorf("bad error: %s", err)
115 }
116
117 err = testClient.DeleteSyslog(&DeleteSyslogInput{
118 Service: "foo",
119 Version: 1,
120 Name: "",
121 })
122 if err != ErrMissingName {
123 t.Errorf("bad error: %s", err)
124 }
125 }