mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 07:19:18 +01:00
Fix an error in the tests where the tests can select a default template which is not shown in the tree
(e.g. XenSource P2V Server, which is an internal template, not displayed in the tree) Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
parent
84ed24cd0c
commit
173a5877dd
@ -37,6 +37,7 @@ using XenAdmin.Core;
|
||||
using XenAdmin.Model;
|
||||
using XenAdmin.Network;
|
||||
using XenAdmin.Network.StorageLink;
|
||||
using XenAdminTests.XenModelTests;
|
||||
using XenAPI;
|
||||
|
||||
namespace XenAdminTests
|
||||
@ -158,7 +159,8 @@ namespace XenAdminTests
|
||||
|
||||
foreach (VM vm in connection.Cache.VMs)
|
||||
{
|
||||
if (vm.is_a_template && !vm.is_a_snapshot &&
|
||||
if (vm.is_a_template && !vm.is_a_snapshot &&
|
||||
vm.Show(XenAdminConfigManager.Provider.ShowHiddenVMs) &&
|
||||
vm.DefaultTemplate && (cond == null || cond(vm)))
|
||||
return vm;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user