mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-11-25 14:27:26 +01:00
Fix the tests after changes in commit b6420b6c
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
parent
fbb8864a51
commit
f9f76e6e7f
@ -39,6 +39,7 @@ using XenAPI;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using XenAdmin;
|
using XenAdmin;
|
||||||
using XenAdmin.Controls;
|
using XenAdmin.Controls;
|
||||||
|
using XenAdmin.Core;
|
||||||
using XenAdmin.Model;
|
using XenAdmin.Model;
|
||||||
using XenAdmin.XenSearch;
|
using XenAdmin.XenSearch;
|
||||||
|
|
||||||
@ -585,8 +586,11 @@ namespace XenAdminTests.TabsAndMenus
|
|||||||
var vdis = GetAllXenObjects<VDI>(v => v.name_label != "base copy" && !v.name_label.StartsWith("XenServer Transfer VM") && !v.is_a_snapshot);
|
var vdis = GetAllXenObjects<VDI>(v => v.name_label != "base copy" && !v.name_label.StartsWith("XenServer Transfer VM") && !v.is_a_snapshot);
|
||||||
foreach (VDI v in vdis)
|
foreach (VDI v in vdis)
|
||||||
{
|
{
|
||||||
|
var canBeMigrated = !Helpers.FeatureForbidden(v.Connection, Host.RestrictCrossPoolMigrate);
|
||||||
|
var canBeMoved = v.GetVMs().All(vm => vm.power_state == vm_power_state.Halted);
|
||||||
|
|
||||||
VerifyContextMenu(v, new ExpectedMenuItem[] {
|
VerifyContextMenu(v, new ExpectedMenuItem[] {
|
||||||
new ExpectedTextMenuItem("&Move Virtual Disk...", true),//can migrate
|
new ExpectedTextMenuItem("&Move Virtual Disk...", canBeMigrated || canBeMoved),
|
||||||
new ExpectedTextMenuItem("&Delete Virtual Disk", v.allowed_operations.Contains(vdi_operations.destroy)),
|
new ExpectedTextMenuItem("&Delete Virtual Disk", v.allowed_operations.Contains(vdi_operations.destroy)),
|
||||||
new ExpectedSeparator(),
|
new ExpectedSeparator(),
|
||||||
new ExpectedTextMenuItem("P&roperties", true),
|
new ExpectedTextMenuItem("P&roperties", true),
|
||||||
|
Loading…
Reference in New Issue
Block a user