Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intial work on conpot py3 #374

Merged
merged 17 commits into from
Jun 7, 2018
Merged

Intial work on conpot py3 #374

merged 17 commits into from
Jun 7, 2018

Conversation

xandfury
Copy link
Member

@xandfury xandfury commented Jun 2, 2018

My first GSoC PR 🎉 Need to add more tests but all in all this should deal with:

  • Addition of tox for tests and CI, pytest for running tests
  • Migration of conpot from py2.7 to py3.5
  • Increase/addition in test cases for bacnet, kamstrup and guardian_ast
  • WIP virtual file system for handling uploads

Note: While running tox for the firsttime, it could take a while. tox creates a fresh environment for us to test/run on. But essentially that takes care of the fact that travis brings no suprises. Plus extending it for py3.6 is a piece of cake. ;-)

Some helpful commands:

sudo tox  # would run all the tests and  start conpot -- mimic travis behaviour
sudo tox -e run -- conpot -f --template default  # would run conpot from inside tox's testing environment
sudo tox -e run -- python3  # would give you an interactive interpreter from the testing environment

* run travis
* fix docs test
* fix proxy tests
* fix modbus tests
* fix snmp tests
* fix pysnmp tests

Signed-off-by: Abhinav Saxena <[email protected]>
* fix s7comm tests and protocol
* fix http tests
* fix IEC104 tests
* rewrite bacnet test -test_no_response_requests
* minor py3 related bug in log_worker
* test classes name change - for intuitiveness
* Pass all old 44 tests in py3
* Fix travis - install conpot before running
* Add guardian ast tests
* Initial work on Kamstrup Management Server tests
* Minor bug fix for travis
* Improve coverage - omit files from coverage report
* Better tox messages
* Initial work on virtual file system
@coveralls
Copy link

coveralls commented Jun 2, 2018

Pull Request Test Coverage Report for Build 1037

  • 195 of 262 (74.43%) changed or added relevant lines in 37 files are covered.
  • 27 unchanged lines in 10 files lost coverage.
  • Overall coverage increased (+15.2%) to 59.633%

Changes Missing Coverage Covered Lines Changed/Added Lines %
conpot/core/databus.py 2 3 66.67%
conpot/protocols/snmp/conpot_cmdrsp.py 2 3 66.67%
conpot/protocols/modbus/slave.py 3 4 75.0%
conpot/protocols/modbus/modbus_server.py 2 3 66.67%
conpot/protocols/kamstrup/meter_protocol/command_responder.py 2 3 66.67%
conpot/protocols/http/web_server.py 6 7 85.71%
conpot/utils/ext_ip.py 0 1 0.0%
conpot/protocols/IEC104/IEC104_server.py 7 9 77.78%
conpot/protocols/guardian_ast/guardian_ast_server.py 11 13 84.62%
conpot/protocols/bacnet/bacnet_server.py 10 12 83.33%
Files with Coverage Reduction New Missed Lines %
conpot/protocols/kamstrup/meter_protocol/command_responder.py 1 90.63%
conpot/protocols/bacnet/bacnet_server.py 1 94.44%
conpot/protocols/ipmi/fakebmc.py 1 46.34%
conpot/protocols/IEC104/DeviceDataController.py 1 50.5%
conpot/protocols/kamstrup/usage_simulator.py 1 82.02%
conpot/protocols/IEC104/frames.py 1 59.22%
conpot/protocols/IEC104/IEC104_server.py 2 68.13%
conpot/protocols/ipmi/fakesession.py 3 9.25%
conpot/protocols/ipmi/ipmi_server.py 4 19.88%
conpot/protocols/http/command_responder.py 12 64.42%
Totals Coverage Status
Change from base Build 1033: 15.2%
Covered Lines: 3253
Relevant Lines: 5455

💛 - Coveralls

@xandfury xandfury requested a review from creolis June 2, 2018 05:30
@creolis
Copy link
Member

creolis commented Jun 2, 2018

What a PR <3 ... Will review soon, thanks so far! Keep up the good work!

* Add proxy ascii decoder test
* Imporove Kamstrup Management Tests, fix minor bug
* exclude __main__ lines from coverage
* HTTP tests
* Kamstrup meter WIP tests
* Modbus tests expect test for function 43
@creolis creolis merged commit f395c65 into mushorg:py3 Jun 7, 2018
@xandfury xandfury deleted the xand-py3 branch July 13, 2018 08:00
srenfo pushed a commit to srenfo/conpot that referenced this pull request Jan 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants