aboutsummaryrefslogtreecommitdiffstats
path: root/src/vat2/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/vat2/test')
-rw-r--r--src/vat2/test/vat2_test.api6
-rw-r--r--src/vat2/test/vat2_test.c6
2 files changed, 12 insertions, 0 deletions
diff --git a/src/vat2/test/vat2_test.api b/src/vat2/test/vat2_test.api
index afc8afa4dd7..6d211552cf6 100644
--- a/src/vat2/test/vat2_test.api
+++ b/src/vat2/test/vat2_test.api
@@ -14,6 +14,7 @@
*/
import "vnet/ip/ip_types.api";
+import "vnet/interface_types.api";
autoreply define test_prefix {
vl_api_prefix_t pref;
@@ -94,3 +95,8 @@ autoreply define test_empty {
u32 client_index;
u32 context;
};
+
+/* Interface */
+autoreply define test_interface {
+ vl_api_interface_index_t sw_if_index;
+};
diff --git a/src/vat2/test/vat2_test.c b/src/vat2/test/vat2_test.c
index 89714c4f992..1ac46527b3c 100644
--- a/src/vat2/test/vat2_test.c
+++ b/src/vat2/test/vat2_test.c
@@ -162,6 +162,11 @@ struct msgs msgs[] = {
.tojson = (tojson_fn_t) vl_api_test_empty_t_tojson,
.fromjson = (fromjson_fn_t) vl_api_test_empty_t_fromjson,
},
+ {
+ .name = "test_interface",
+ .tojson = (tojson_fn_t) vl_api_test_interface_t_tojson,
+ .fromjson = (fromjson_fn_t) vl_api_test_interface_t_fromjson,
+ },
};
struct tests tests[] = {
@@ -190,6 +195,7 @@ struct tests tests[] = {
{ .s = "{\"_msgname\": \"test_addresses3\", \"n\": 2, \"a\": "
"[\"2001:db8::23\", \"2001:db8::23\"] }" },
{ .s = "{\"_msgname\": \"test_empty\"}" },
+ { .s = "{\"_msgname\": \"test_interface\", \"sw_if_index\": 100 }" },
};
int main (int argc, char **argv)