Krikri::PluginHelpers::DockerHealthcheck
DockerHealthcheck - pure logic for parsing a docker_container
healthcheck: param into Docker's own HealthConfig shape. No I/O
here - docker_container.cr does the actual API calls.
Class methods
Matches real Ansible's own convert_duration_to_nanosecond
exactly (same regex, same unit set: h/m/s/ms/us - no day unit).
Raises with the real module's own error message shape for an
unparseable string.
Matches real Ansible's own normalize_healthcheck_test: a plain
string (not a JSON array) becomes a CMD-SHELL invocation of that
string, matching real Docker CLI/Ansible convention.
Returns nil if healthcheck: was given but has no test: (or an
empty one) - matches real Ansible's own parse_healthcheck: with
no test, there's nothing to override, and the image's own
healthcheck (if any) is left alone entirely, same as not passing
healthcheck: at all. test: ["NONE"] is the real, documented
way to explicitly disable an inherited healthcheck - passed
through as-is (Docker's own convention for "no healthcheck").