diff --git a/tests/packetbeat b/tests/packetbeat index ee6b14a2302..3e18359e75d 160000 --- a/tests/packetbeat +++ b/tests/packetbeat @@ -1 +1 @@ -Subproject commit ee6b14a23021a03d129d3640eb008ccfeccb9e7a +Subproject commit 3e18359e75de4562d44c88474263b2cbba29e273 diff --git a/tests/pcaps/thrift_echo_binary.pcap b/tests/pcaps/thrift_echo_binary.pcap new file mode 100644 index 00000000000..954d6a2d033 Binary files /dev/null and b/tests/pcaps/thrift_echo_binary.pcap differ diff --git a/tests/test_0002_thrift_basics.py b/tests/test_0002_thrift_basics.py index b10d7bd9618..95e0cde242b 100644 --- a/tests/test_0002_thrift_basics.py +++ b/tests/test_0002_thrift_basics.py @@ -187,3 +187,20 @@ def test_thrift_send_request_response(self): assert all([o["request_raw"] == "" for o in objs]) assert all([o["response_raw"] == "" for o in objs]) + + def test_thrift_binary(self): + self.render_config_template( + thrift_ports=[9090], + thrift_transport_type="framed", + thrift_idl_files=["tutorial.thrift", "shared.thrift"] + ) + self.copy_files(["tutorial.thrift", "shared.thrift"]) + self.run_packetbeat(pcap="thrift_echo_binary.pcap", + debug_selectors=["thrift"]) + + objs = self.read_output() + assert len(objs) == 1 + o = objs[0] + + assert o["thrift"]["request"]["method"] == "echo_binary" + assert o["thrift"]["reply"]["returnValue"] == "ab0c1d281a000000"