Giter VIP home page Giter VIP logo

korv's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

korv's Issues

Add a basic set of KorvServer tests

Using pytest as the test framework, add the basic tests that verify a server instance:

  • Instantiate KorvServer without errors using newly generated SSH keys.
  • GET routes execute correctly and respond with valid JSON.
  • STORE routes execute correctly and respond with valid JSON.
  • UPDATE routes execute correctly and respond with valid JSON.
  • DELETE routes execute correctly and respond with valid JSON.
  • Verify it's not possible to connect with the wrong SSH key.

Minimize json and Add gzip compression

  • Let's minimize json data by setting separators=[',', ':'] during dumps().
  • Use gzip.compress() on the minified json data before sending it on the client and server.
  • Use gzip.decompress() before parsing the json on received messages on both client and server.

Log message not converting all args to string

In Server.py line 121 - logging.info("Connection requested", dest_host, dest_port, orig_host, orig_port) is throwing a traceback when the client connects to the server.

the error is "Not all arguments are strings", everything continues to work though.

Client hangs when data returned is not a valid format

Ran into this when returning a Dictionary that was over the size limit so a partial dictionary was returned with half a string at the end ( ie "words words ) with no ending quote.

narrowed it down to:
Client.py
Class -> _SSHClientSession::data_received()
line 37 data = json.loads(data)

the data being parsed needs to validated prior to entering json.loads() or try/excepted here.

Add a basic set of KorvClient tests

Using pytest as the test framework, add the basic tests that verify a client instance:

  • Instantiate KorvClient connecting to a local server without errors using newly generated SSH keys.
  • GET responses complete with the proper callback.
  • STORE responses complete with the proper callback and with no callback.
  • UPDATE responses complete with the proper callback and with no callback.
  • DELETE responses complete with the proper callback and with no callback.
  • Connection fails with the incorrect host address or port.
  • Connection fails with the incorrect SSH key.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.