transport capture: rename to tap (#5666)
This is a rename PR only. It renames the capture transport socket and associated tools to the tap transport socket. It also updates some documentation. In a subsequent PR I'm going to refactor the tap transport socket to use the new common tap framework so that the tap transport socket can be configured via admin, the HTTP tap filter can write to a file, the tap transport socket can have matching, etc. Signed-off-by: Matt Klein <mklein@lyft.com> Mirrored from https://github.com/envoyproxy/envoy @ 7a5849f2a8bcc55fa16da3eaee94d9c99a11147cpull/620/head
parent
d714c26513
commit
40afd47af0
10 changed files with 42 additions and 42 deletions
@ -1,22 +1,22 @@ |
||||
"""Tests for capture2pcap.""" |
||||
"""Tests for tap2pcap.""" |
||||
from __future__ import print_function |
||||
|
||||
import os |
||||
import subprocess as sp |
||||
import sys |
||||
|
||||
import capture2pcap |
||||
import tap2pcap |
||||
|
||||
# Validate that the captured trace when run through capture2cap | tshark matches |
||||
# a golden output file for the tshark dump. Since we run capture2pcap in a |
||||
# Validate that the tapped trace when run through tap2cap | tshark matches |
||||
# a golden output file for the tshark dump. Since we run tap2pcap in a |
||||
# subshell with a limited environment, the inferred time zone should be UTC. |
||||
if __name__ == '__main__': |
||||
srcdir = os.path.join(os.getenv('TEST_SRCDIR'), 'envoy_api') |
||||
capture_path = os.path.join(srcdir, 'tools/data/capture2pcap_h2_ipv4.pb_text') |
||||
expected_path = os.path.join(srcdir, 'tools/data/capture2pcap_h2_ipv4.txt') |
||||
tap_path = os.path.join(srcdir, 'tools/data/tap2pcap_h2_ipv4.pb_text') |
||||
expected_path = os.path.join(srcdir, 'tools/data/tap2pcap_h2_ipv4.txt') |
||||
pcap_path = os.path.join(os.getenv('TEST_TMPDIR'), 'generated.pcap') |
||||
|
||||
capture2pcap.Capture2Pcap(capture_path, pcap_path) |
||||
tap2pcap.Tap2Pcap(tap_path, pcap_path) |
||||
actual_output = sp.check_output(['tshark', '-r', pcap_path, '-d', 'tcp.port==10000,http2', '-P']) |
||||
with open(expected_path, 'r') as f: |
||||
expected_output = f.read() |
Loading…
Reference in new issue