public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Dominik Csapak <d.csapak@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH manager] fix tests in 'vzdump_new_test.pl'
Date: Fri, 28 Jan 2022 09:36:47 +0100	[thread overview]
Message-ID: <20220128083647.1422384-1-d.csapak@proxmox.com> (raw)

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





             reply	other threads:[~2022-01-28  8:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-28  8:36 Dominik Csapak [this message]
2022-01-28  8:46 ` [pve-devel] applied: " Fabian Grünbichler
2022-01-28  8:52   ` Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220128083647.1422384-1-d.csapak@proxmox.com \
    --to=d.csapak@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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