skipReason static method
Why tests that need containers cannot run here, or null when they
can: no Docker socket found.
It is null when CONTAINERS_REQUIRED=true (the tests then fail with
the real error) or skipWithoutDocker is false. It only looks for
the daemon's socket, so a daemon that is down behind a stale socket
fails the start of the containers. Pass it as skip: of a group or
test.
Implementation
static String? skipReason({bool skipWithoutDocker = true}) {
if (required || !skipWithoutDocker) {
return null;
}
final reason = DockerEndpoint.unavailableReason();
return reason == null
? null
: 'Docker is not available ($reason); set CONTAINERS_REQUIRED=true '
'to fail instead of skipping';
}