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

Fix FTP test leaving behind temporary files #526

Merged
merged 4 commits into from
Nov 9, 2020

Conversation

srenfo
Copy link
Contributor

@srenfo srenfo commented Nov 9, 2020

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
Copy link

Pull Request Test Coverage Report for Build 1268

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 25 unchanged lines in 4 files lost coverage.
  • Overall coverage increased (+0.1%) to 73.951%

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%
Totals Coverage Status
Change from base Build 1253: 0.1%
Covered Lines: 5570
Relevant Lines: 7532

💛 - Coveralls

Copy link
Member

@glaslos glaslos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Nice cleanup and refactor.

@glaslos glaslos merged commit d08e2ed into mushorg:master Nov 9, 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.

None yet

3 participants