summaryrefslogtreecommitdiff
path: root/python/samba/tests/blackbox/traffic_learner.py
AgeCommit message (Collapse)AuthorFilesLines
2020-02-07pytests: heed assertEquals deprecation warning en-masseDouglas Bagnall1-4/+4
TestCase.assertEquals() is an alias for TestCase.assertEqual() and has been deprecated since Python 2.7. When we run our tests with in python developer mode (`PYTHONDEVMODE=1 make test`) we get 580 DeprecationWarnings about this. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Noel Power <npower@samba.org>
2019-01-08traffic: assert json equality in learner testDouglas Bagnall1-0/+6
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-01-08traffic tests: use TestCaseInTempdir.mktemp()Douglas Bagnall1-16/+3
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-01-08traffic: new version of model with packet_rate, version numberDouglas Bagnall1-1/+1
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2019-01-08traffic_learner: return an error codeDouglas Bagnall1-5/+2
And use it in tests, rather than expecting exact strings. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-12-10python/samba/blackbox: PY3 port for samba.tests.blackbox.traffic_learnerNoel Power1-3/+22
The order of the values in the TrafficModel is different, but... also unfortunately output of json.dump is also different (even when using sorted versions of the associated dictionaries before dumping), these changes reimport the output files into TrafficModel objects rather than comparing the actual raw files. Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2018-09-05python/samba/tests: Change native string to binary for py2/py3 compatNoel Power1-2/+2
Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2017-08-17scripts: Scripts to replay and generate samba trafficGary Lockyer1-0/+62
Scripts to generate representative network traffic and replay this to a samba instance. For load testing, performance profiling and capacity planning. traffic_learner process a file generated by traffic_summary and generate a model that can be used by traffic_replay to generate samba network traffic. traffic_replay Replay a summary file generated by traffic_summary, or use a model created by traffic_learner to generate network traffic. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Pair-programmed-with: Garming Sam <garming@catalyst.net.nz> Pair-programmed-with: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org> Pair-Programmed-With: Tim Beale <timbeale@catalyst.net.nz>