Skip to content

Commit

Permalink
Test mysql.affected_rows value > 250 (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
monicasarbu committed May 7, 2015
1 parent 5a93505 commit 5496911
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/test_0027_mysql_affected_rows.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from pbtests.packetbeat import TestCase


class Test(TestCase):
def test_mysql_affected_rows(self):
self.render_config_template(
mysql_ports=[3306]
)
self.run_packetbeat(pcap="mysql_affected_rows.pcap",
debug_selectors=["mysql,tcp,publish"])

objs = self.read_output()
assert all([o["type"] == "mysql" for o in objs])
assert len(objs) == 1
assert all([o["port"] == 3306 for o in objs])

assert objs[0]["method"] == "UPDATE"
assert objs[0]["mysql.affected_rows"] == 316
assert objs[0]["status"] == "OK"
assert objs[0]["count"] == 1

0 comments on commit 5496911

Please sign in to comment.