public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] [PATCH manager] fix tests in 'vzdump_new_test.pl'
@ 2022-01-28  8:36 Dominik Csapak
  2022-01-28  8:46 ` [pve-devel] applied: " Fabian Grünbichler
  0 siblings, 1 reply; 3+ messages in thread
From: Dominik Csapak @ 2022-01-28  8:36 UTC (permalink / raw)
  To: pve-devel

commmit
a55cfb53 ("close #3476: vzdump: add job-init hook")

introduces a 'cfs_update' in VZDump->new(), which overwrites our
carefully prepared storage/vm config which can break the tests

to prevent this, mock 'cfs_update' to do nothing, since we never
want to load the 'real' configs during tests anyway

fixes commit a55cfb5359f86adc2d3981cab032bbf8a0411931

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
---
 test/vzdump_new_test.pl | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/test/vzdump_new_test.pl b/test/vzdump_new_test.pl
index 23676239..8cd73075 100755
--- a/test/vzdump_new_test.pl
+++ b/test/vzdump_new_test.pl
@@ -61,6 +61,10 @@ $pve_cluster_module->mock(
 	die "unexpected filename '$filename'\n" if $filename ne 'storage.cfg';
 	return $storage_config;
     },
+    # never update during the tests
+    cfs_update => sub {
+	return;
+    },
 );
 
 my $pve_tools_module = Test::MockModule->new('PVE::Tools');
-- 
2.30.2





^ permalink raw reply	[flat|nested] 3+ messages in thread

* [pve-devel] applied: [PATCH manager] fix tests in 'vzdump_new_test.pl'
  2022-01-28  8:36 [pve-devel] [PATCH manager] fix tests in 'vzdump_new_test.pl' Dominik Csapak
@ 2022-01-28  8:46 ` Fabian Grünbichler
  2022-01-28  8:52   ` Thomas Lamprecht
  0 siblings, 1 reply; 3+ messages in thread
From: Fabian Grünbichler @ 2022-01-28  8:46 UTC (permalink / raw)
  To: Proxmox VE development discussion

thanks! seems like it only broke tests/build as root, which I never do ;)

On January 28, 2022 9:36 am, Dominik Csapak wrote:
> commmit
> a55cfb53 ("close #3476: vzdump: add job-init hook")
> 
> introduces a 'cfs_update' in VZDump->new(), which overwrites our
> carefully prepared storage/vm config which can break the tests
> 
> to prevent this, mock 'cfs_update' to do nothing, since we never
> want to load the 'real' configs during tests anyway
> 
> fixes commit a55cfb5359f86adc2d3981cab032bbf8a0411931
> 
> Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
> ---
>  test/vzdump_new_test.pl | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/test/vzdump_new_test.pl b/test/vzdump_new_test.pl
> index 23676239..8cd73075 100755
> --- a/test/vzdump_new_test.pl
> +++ b/test/vzdump_new_test.pl
> @@ -61,6 +61,10 @@ $pve_cluster_module->mock(
>  	die "unexpected filename '$filename'\n" if $filename ne 'storage.cfg';
>  	return $storage_config;
>      },
> +    # never update during the tests
> +    cfs_update => sub {
> +	return;
> +    },
>  );
>  
>  my $pve_tools_module = Test::MockModule->new('PVE::Tools');
> -- 
> 2.30.2
> 
> 
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> 
> 




^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [pve-devel] applied: [PATCH manager] fix tests in 'vzdump_new_test.pl'
  2022-01-28  8:46 ` [pve-devel] applied: " Fabian Grünbichler
@ 2022-01-28  8:52   ` Thomas Lamprecht
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Lamprecht @ 2022-01-28  8:52 UTC (permalink / raw)
  To: Proxmox VE development discussion, Fabian Grünbichler

On 28.01.22 09:46, Fabian Grünbichler wrote:
> thanks! seems like it only broke tests/build as root, which I never do ;)
> 

yeah, I wondered about this one not being caught earlier, normally
it's the other way around ^^




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-28  8:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-28  8:36 [pve-devel] [PATCH manager] fix tests in 'vzdump_new_test.pl' Dominik Csapak
2022-01-28  8:46 ` [pve-devel] applied: " Fabian Grünbichler
2022-01-28  8:52   ` Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal