MockSSH icon indicating copy to clipboard operation
MockSSH copied to clipboard

Implement unit tests

Open ncouture opened this issue 10 years ago • 4 comments

We need unit tests.

For starters here are a some unit tests that are also using SSH:

  • https://github.com/simon-engledew/sshim/tree/master/tests
  • https://github.com/fabric/fabric/blob/master/tests/server.py
  • https://sourcegraph.com/github.com/softlayer/swftp/tree/master/swftp%2Ftest%2Ffunctional%2Ftest_sftp.py

ncouture avatar Jul 05 '14 00:07 ncouture

Added an example unit test, it depends on running the example mock_cisco.py manually.

https://github.com/ncouture/MockSSH/tree/master/tests/test_mock_cisco.py

ncouture avatar Jul 05 '14 06:07 ncouture

My PR https://github.com/ncouture/MockSSH/pull/8 resolve dependencies over running server manually.

claudyus avatar Dec 04 '14 19:12 claudyus

The threadedServer implemented by claudyus is a good way to perform end to end tests for one MockSSH server however only one twisted reactor can run at a time and reactors cannot be restarted.

Test failure by uncommenting the tearDownClass classmethod in https://github.com/ncouture/MockSSH/blob/master/tests/test_mock_F5.py and running the unit tests.

ncouture avatar Dec 05 '14 17:12 ncouture

  • https://twistedmatrix.com/documents/current/core/howto/trial.html

ncouture avatar Jun 10 '17 11:06 ncouture