Debian Codegraph @

fastly/ftp_test.go

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