all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Fiona Ebner <f.ebner@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Daniel Herzig <d.herzig@proxmox.com>
Subject: Re: [pve-devel] [PATCH qemu-server v3 3/6] fix #4225: qemuserver, test: put eject_nonrequired_isos in place
Date: Fri, 31 Jan 2025 10:36:14 +0100	[thread overview]
Message-ID: <cf974cef-3e76-4385-841b-46b9f58a1f06@proxmox.com> (raw)
In-Reply-To: <20250130113121.157273-4-d.herzig@proxmox.com>

Am 30.01.25 um 12:31 schrieb Daniel Herzig:
> @@ -393,6 +410,25 @@ $pci_module->mock(
>      }
>  );
>  
> +my $pve_storage_plugin_module = Test::MockModule->new("PVE::Storage::Plugin");
> +$pve_storage_plugin_module->mock(
> +    activate_storage => sub {
> +       return 1;
> +    },
> +);
> +
> +my $pve_storage_cifsplugin_module = Test::MockModule->new("PVE::Storage::CIFSPlugin");
> +$pve_storage_cifsplugin_module->mock(
> +    check_connection => sub {
> +	return 1;
> +    },
> +    cifs_is_mounted => sub {
> +	my ($scfg, $mountdata) = @_;
> +	my ($mountpoint, $server, $share) = $scfg->@{'path', 'server', 'share'};
> +	return $mountpoint;
> +    },
> +);
> +

Can't we avoid mocking PVE::Storage::Plugin and
PVE::Storage::CIFSPlugin? It should be enough to just mock the top-level
storage API from PVE::Storage. Ideally, the qemu-server package should
not have any idea how the storage package works internally. You can add
conditionals for the storage IDs if you need specific behavior for
certain storages.

>  sub diff($$) {
>      my ($a, $b) = @_;
>      return if $a eq $b;



_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


  reply	other threads:[~2025-01-31  9:36 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-30 11:31 [pve-devel] [PATCH qemu-server v3 0/6] bugzilla #4225 -- improve handling of unavailable ISOs Daniel Herzig
2025-01-30 11:31 ` [pve-devel] [PATCH qemu-server v3 1/6] fix #4225: qemuserver: drive: add parameter to mark drive required Daniel Herzig
2025-01-31  9:36   ` Fiona Ebner
2025-01-31 11:09     ` Daniel Herzig
2025-01-30 11:31 ` [pve-devel] [PATCH qemu-server v3 2/6] fix #4225: qemuserver: introduce sub eject_nonrequired_isos Daniel Herzig
2025-01-31  9:36   ` Fiona Ebner
2025-01-31  9:52     ` Fiona Ebner
2025-01-31 13:58       ` Daniel Herzig
2025-02-03  9:00         ` Fiona Ebner
2025-02-03 10:15           ` Daniel Herzig
2025-02-03 13:09             ` Fiona Ebner
2025-02-03 13:12               ` Fiona Ebner
2025-01-30 11:31 ` [pve-devel] [PATCH qemu-server v3 3/6] fix #4225: qemuserver, test: put eject_nonrequired_isos in place Daniel Herzig
2025-01-31  9:36   ` Fiona Ebner [this message]
2025-01-30 11:31 ` [pve-devel] [PATCH pve-manager v3 4/6] fix #4225: ui: form: isoselector: add checkbox for 'essential' param Daniel Herzig
2025-01-30 11:31 ` [pve-devel] [PATCH pve-manager v3 5/6] fix #4225: ui: qemu: cdedit: enable 'Essential' checkbox for isos Daniel Herzig
2025-01-30 11:31 ` [pve-devel] [PATCH pve-manager v3 6/6] fix #4225: ui: qemu: hardware: add eject button for cdroms Daniel Herzig
2025-01-31  9:36 ` [pve-devel] [PATCH qemu-server v3 0/6] bugzilla #4225 -- improve handling of unavailable ISOs Fiona Ebner
2025-01-31 10:38   ` Daniel Herzig

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=cf974cef-3e76-4385-841b-46b9f58a1f06@proxmox.com \
    --to=f.ebner@proxmox.com \
    --cc=d.herzig@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal