5
0
mirror of git://git.proxmox.com/git/pve-common.git synced 2024-12-22 21:33:47 +03:00
pve-common/test
Dominik Csapak 07f136d636 JSONSchema: add support for array parameter in api calls, cli and config
a few things were missing for it to work:
* on the cli, we have to get the option as an array if the type is an
  array
* the untainting must be done recursively, otherwise, the regex matching
  converts an array hash into the string 'ARRAY(0x123412341234)'
* JSONSchema::parse_config did not handle array formats specially, but
  we want to allow to specify them multiple time
* the biggest point: in the RESTHandler, to be compatible with the
  current gui behavior, we have to rewrite two parameter types:
  - when the api defines a '-list' format for a string type, but we get
    a list (because of the changes in http-server), we join the list
    with a comma into a string
  - when the api defines an 'array' type, but we get a scalar value,
    wrap the value in an array (because for www-form-urlencoded, you
    cannot send an array with a single value) add tests for this
    behavior, some of which we want to deprecate and remove in the
    future

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2023-06-07 13:10:50 +02:00
..
etc_network_interfaces inotify: network: improve "allow-hotplug" & "auto" interaction 2021-09-29 09:57:59 +02:00
api_parameter_test.pl JSONSchema: add support for array parameter in api calls, cli and config 2023-06-07 13:10:50 +02:00
calendar_event_test.pl CalendarEvent: use rust implementation 2022-01-13 14:50:47 +01:00
convert_size_test.pl fix convert_size with decimal numbers and add tests 2017-12-15 11:15:50 +01:00
format_test.pl format: handle undef, 0, and decimals in render_duration 2021-02-08 14:40:38 +01:00
lock_file.pl tests: remove acquire-lock newline termination 2017-11-10 11:29:54 +01:00
Makefile JSONSchema: add support for array parameter in api calls, cli and config 2023-06-07 13:10:50 +02:00
procfs_tests.pl fix typo 2023-01-10 12:25:54 +01:00
section_config_test.pl tests: section config: comment need for warn on debugging 2022-11-13 11:54:34 +01:00