carletes / mock-ssh-server

Python mock SSH server for testing purposes
MIT License
56 stars 32 forks source link

Allow the Server to run commands reading from stdin #2

Open jvrsantacruz opened 7 years ago

jvrsantacruz commented 7 years ago

Many commands such as git-receive-packs do not fit the 'run and get all output' model that it is offered through the Python's Popen.communicate() API. Such commands exchange messages with the remote side via stdin/stdout alternatively depending on each other's output.

This commit should allow any command to run in this otherwise very neat server. The rewrite of the process model was necessary in order to be able to use it as git remote ssh server for testing gi interactions involving key handling, timeouts etc...

jvrsantacruz commented 7 years ago

It seems that 1 py27 test is failing in Travis but not in my workstation. I'll try so check this somehow.

Spitfire1900 commented 1 year ago

@jvrsantacruz would you like to update this PR to be mergable?

Spitfire1900 commented 1 week ago

@jvrsantacruz can you add test cases?