1
0
mirror of https://github.com/libssh2/libssh2.git synced 2025-08-07 08:02:56 +03:00
Commit Graph

17 Commits

Author SHA1 Message Date
Laurent Stacul
7daee037d1 openssh_fixture.c: Fix openssh_server build not working (#616) (#620)
File: openssh_fixture.c

Notes:
fixes too long of output lines building docker image

Credit:
Laurent Stacul
2021-09-02 13:17:35 -07:00
Will Cosgrove
f0417cb196 openssh_fixture.c: fix warning (#621)
File: openssh_fixture.c

Notes:
Fix `portable_sleep` return type warning

Credit:
Will Cosgrove
2021-09-02 13:14:46 -07:00
Laurent Stacul
a88a727c2a [tests] Try several times to connect the ssh server
Sometimes, as the OCI container is run in detached mode, it is possible
the actual server is not ready yet to handle SSH traffic. The goal of
this PR is to try several times (max 3). The mechanism is the same as
for the connection to the docker machine.
2021-05-30 12:33:05 +02:00
Laurent Stacul
3709037b26 Remove openssh_server container on test exit 2021-05-30 11:41:52 +02:00
Laurent Stacul
718bcb03d2 Allow the tests to run inside a container
The current tests suite starts SSH server as OCI container. This commit
add the possibility to run the tests in a container provided that:

* the docker client is installed builder container
* the host docker daemon unix socket has been mounted in the builder
  container (with, if needed, the DOCKER_HOST environment variable
  accordingly set, and the permission to write on this socket)
* the builder container is run on the default bridge network, or the
  host network. This PR does not handle the case where the builder
  container is on another network.
2021-05-29 12:01:51 +02:00
Marc Hoersken
fee3125b3b CI/appveyor: run SSH server for tests on GitHub Actions (#607)
No longer rely on DigitalOcean to host the Docker container.

Unfortunately we require a small dispatcher script that has
access to a GitHub access token with scope repo in order to
trigger the daemon workflow on GitHub Actions also for PRs.

This script is hosted by myself for the time being until GitHub
provides a tighter scope to trigger the workflow_dispatch event.
2021-05-28 08:52:27 +02:00
Gabriel Smith
b5c071d180 openssh_fixture.c: Fix potential overwrite of buffer when reading stdout of command (#580)
File:
openssh_fixture.c 
Notes:
If reading the full output from the executed command took multiple
passes (such as when reading multiple lines) the old code would read
into the buffer starting at the some position (the start) every time.
The old code only works if fgets updated p or had an offset parameter,
both of which are not true.

Credit:
Gabriel Smith
2021-05-03 14:41:25 -07:00
Etienne Samson
1adb24fd07 Add a LINT option to CMake (#372)
* ci: make style-checking available locally

* cmake: add a linting target

* tests: check test suite syntax with checksrc.pl
2021-02-02 10:28:28 -08:00
Marc Hoersken
984d008106 tests: avoid use of deprecated function _sleep (#490) 2020-06-22 21:08:57 +02:00
Marc Hoersken
ac13b70a89 tests: avoid use of banned function strncat (#489) 2020-06-22 21:08:11 +02:00
Marc Hoersken
36d87a17a8 tests: satisfy checksrc regarding max line length of 79 chars
Follow up to 2764bc8e06
2020-06-20 21:48:30 +02:00
Marc Hoersken
ec53d55cc0 tests: add support for ports published via Docker for Windows 2020-06-20 18:47:49 +02:00
Marc Hoersken
b78e57a2d7 tests: restore retry behaviour for docker-machine ip command 2020-06-20 18:44:30 +02:00
Etienne Samson
54bef4c5da A collection of small fixes (#198)
* tests: Remove if-pyramids

* tests: Switch run_command arguments

* tests: Make run_command a vararg function

* tests: Xcode doesn't obey CMake's test working directory

* openssl: move manual AES-CTR cipher into crypto init

* cmake: Move our include dir before all other include paths
2018-03-20 16:58:13 -07:00
Viktor Szakats
42cf29101e tests: fix checksrc warnings
Also:
* add 'static' qualifier to file-wide const buffers
* fix a non-ANSI C89 comment
* silence a mismatched fprintf() mask warning by adding a cast
2018-03-13 21:32:41 +00:00
Antenore Gatta
32d0965ca4 tests: HAVE_NETINET_IN_H was not defined correctly (#127)
Fixes #125
2016-09-04 00:44:24 +02:00
Alexander Lamaison
cf80f2f4b5 Basic dockerised test suite.
This introduces a test suite for libssh2. It runs OpenSSH in a Docker
container because that works well on Windows (via docker-machine) as
well as Linux. Presumably it works on Mac too with docker-machine, but
I've not tested that.

Because the test suite is docker-machine aware, you can also run it
against a cloud provider, for more realistic network testing, by setting
your cloud provider as your active docker machine. The Appveyor CI setup
in this commit does that because Appveyor doesn't support docker
locally.
2016-08-14 16:03:25 +01:00