Commit e1af93d
committed
test(*-version): add --test hook and EOL-aware fixtures for 11 more version checkers
Convert the remaining shell-driven version-checker plugins to the
fixture-based pattern established by redis-version, postgresql-version
and mysql-version. Each plugin now has a `--test` hook that bypasses
the live shell call and loads the version-string output from a stdout
fixture, then runs the existing parser regex against it. The
downstream `lib.version.check_eol()` HTTP call to endoflife.date still
runs live, so the test result reflects today's actual EOL data.
Plugin coverage and image sources (Red Hat family preferred where
available, upstream/Debian fall-back when there is no RHEL-family
equivalent that ships the version we want to exercise):
- apache-httpd-version: 5 fixtures from
registry.access.redhat.com/ubi{8,9,10}/httpd-24, fedora 43, debian
13. 6 testcases, 0 WARN (Apache 2.4 is still non-EOL).
- apache-solr-version: 5 fixtures from docker.io/library/solr:{7,8,
9.4,9} - no Red Hat Solr container exists. Covers the EOL 7.x and
8.x cycles. 5 testcases, 2 WARN.
- composer-version: 5 fixtures from docker.io/library/composer:{2.2,
2.7,2.8,2.9}. Composer ships as a single PHP file and the upstream
image is canonical. 5 testcases, 2 WARN.
- grafana-version: 5 fixtures from docker.io/grafana/grafana-oss
10.4 .. 12.4. No RHEL-family grafana container. 5 testcases, 3 WARN.
- graylog-version: yum and dpkg listings captured from
quay.io/rockylinux/rockylinux:9 and docker.io/library/debian:12
after fresh installs of graylog 5.2 / 6.3 / 7.0 repositories. 5
testcases, 1 WARN.
- icinga-version: 6 fixtures from debian:{11,12,13} and
ubuntu:{22.04,24.04}. The upstream `docker.io/icinga/icinga2`
image's `(version: vX.Y.Z)` shape is intentionally rejected by the
plugin, so debian-style `r<X>.<Y>.<Z>-1` outputs are needed. 6
testcases, 3 WARN.
- mydumper-version: 3 fixtures from debian:11 and ubuntu:{22.04,
24.04}. This plugin uses the GitHub releases API instead of
endoflife.date, so the test mode pins both the installed version
and the upstream "latest" tag via the stdout/stderr slots of
`lib.lftest.test()`. 3 testcases, 1 WARN.
- openjdk-redhat-version: 4 stderr fixtures from
registry.access.redhat.com/ubi8/openjdk-{8,11,17,21} (java prints
to stderr) plus a stdout garbage edge case. Java 8 is pinned as
UNKNOWN: the plugin transforms `1.8.0_482` to `1.8.0.482` and
endoflife.date cannot map that to the upstream `8` cycle, that
asymmetry is documented in the test docstring. 5 testcases, 1
WARN, 1 UNKNOWN.
- openvpn-version: 5 fixtures from quay.io/rockylinux/rockylinux:
{8,9,10} and fedora:43 after dnf install (with EPEL where
required). 5 testcases, 2 WARN.
- postfix-version: 5 fixtures from
registry.access.redhat.com/ubi{8,9,10}/ubi and fedora:43 after
fresh `dnf install postfix`. 5 testcases, 2 WARN.
- valkey-version: 5 fixtures from docker.io/valkey/valkey:{7.2,8.0,
8.1,9.0}. No RHEL-family valkey container yet. 5 testcases, 0 WARN.
Each plugin bumps `__version__` to `2026041301`, gains an
`import lib.lftest`, and wires its existing version-extraction
function through the `--test` argument the same way the three pilots
already do. Every test docstring explicitly warns that the
`assert-retc` and `assert-in` strings will need to be re-pinned every
few months as the endoflife.date data drifts.
The full unit-test suite is now at 132 plugins, all green under
`tools/run-unit-tests --no-container`.1 parent 7ae4b60 commit e1af93d
File tree
78 files changed
+1262
-86
lines changed- check-plugins
- apache-httpd-version
- unit-test
- stdout
- apache-solr-version
- unit-test
- stdout
- composer-version
- unit-test
- stdout
- grafana-version
- unit-test
- stdout
- graylog-version
- unit-test
- stdout
- icinga-version
- unit-test
- stdout
- mydumper-version
- unit-test
- stderr
- stdout
- openjdk-redhat-version
- unit-test
- stderr
- stdout
- openvpn-version
- unit-test
- stdout
- postfix-version
- unit-test
- stdout
- valkey-version
- unit-test
- stdout
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
78 files changed
+1262
-86
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | | - | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
106 | 114 | | |
107 | 115 | | |
108 | 116 | | |
| |||
115 | 123 | | |
116 | 124 | | |
117 | 125 | | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
122 | 129 | | |
123 | | - | |
124 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
125 | 137 | | |
126 | 138 | | |
127 | 139 | | |
| |||
141 | 153 | | |
142 | 154 | | |
143 | 155 | | |
144 | | - | |
| 156 | + | |
145 | 157 | | |
146 | 158 | | |
147 | 159 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
23 | 24 | | |
24 | | - | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
114 | 122 | | |
115 | 123 | | |
116 | 124 | | |
| |||
123 | 131 | | |
124 | 132 | | |
125 | 133 | | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
131 | 143 | | |
132 | 144 | | |
133 | 145 | | |
| |||
149 | 161 | | |
150 | 162 | | |
151 | 163 | | |
152 | | - | |
| 164 | + | |
153 | 165 | | |
154 | 166 | | |
155 | 167 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
0 commit comments