Aleksei Sviridkin
8d547be7fe
fix(tests): reject unreadable RD preset schemas ( #4191 )
...
## What this PR does
`rd-presets-check` discards `jq` errors, so malformed schema can pass
the check or appear as missing presets. It now fails with the schema
path and `jq` diagnostic. An absent schema or a readable schema without
`resourcesPreset` is still skipped.
Regression tests use real `jq` for malformed input and partial output.
They also cover the canonical preset set, exact matching and the
long-list case fixed by
[#4204 ](https://github.com/cozystack/cozystack/pull/4204 ).
### Testing
- `make unit-tests -j4 --output-sync=target` passed.
- Nine cases in `hack/check-rd-presets_test.bats`, run with `bats` and
`dash hack/cozytest.sh`.
- Both read-failure cases fail against `main`. Eleven deliberate code
mutations also fail the expected test.
- `shellcheck hack/check-rd-presets.sh hack/check-rd-presets_test.bats`.
### Screenshots
Not applicable.
### Downstream repositories
- [x] No downstream repository is affected by this change
No files or make targets were moved or renamed. The change is limited to
the RD checker and its tests.
### Release note
```release-note
fix(tests): Fail the RD preset check when a schema cannot be read, with the schema path and jq diagnostic.
```
2026-09-28 22:23:09 +03:00
..
2026-09-26 07:35:32 +03:00
2026-08-14 18:37:59 +05:00
2026-09-07 10:58:37 +03:00
2026-09-25 09:46:43 +05:00
2026-08-05 16:03:57 +03:00
2026-08-12 18:43:02 +03:00
2026-09-23 17:44:17 +04:00
2026-09-24 16:28:00 +05:00
2026-09-24 20:00:27 +05:00
2025-01-09 12:24:51 +01:00
2026-09-18 13:24:49 +04:00
2026-09-10 17:48:22 +05:00
2026-09-10 17:48:22 +05:00
2026-09-10 17:48:22 +05:00
2026-06-24 23:17:25 +03:00
2026-09-25 16:26:13 +02:00
2026-09-25 16:26:05 +02:00
2026-09-18 17:30:13 +04:00
2026-08-09 14:42:19 +03:00
2026-08-28 15:29:29 +05:00
2026-04-14 19:59:19 +05:00
2026-07-24 11:34:17 +05:00
2026-06-24 22:43:56 +03:00
2026-09-21 12:20:22 +03:00
2026-09-21 12:20:22 +03:00
2026-08-05 16:03:57 +03:00
2026-08-05 16:03:57 +03:00
2026-09-17 09:32:07 +03:00
2026-08-05 16:03:57 +03:00
2026-04-11 17:07:35 +03:00
2026-05-27 16:21:46 +03:00
2026-05-27 11:16:41 +03:00
2026-09-22 17:10:05 +03:00
2026-09-22 17:10:05 +03:00
2026-09-03 20:13:17 +03:00
2026-07-14 13:08:54 +03:00
2026-09-01 11:20:32 +03:00
2026-09-23 00:10:54 +03:00
2026-09-11 01:23:22 +03:00
2026-09-11 01:23:13 +03:00
2025-12-25 16:54:22 +01:00
2026-09-21 19:20:48 +03:00
2026-08-09 21:44:07 +03:00
2026-09-07 02:55:04 +03:00
2026-09-07 03:13:15 +03:00
2026-09-28 14:29:17 +05:00
2026-09-28 14:29:17 +05:00
2026-09-14 18:08:55 +02:00
2026-09-02 17:58:06 +03:00
2026-09-25 11:03:47 +05:00
2026-09-25 09:46:43 +05:00
2026-09-02 17:58:05 +03:00
2026-09-23 15:35:44 +03:00
2026-06-30 19:40:47 +03:00
2026-08-26 00:15:22 +03:00
2026-09-26 15:14:12 +03:00
2026-09-07 13:20:15 +05:00
2025-07-03 14:26:56 +03:00
2026-09-26 15:14:12 +03:00
2026-09-26 15:14:12 +03:00
2026-09-22 21:43:23 +03:00
2026-09-05 13:19:17 +05:00
2026-08-05 17:37:04 +03:00
2026-08-07 14:38:29 +03:00
2026-09-23 19:11:28 +03:00
2026-09-23 19:11:28 +03:00
2026-08-12 18:37:09 +03:00
2026-06-24 15:32:52 +03:00
2026-09-24 16:28:00 +05:00
2026-09-18 17:45:10 +03:00
2026-08-28 15:31:22 +05:00
2026-09-24 16:28:00 +05:00
2026-04-30 14:52:56 +03:00
2026-02-17 22:54:12 +01:00
2026-07-14 17:07:47 +03:00
2026-08-09 14:42:19 +03:00
2026-08-28 15:29:29 +05:00
2026-08-11 02:31:27 +03:00
2026-06-30 19:40:47 +03:00
2026-09-05 13:19:17 +05:00
2026-09-05 13:19:17 +05:00
2026-09-05 13:19:17 +05:00
2026-09-07 16:33:27 +05:00
2026-09-05 13:19:17 +05:00
2026-09-05 13:19:17 +05:00
2026-08-19 13:14:11 +03:00
2026-09-05 13:19:17 +05:00
2026-08-23 19:38:49 +05:00
2026-09-05 13:19:17 +05:00
2026-08-07 23:53:40 +03:00
2026-09-05 14:51:06 +05:00
2026-07-19 20:16:01 +03:00
2026-09-26 20:37:41 +03:00
2026-08-14 18:37:57 +05:00
2026-08-12 18:45:22 +03:00
2026-08-12 18:45:22 +03:00
2026-09-07 16:33:27 +05:00
2026-09-28 20:19:52 +03:00
2026-09-01 18:21:10 +04:00
2026-09-26 15:14:12 +03:00
2026-08-12 16:35:36 +03:00
2026-09-14 17:55:48 +04:00
2026-09-25 00:07:20 +03:00
2026-09-17 11:09:10 +03:00
2026-09-26 07:35:28 +03:00
2026-09-23 18:00:15 +04:00
2026-09-24 14:59:01 +03:00
2026-07-31 16:11:08 +03:00
2026-06-30 12:08:18 +05:00
2026-07-25 02:07:43 +03:00
2026-08-07 06:49:56 +03:00
2026-09-05 13:19:17 +05:00
2026-09-23 11:56:11 +03:00
2026-07-14 14:37:52 +03:00
2026-03-03 19:10:39 +05:00
2026-07-20 11:29:09 +05:00
2026-08-19 10:15:59 +02:00
2026-08-20 13:37:09 +03:00
2026-08-25 13:28:58 +03:00
2026-08-25 13:50:14 +03:00
2026-09-17 00:54:48 +03:00
2026-09-18 13:12:56 +03:00
2026-07-20 15:40:49 +05:00
2026-07-08 22:27:42 +03:00
2026-08-07 23:53:40 +03:00
2026-09-25 00:07:30 +03:00
2026-09-18 17:45:21 +03:00
2026-09-18 17:45:21 +03:00
2026-09-24 23:54:28 +03:00
2026-09-22 18:53:28 +05:00
2026-08-14 01:25:34 +03:00
2026-09-07 04:17:50 +03:00
2026-09-23 00:08:41 +03:00
2026-08-12 18:42:58 +03:00
2026-07-24 18:16:16 +05:00
2026-09-05 13:19:17 +05:00
2026-08-05 16:46:50 +03:00
2026-08-10 00:10:53 +03:00
2026-09-24 18:11:07 +03:00
2024-10-21 11:59:56 +02:00
2026-09-27 16:58:28 +03:00
2026-09-27 16:58:28 +03:00
2026-08-10 12:08:02 +03:00
2026-08-14 18:37:58 +05:00
2026-08-14 18:37:58 +05:00
2026-08-14 18:37:59 +05:00
2026-08-05 16:03:57 +03:00
2026-08-12 18:16:18 +02:00
2026-09-18 17:45:10 +03:00
2026-09-18 17:45:21 +03:00
2026-08-14 18:37:59 +05:00
2026-09-23 05:32:36 +03:00
2026-09-09 19:23:37 +04:00
2026-08-07 23:53:40 +03:00
2026-08-07 23:53:40 +03:00
2026-08-27 13:08:16 +05:00
2026-09-22 23:41:35 +03:00
2026-09-03 22:17:29 +03:00
2026-08-17 14:22:09 +03:00
2026-09-05 13:19:17 +05:00
2026-09-05 13:19:17 +05:00
2026-09-11 09:06:19 +03:00
2026-09-05 13:19:17 +05:00
2026-08-17 14:18:21 +03:00
2026-08-15 10:19:19 +03:00
2026-09-05 13:19:17 +05:00
2026-09-22 23:04:28 +03:00
2026-08-21 12:52:42 +03:00
2026-08-21 12:52:42 +03:00
2026-08-15 10:19:19 +03:00
2026-08-09 02:51:06 +03:00
2026-09-05 13:19:17 +05:00
2026-09-05 13:19:17 +05:00
2026-09-05 13:19:17 +05:00
2026-08-16 05:17:16 +03:00
2026-08-23 19:38:49 +05:00
2026-09-05 13:19:17 +05:00
2026-09-05 14:51:06 +05:00
2026-07-20 15:40:48 +05:00
2026-09-18 17:42:45 +03:00
2026-09-18 17:42:45 +03:00
2026-07-24 18:16:16 +05:00
2026-09-24 16:28:00 +05:00
2026-09-24 16:28:00 +05:00
2026-08-15 17:58:07 +05:00
2026-09-10 22:21:24 +04:00
2026-09-05 13:19:17 +05:00
2026-09-25 16:46:15 +02:00
2026-08-07 14:38:06 +03:00
2026-09-07 16:33:27 +05:00
2026-09-07 17:03:44 +02:00
2026-01-19 13:59:29 +01:00
2026-03-25 15:57:25 +05:00
2025-11-26 20:18:43 +01:00
2026-07-24 11:34:17 +05:00
2026-08-19 12:55:50 +05:00
2026-08-19 12:55:50 +05:00