aboutsummaryrefslogtreecommitdiff
path: root/src/ats/test_ats_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ats/test_ats_api.c')
-rw-r--r--src/ats/test_ats_api.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/src/ats/test_ats_api.c b/src/ats/test_ats_api.c
index 0ec1bbdef..390cafe0f 100644
--- a/src/ats/test_ats_api.c
+++ b/src/ats/test_ats_api.c
@@ -45,7 +45,11 @@ static struct Command test_commands[] = {
45 .properties = { 45 .properties = {
46 .scope = GNUNET_NT_LAN 46 .scope = GNUNET_NT_LAN
47 } 47 }
48
49
48 } 50 }
51
52
49 }, 53 },
50 /* 1: adding same address again should fail */ 54 /* 1: adding same address again should fail */
51 { 55 {
@@ -61,6 +65,8 @@ static struct Command test_commands[] = {
61 }, 65 },
62 .expect_fail = 1 66 .expect_fail = 1
63 } 67 }
68
69
64 }, 70 },
65 /* 2: some solver still require explicit start */ 71 /* 2: some solver still require explicit start */
66 { 72 {
@@ -69,6 +75,8 @@ static struct Command test_commands[] = {
69 .details.request_connection_start = { 75 .details.request_connection_start = {
70 .pid = 0 76 .pid = 0
71 } 77 }
78
79
72 }, 80 },
73 /* 3: check we got an address */ 81 /* 3: check we got an address */
74 { 82 {
@@ -76,6 +84,8 @@ static struct Command test_commands[] = {
76 .details.await_address_suggestion = { 84 .details.await_address_suggestion = {
77 .add_label = "add-address-0-0" 85 .add_label = "add-address-0-0"
78 } 86 }
87
88
79 }, 89 },
80 /* 4: check monitor also got the address */ 90 /* 4: check monitor also got the address */
81 { 91 {
@@ -83,6 +93,8 @@ static struct Command test_commands[] = {
83 .details.await_address_information = { 93 .details.await_address_information = {
84 .add_label = "add-address-0-0" 94 .add_label = "add-address-0-0"
85 } 95 }
96
97
86 }, 98 },
87 /* 5: test session API */ 99 /* 5: test session API */
88 { 100 {
@@ -92,12 +104,16 @@ static struct Command test_commands[] = {
92 .add_label = "add-address-0-0", 104 .add_label = "add-address-0-0",
93 .session = 1 105 .session = 1
94 } 106 }
107
108
95 }, 109 },
96 { 110 {
97 .code = CMD_DEL_SESSION, 111 .code = CMD_DEL_SESSION,
98 .details.del_session = { 112 .details.del_session = {
99 .add_session_label = "add-session-0-0-1", 113 .add_session_label = "add-session-0-0-1",
100 } 114 }
115
116
101 }, 117 },
102 /* 7: test preference API */ 118 /* 7: test preference API */
103 { 119 {
@@ -106,6 +122,8 @@ static struct Command test_commands[] = {
106 .pid = 0 122 .pid = 0
107 /* FIXME: preference details */ 123 /* FIXME: preference details */
108 } 124 }
125
126
109 }, 127 },
110 { 128 {
111 .code = CMD_PROVIDE_FEEDBACK, 129 .code = CMD_PROVIDE_FEEDBACK,
@@ -114,6 +132,8 @@ static struct Command test_commands[] = {
114 .scope = { 50LL } 132 .scope = { 50LL }
115 /* FIXME: preference details */ 133 /* FIXME: preference details */
116 } 134 }
135
136
117 }, 137 },
118 /* 9: test sanity check address listing */ 138 /* 9: test sanity check address listing */
119 { 139 {
@@ -126,6 +146,8 @@ static struct Command test_commands[] = {
126 .min_active_calls = 1, 146 .min_active_calls = 1,
127 .max_active_calls = 1 147 .max_active_calls = 1
128 } 148 }
149
150
129 }, 151 },
130 /* 10: remove address testing */ 152 /* 10: remove address testing */
131 { 153 {
@@ -133,6 +155,8 @@ static struct Command test_commands[] = {
133 .details.del_address = { 155 .details.del_address = {
134 .add_label = "add-address-0-0" 156 .add_label = "add-address-0-0"
135 } 157 }
158
159
136 }, 160 },
137 /* 11: check we got disconnected */ 161 /* 11: check we got disconnected */
138 { 162 {
@@ -140,6 +164,8 @@ static struct Command test_commands[] = {
140 .details.await_disconnect_suggestion = { 164 .details.await_disconnect_suggestion = {
141 .pid = 0 165 .pid = 0
142 } 166 }
167
168
143 }, 169 },
144 /* 12: just for symmetry, also stop asking for the connection */ 170 /* 12: just for symmetry, also stop asking for the connection */
145 { 171 {
@@ -147,6 +173,8 @@ static struct Command test_commands[] = {
147 .details.request_connection_stop = { 173 .details.request_connection_stop = {
148 .connect_label = "request-0", 174 .connect_label = "request-0",
149 } 175 }
176
177
150 }, 178 },
151 /* 13: add address again */ 179 /* 13: add address again */
152 { 180 {
@@ -159,7 +187,11 @@ static struct Command test_commands[] = {
159 .properties = { 187 .properties = {
160 .scope = GNUNET_NT_LAN 188 .scope = GNUNET_NT_LAN
161 } 189 }
190
191
162 } 192 }
193
194
163 }, 195 },
164 /* 14: some solver still require explicit start */ 196 /* 14: some solver still require explicit start */
165 { 197 {
@@ -168,6 +200,8 @@ static struct Command test_commands[] = {
168 .details.request_connection_start = { 200 .details.request_connection_start = {
169 .pid = 0 201 .pid = 0
170 } 202 }
203
204
171 }, 205 },
172 /* 15: check we got an address */ 206 /* 15: check we got an address */
173 { 207 {
@@ -175,6 +209,8 @@ static struct Command test_commands[] = {
175 .details.await_address_suggestion = { 209 .details.await_address_suggestion = {
176 .add_label = "add-address-0-0:1" 210 .add_label = "add-address-0-0:1"
177 } 211 }
212
213
178 }, 214 },
179 /* 16: add alternative address */ 215 /* 16: add alternative address */
180 { 216 {
@@ -188,7 +224,11 @@ static struct Command test_commands[] = {
188 .properties = { 224 .properties = {
189 .scope = GNUNET_NT_LAN 225 .scope = GNUNET_NT_LAN
190 } 226 }
227
228
191 } 229 }
230
231
192 }, 232 },
193 /* 17: remove original address */ 233 /* 17: remove original address */
194 { 234 {
@@ -196,6 +236,8 @@ static struct Command test_commands[] = {
196 .details.del_address = { 236 .details.del_address = {
197 .add_label = "add-address-0-0:1" 237 .add_label = "add-address-0-0:1"
198 } 238 }
239
240
199 }, 241 },
200 /* 18: check we switched to alternative address */ 242 /* 18: check we switched to alternative address */
201 { 243 {
@@ -203,6 +245,8 @@ static struct Command test_commands[] = {
203 .details.await_address_suggestion = { 245 .details.await_address_suggestion = {
204 .add_label = "add-address-0-1" 246 .add_label = "add-address-0-1"
205 } 247 }
248
249
206 }, 250 },
207 /* 19: remove alternative address */ 251 /* 19: remove alternative address */
208 { 252 {
@@ -210,6 +254,8 @@ static struct Command test_commands[] = {
210 .details.del_address = { 254 .details.del_address = {
211 .add_label = "add-address-0-1" 255 .add_label = "add-address-0-1"
212 } 256 }
257
258
213 }, 259 },
214 /* 20: check we got disconnected */ 260 /* 20: check we got disconnected */
215 { 261 {
@@ -217,6 +263,8 @@ static struct Command test_commands[] = {
217 .details.await_disconnect_suggestion = { 263 .details.await_disconnect_suggestion = {
218 .pid = 0 264 .pid = 0
219 } 265 }
266
267
220 }, 268 },
221 /* 21: just for symmetry, also stop asking for the connection */ 269 /* 21: just for symmetry, also stop asking for the connection */
222 { 270 {
@@ -224,6 +272,8 @@ static struct Command test_commands[] = {
224 .details.request_connection_stop = { 272 .details.request_connection_stop = {
225 .connect_label = "request-0", 273 .connect_label = "request-0",
226 } 274 }
275
276
227 }, 277 },
228 /* Test ends successfully */ 278 /* Test ends successfully */
229 { 279 {