7 Commits

Author SHA1 Message Date
Alberto Bertogli
0c9d1536db docs: Update tests.md to reflect coverage changes, and add links
This patch updates tests.md to reflect the recent changes around
coverage testing, specifically we no longer have coverage issues with
fatal/non-zero exits, so remove that section from the docs.

Also while at it, add links to the software we reference, for
convenience.
2023-05-16 10:50:26 +01:00
Alberto Bertogli
efefee9fbb test: Update fuzz tests to use the built-in infrastructure
Go 1.18 supports fuzzing natively, so this patch migrates our fuzzing
tests to make use of it.
2023-02-05 12:30:25 +00:00
Alberto Bertogli
795f2a7ceb ci: Use Github Actions to run integration tests and push Docker images
We're running against the usage limits in Gitlab CI (500), and Github
Actions should have more (2000).

So this patch replaces Gitlab CI with Github actions for running
integration tests, and build and push Docker images (to Dockerhub and
Gitlab registry).

We'll see how the usage levels are in a few months.
2022-11-13 19:16:10 +00:00
Alberto Bertogli
d78056aff5 test: Skip integration tests if $HOSTALIASES is not functional
Most integration tests depend on the $HOSTALIASES environment variable
being functional. That variable works on most systems, but not all. In
particular, systems with `systemd-resolved` can cause the variable to be
ignored.

This was reported by Alex Ellwein in
https://github.com/albertito/chasquid/issues/20.

This patch makes the affected tests to be skipped if $HOSTALIASES is not
working properly. It also removes unnecessary hosts files from tests
which don't need it, and documents this behaviour.

Thanks to Alex Ellwein and foxcpp@ for reporting and helping investigate
this issue!
2021-07-15 00:20:21 +01:00
Alberto Bertogli
e79586a014 Implement HAProxy protocol support
This patch implements support for incoming connections wrapped in the
HAProxy protocol v1.

This is useful when running chasquid behind a HAProxy server, as it
needs the original source IP to perform SPF checks.

This patch is a reimplementation of one originally provided by Denys
Vitali in pull request #15, except the logic for the protocol handling
is moved to a new package, and the smtpsrv.Conn handling of the source
IP is simplified.

It is marked as experimental for now, since we want to give it a bit
more exposure just in case the option/api needs adjustment.

Thanks a lot to Denys Vitali (@denysvitali in github) for sending the
original patch for this, and helping test it!
2020-11-13 20:49:42 +00:00
Alberto Bertogli
4367c9e059 travis: Remove references in documentation, allow to fail
The Travis tests don't work due to a Travis networking issue reaching
some external hosts.

Until it is fixed, remove references from the documentation, since its
output is misleading.

We also allow it to fail, which makes the GitHub UI not show commits as
having failed tests because of Travis.

Since the previous commit, GitLab CI does almost all the same tests, so
there should be no significant loss of coverage anyway.
2020-05-22 12:11:27 +01:00
Alberto Bertogli
0bf8f72c73 docs: Add documentation about tests
This patch replaces test/README, which was becoming a bit outdated, with
a more general description of the different tests at a high level, and
includes it in the documentation index.
2019-10-19 13:06:30 +01:00