[pve-devel] [PATCH storage v4 04/12] test: list_volumes

Dominic Jäger d.jaeger at proxmox.com
Thu Apr 23 12:28:53 CEST 2020


I like it. Having for example one $mocked_vmlist is clean.

Two ideas for further testing (in the future):
 - Passing only a subset of $types to list_volumes
 - Unintended situations, like when $mocked_vmlist has a VM without type => list_volumes roughly does if (defined($type) && $type eq 'lxc') ... else ...

On Wed, Apr 22, 2020 at 04:58:00PM +0200, Alwin Antreich wrote:
> Test to reduce the potential for accidental breakage on regex changes.
> 
> Co-Authored-by: Dominic Jaeger <d.jaeger at proxmox.com>
> Signed-off-by: Alwin Antreich <a.antreich at proxmox.com>
> ---
>  test/list_volumes_test.pm | 519 ++++++++++++++++++++++++++++++++++++++
>  test/run_plugin_tests.pl  |   6 +-
>  2 files changed, 524 insertions(+), 1 deletion(-)
>  create mode 100644 test/list_volumes_test.pm
> 
> diff --git a/test/list_volumes_test.pm b/test/list_volumes_test.pm
> new file mode 100644
> index 0000000..c1428f2
> --- /dev/null
> +++ b/test/list_volumes_test.pm
> @@ -0,0 +1,519 @@
> +package PVE::Storage::TestListVolumes;
> +
> +use strict;
> 




More information about the pve-devel mailing list