mushorg / conpot

ICS/SCADA honeypot
GNU General Public License v2.0
1.21k stars 410 forks source link

Fix FTP test leaving behind temporary files #526

Closed srenfo closed 3 years ago

srenfo commented 3 years ago

Fixes two bugs in the FTP tests:

  1. test_appe was leaving behind temporary files in conpot/tests/data/data_temp_fs/ftp
  2. test_help contained an assert that AFAICT was always true (the one marked "test command specific help")

Since I was already looking at the file I also refactored some test initialization code.

Caveat: I saw some occasional failures in the FTP tests which looked like race conditions to me, where one test would sometimes find a file another test had created. I don't think my particular changes are to blame but I can't be sure.

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 1268


Files with Coverage Reduction New Missed Lines %
conpot/utils/greenlet.py 1 97.56%
conpot/protocols/http/command_responder.py 2 65.57%
conpot/protocols/ftp/ftp_handler.py 10 81.58%
conpot/protocols/ftp/ftp_base_handler.py 12 83.08%
<!-- Total: 25 -->
Totals Coverage Status
Change from base Build 1253: 0.1%
Covered Lines: 5570
Relevant Lines: 7532

💛 - Coveralls