logmanoriginal / lvssh2

LabVIEW­ bindings for libssh2
BSD 3-Clause "New" or "Revised" License
0 stars 3 forks source link

Add Integration Test Framework #1

Closed logmanoriginal closed 6 months ago

logmanoriginal commented 6 months ago

This PR adds a framework for integration tests.

Integration tests are necessary to detect failures in the implementation that are otherwise not detectable. Since lvssh2 is a wrapper for libssh2 and almost all functions contain a Call Library Function Node, almost no features can be tested with regular unit tests (in isolation).

This framework provides a way to execute tests on an actual SSH server. It is designed for use on Windows, using the built-in OpenSSH server or any compatible OpenSSH server that may be available in the PATH environment variable.

Public key authentication is realized with auto-generated public keys that are added to the authorized_keys file for the server and deleted when a test is complete (whether failed or successful).

Login is done with the user name of the user who started LabVIEW and the generated key. Unfortunately, there is no practical way to create a user for test purposes, which means that any of the integration tests runs in the scope of the user.

The integration test library contains only one test that illustrates the implementation and verifies that server handshake is successful.

Remarks: