Skip to content

Commit

Permalink
Adjusted set_cookie test into cookie
Browse files Browse the repository at this point in the history
  • Loading branch information
Tudor Golubenco committed Dec 4, 2014
1 parent 60b63ba commit 3765e75
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/packetbeat
Submodule packetbeat updated from 340162 to b819fb
2 changes: 1 addition & 1 deletion tests/templates/packetbeat.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ idl_files = [

[http]
{% if http_send_all_headers %}send_all_headers = true{% endif %}
{% if http_split_set_cookie %}split_set_cookie = true{% endif %}
{% if http_split_cookie %}split_cookie = true{% endif %}
{% if http_send_headers -%}
send_headers = [{%- for hdr in http_send_headers -%}
"{{ hdr }}"
Expand Down
8 changes: 6 additions & 2 deletions tests/test_0006_wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ def test_send_headers_options(self):
assert len(o["http"]["response"]["headers"]) == 1
assert "user-agent" in o["http"]["request"]["headers"]

def test_split_set_cookie(self):
def test_split_cookie(self):
self.render_config_template(
http_ports=[8888],
http_send_all_headers=True,
http_split_set_cookie=True,
http_split_cookie=True,
)
self.run_packetbeat(pcap="wsgi_loopback.pcap")

Expand All @@ -120,5 +120,9 @@ def test_split_set_cookie(self):

assert len(o["http"]["request"]["headers"]) == 9
assert len(o["http"]["response"]["headers"]) == 7

assert isinstance(o["http"]["request"]["headers"]["cookie"], dict)
assert len(o["http"]["request"]["headers"]["cookie"]) == 6

assert isinstance(o["http"]["response"]["headers"]["set-cookie"], dict)
assert len(o["http"]["response"]["headers"]["set-cookie"]) == 4

0 comments on commit 3765e75

Please sign in to comment.