From 1946369ab0db2b4e3e344a100b1d85f9927ae6aa Mon Sep 17 00:00:00 2001 From: Philippe Antoine Date: Mon, 13 Jul 2020 09:53:03 +0200 Subject: [PATCH] http: adds test with double gap --- tests/http-gap-double/README.md | 13 +++++++++ tests/http-gap-double/input.pcap | Bin 0 -> 2732 bytes tests/http-gap-double/test.yaml | 44 +++++++++++++++++++++++++++++++ 3 files changed, 57 insertions(+) create mode 100644 tests/http-gap-double/README.md create mode 100644 tests/http-gap-double/input.pcap create mode 100644 tests/http-gap-double/test.yaml diff --git a/tests/http-gap-double/README.md b/tests/http-gap-double/README.md new file mode 100644 index 000000000..0c8fe5493 --- /dev/null +++ b/tests/http-gap-double/README.md @@ -0,0 +1,13 @@ +# Description + +Test http gap handling + +This test case contains a single simple gap in response body with defined content-length + +# PCAP + +The pcap comes from running +`python test/htptopcap.py toaddgap.txt` +With the attached toaddgap.txt from test http-gap-simple + +Then removing packets 17 and 21 diff --git a/tests/http-gap-double/input.pcap b/tests/http-gap-double/input.pcap new file mode 100644 index 0000000000000000000000000000000000000000..db64cc13bfe0bd31b5764635cf9c46537f38f103 GIT binary patch literal 2732 zc-pnq-)mA~7zglIT|YQYYC(FsNYCyHT6)}8&70WOi1_1kzR%;s>*|L$ zFZ8Gl?cB)o!r}Jt`w@iPh?E{`5TSm2@86Hm6NGfQN>S@fc4_K4{!UT9y}i`~pKZJF zU1u=t)9DT}cYZ7$tEhTn=6rjb)|pZ?Up_Gc?tJm6x{0f5z5??+BBhu;O>)kI>w9{H z|F(4!UfgA2=OcxqWbqtaYkF_VZrg%920hi2K}6k=PvvGUK@YLZe*@c z3YjifTu8}IZdiJl6ve2KF*5jieF06mOOShQS8jYg6L#K$vxrD3&byWl3r?}#sRrg8 zb~|^~V`SV>S-^=?r@3yPb7kZBoj!PQI(nVGc5Z0cZ)C0snR`OU$+^X?bG)Z2Pq4_TVgEV-ua9_41TuwMS-cg;)?*R2)l%S_|n9EnS zxwHonx`aq6&Onp7tk>ppwqY)UC`#N-DI?zQB71!roHZTpvtbk1IFIT@n zQEPc2M7u~9Pp##KMRL{Mu)3lxU7%UI!l))E4$dbv=f)UymvNOY&FWn~9@CUA+mH^c zX6*dZ=H$RBt2qnf)LrJ9bZP#(%g^JQ(#&&acDM`Lb0H16WoY sz@rH5Ag%h!06NqMIj1d;p&<`jbq-BvbUM@>_XKrc2C$AdEC_bkKZ}O3NB{r; literal 0 Hc-jL100001 diff --git a/tests/http-gap-double/test.yaml b/tests/http-gap-double/test.yaml new file mode 100644 index 000000000..c47eb7973 --- /dev/null +++ b/tests/http-gap-double/test.yaml @@ -0,0 +1,44 @@ +requires: + features: + - HAVE_LIBJANSSON + min-version: 6.0.0 + +# disables checksum verification +args: + - -k none + +checks: + + # Check that there is one file event with content range. + - filter: + count: 1 + match: + event_type: http + http.url: "/1" + http.status: 200 + - filter: + count: 1 + match: + event_type: http + http.url: "/2" + http.status: 200 + - filter: + count: 1 + match: + event_type: http + http.url: "/3" + http.status: 200 + - filter: + count: 2 + match: + event_type: fileinfo + fileinfo.size: 14 + fileinfo.state: "CLOSED" + fileinfo.gaps: false + - filter: + count: 1 + match: + event_type: fileinfo + fileinfo.size: 70 + fileinfo.state: "TRUNCATED" + fileinfo.gaps: true -- 2.47.2