mirror of
https://blitiri.com.ar/repos/chasquid
synced 2026-01-08 17:51:57 +00:00
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!
This commit is contained in:
@@ -46,6 +46,12 @@ if the dependencies are not found:
|
||||
For some tests, python >= 3.5 is required; they will be skipped if it's not
|
||||
available.
|
||||
|
||||
Most tests depend on the
|
||||
[`$HOSTALIASES`](https://man7.org/linux/man-pages/man7/hostname.7.html)
|
||||
environment variable being functional, and will be skipped if it isn't. This
|
||||
works by default in most Linux systems, but note that the use of
|
||||
`systemd-resolved` can prevent it from working properly.
|
||||
|
||||
|
||||
## Stress tests
|
||||
|
||||
@@ -55,6 +61,7 @@ load against chasquid to measure performance and resource consumption.
|
||||
While they are not exhaustive, they are useful to catch regressions and track
|
||||
improvements on the main code paths.
|
||||
|
||||
|
||||
## Fuzz tests
|
||||
|
||||
Some Go packages also have instrumentation to run fuzz testing against them,
|
||||
|
||||
Reference in New Issue
Block a user