mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 07:19:18 +01:00
Integrade changes from master-7.4 into master (https://github.com/xcp-ng/xenadmin/issues/68)
proper fix: use Path to TestDirectory https://github.com/nunit/docs/wiki/Breaking-Changes CurrentDirectory: No longer set to the directory containing the test assembly. Use TestContext.CurrentContext.TestDirectory to locate that directory. fix Test CertificateDialogTests Path to the Cert was build as: xenadmin\TestResources\TestDevCertificate.cer but should be: xenadmin\XenAdminTests\TestResources\TestDevCertificate.cer fix Test TestFailingReaderGeneration Ionic.BZip2 is throwing an IOException: System.IO.IOException: 'Not a valid BZip2 stream. byte 0, expected '66', got '-1'' use update.xml in master brach on github (as a first solution) https://github.com/xcp-ng/xenadmin/issues/29 Do not check for ContainerCapability on XCP-ng, just belive in it :-) If server is in not licenced, don't show alert icon Changed SetUp to OneTimeSetup in SetUpFixture https://github.com/xcp-ng/xenadmin/issues/24 abort, if BUILD_NUMBER environment variable is not set build automation Ignore ".vs" folder splash buildable with Visual Studio Community 2018 https://github.com/xcp-ng/xenadmin/issues/24 Get Tests running https://github.com/xcp-ng/xenadmin/issues/24 Get Tests running real world: edition "platinum" has changed to "desktop-plus" https://github.com/xcp-ng/xenadmin/issues/24 Get Tests running set culture to "en-EN" to ensure correct parsing https://github.com/xcp-ng/xenadmin/issues/24 Get Tests running correct adaption to nunit 3 adapt to nunit 3 adapt path real world: edition "platinum" has changed to "desktop-plus" Use Nunit and Moq from NuGet; Adapt tests to Nunit 3 https://github.com/xcp-ng/xenadmin/issues/24 Get Tests running Fill AssemblyFileVersion Idea from https://github.com/xcp-ng/xenadmin/issues/17 Show Version in Title Tidy up Branding/Trademarks/License https://github.com/xcp-ng/xenadmin/issues/18 Comment unreachable code to be buildable (https://github.com/xcp-ng/xenadmin/issues/14#issuecomment-380041068) XCP-ng Console should connect to any flavor of XenServer (cherry picked from commit 7e2342534d75193685139226fcaf89bb365fc706)
This commit is contained in:
parent
38fb7ef1c3
commit
2d1f47c321
@ -54,7 +54,7 @@ namespace XenAdmin.Dialogs
|
||||
|
||||
VersionLabel.Text = string.Format(Messages.VERSION_NUMBER, Branding.PRODUCT_VERSION_TEXT,
|
||||
Branding.XENCENTER_VERSION, buildText, IntPtr.Size * 8);
|
||||
label2.Text = string.Format(Messages.COPYRIGHT, Branding.COMPANY_NAME_LEGAL);
|
||||
//label2.Text = string.Format(Messages.COPYRIGHT, Branding.COMPANY_NAME_LEGAL);
|
||||
label2.Visible = !HiddenFeatures.CopyrightHidden;
|
||||
|
||||
showAgainCheckBox.Checked = Properties.Settings.Default.ShowAboutDialog;
|
||||
|
@ -256,13 +256,13 @@
|
||||
<value>14, 3, 14, 5</value>
|
||||
</data>
|
||||
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>275, 15</value>
|
||||
<value>161, 15</value>
|
||||
</data>
|
||||
<data name="label2.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="label2.Text" xml:space="preserve">
|
||||
<value>Copyright © [Citrix] Systems, Inc. All rights reserved.</value>
|
||||
<value>Copyright © XCP-ng Project.</value>
|
||||
</data>
|
||||
<data name=">>label2.Name" xml:space="preserve">
|
||||
<value>label2</value>
|
||||
@ -292,7 +292,7 @@
|
||||
<value>14, 23, 14, 5</value>
|
||||
</data>
|
||||
<data name="licenseDetailsLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>254, 15</value>
|
||||
<value>175, 15</value>
|
||||
</data>
|
||||
<data name="licenseDetailsLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>19</value>
|
||||
@ -328,7 +328,7 @@
|
||||
<value>14, 23, 14, 5</value>
|
||||
</data>
|
||||
<data name="VersionLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>323, 15</value>
|
||||
<value>203, 15</value>
|
||||
</data>
|
||||
<data name="VersionLabel.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>15</value>
|
||||
@ -364,7 +364,7 @@
|
||||
<value>12, 6, 3, 3</value>
|
||||
</data>
|
||||
<data name="showAgainCheckBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>321, 19</value>
|
||||
<value>258, 19</value>
|
||||
</data>
|
||||
<data name="showAgainCheckBox.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>21</value>
|
||||
@ -478,6 +478,6 @@
|
||||
<value>AboutDialog</value>
|
||||
</data>
|
||||
<data name=">>$this.Type" xml:space="preserve">
|
||||
<value>XenAdmin.Dialogs.XenDialogBase, XenCenterMain, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</value>
|
||||
<value>XenAdmin.Dialogs.XenDialogBase, XenCenterMain, Version=7.4.0.2, Culture=neutral, PublicKeyToken=null</value>
|
||||
</data>
|
||||
</root>
|
||||
</root>
|
@ -45,8 +45,8 @@ namespace XenAdmin.Dialogs
|
||||
public LegalNoticesDialog()
|
||||
{
|
||||
InitializeComponent();
|
||||
label2.Text = string.Format(Messages.COPYRIGHT, Branding.COMPANY_NAME_LEGAL);
|
||||
this.label1.Visible = this.label2.Visible = !XenAdmin.Core.HiddenFeatures.CopyrightHidden;
|
||||
//label2.Text = string.Format(Messages.COPYRIGHT, Branding.COMPANY_NAME_LEGAL);
|
||||
//this.label1.Visible = this.label2.Visible = !XenAdmin.Core.HiddenFeatures.CopyrightHidden;
|
||||
}
|
||||
|
||||
private void button1_Click(object sender, EventArgs e)
|
||||
|
@ -415,7 +415,7 @@ namespace XenAdmin
|
||||
|
||||
if (host_is_live)
|
||||
{
|
||||
if (host.IsFreeLicenseOrExpired())
|
||||
if (host.IsExpired())
|
||||
{
|
||||
return Icons.ServerUnlicensed;
|
||||
}
|
||||
@ -454,7 +454,7 @@ namespace XenAdmin
|
||||
{
|
||||
if (!pool.Connection.IsConnected)
|
||||
return Icons.HostDisconnected;
|
||||
if (pool.Connection.Cache.Hosts.Any(h => h.IsFreeLicenseOrExpired()))
|
||||
if (pool.Connection.Cache.Hosts.Any(h => h.IsExpired()))
|
||||
return Icons.PoolUnlicensed;
|
||||
if (pool.IsPoolFullyUpgraded())
|
||||
return Icons.PoolConnected;
|
||||
|
@ -108,7 +108,7 @@ namespace XenAdmin
|
||||
internal readonly UsbPage UsbPage = new UsbPage();
|
||||
|
||||
private ActionBase statusBarAction = null;
|
||||
|
||||
|
||||
private bool IgnoreTabChanges = false;
|
||||
private bool ToolbarsEnabled;
|
||||
|
||||
@ -483,10 +483,10 @@ namespace XenAdmin
|
||||
Debug.Assert(0 <= percentage && percentage <= 100,
|
||||
"PercentComplete is out of range, the reporting action needs to be fixed."); //CA-8517
|
||||
|
||||
var meddlingAction = action as MeddlingAction;
|
||||
if (meddlingAction == null)
|
||||
var meddlingAction = action as MeddlingAction;
|
||||
if (meddlingAction == null)
|
||||
{
|
||||
statusProgressBar.Visible = action.ShowProgress && !action.IsCompleted;
|
||||
statusProgressBar.Visible = action.ShowProgress && !action.IsCompleted;
|
||||
|
||||
if (percentage < 0)
|
||||
percentage = 0;
|
||||
@ -494,21 +494,21 @@ namespace XenAdmin
|
||||
percentage = 100;
|
||||
statusProgressBar.Value = percentage;
|
||||
|
||||
// Don't show cancelled exception
|
||||
if (action.Exception != null && !(action.Exception is CancelledException))
|
||||
{
|
||||
// Don't show cancelled exception
|
||||
if (action.Exception != null && !(action.Exception is CancelledException))
|
||||
{
|
||||
SetStatusBar(Properties.Resources._000_error_h32bit_16, action.Exception.Message);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
SetStatusBar(null, action.IsCompleted
|
||||
? null
|
||||
: !string.IsNullOrEmpty(action.Description)
|
||||
? action.Description
|
||||
: !string.IsNullOrEmpty(action.Title)
|
||||
? action.Title
|
||||
: null);
|
||||
}
|
||||
{
|
||||
SetStatusBar(null, action.IsCompleted
|
||||
? null
|
||||
: !string.IsNullOrEmpty(action.Description)
|
||||
? action.Description
|
||||
: !string.IsNullOrEmpty(action.Title)
|
||||
? action.Title
|
||||
: null);
|
||||
}
|
||||
}
|
||||
|
||||
int errors = ConnectionsManager.History.Count(a => a.IsCompleted && !a.Succeeded && !(a is CancellingAction && ((CancellingAction)a).Cancelled));
|
||||
@ -881,7 +881,7 @@ namespace XenAdmin
|
||||
dlog.ShowDialog(this);
|
||||
});
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//check the pool has no slaves earlier than the lowest supported version
|
||||
//(could happen if trying to connect to a partially upgraded pool where
|
||||
@ -995,8 +995,11 @@ namespace XenAdmin
|
||||
|
||||
private static bool SameProductBrand(Host host)
|
||||
{
|
||||
var brand = host.ProductBrand();
|
||||
return brand == Branding.PRODUCT_BRAND || brand == Branding.LEGACY_PRODUCT_BRAND || Branding.PRODUCT_BRAND == "[XenServer product]";
|
||||
//var brand = host.ProductBrand();
|
||||
//return brand == Branding.PRODUCT_BRAND || brand == Branding.LEGACY_PRODUCT_BRAND || Branding.PRODUCT_BRAND == "[XenServer product]";
|
||||
|
||||
// XCP-ng Console: we want to connect to any flavor of XenServer
|
||||
return true;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -1283,14 +1286,14 @@ namespace XenAdmin
|
||||
|
||||
try
|
||||
{
|
||||
ToolStrip.SuspendLayout();
|
||||
UpdateToolbarsCore();
|
||||
MainMenuBar_MenuActivate(null, null);
|
||||
ToolStrip.SuspendLayout();
|
||||
UpdateToolbarsCore();
|
||||
MainMenuBar_MenuActivate(null, null);
|
||||
}
|
||||
finally
|
||||
{
|
||||
ToolStrip.ResumeLayout();
|
||||
}
|
||||
ToolStrip.ResumeLayout();
|
||||
}
|
||||
|
||||
// Save and restore focus on treeView, since selecting tabs in ChangeToNewTabs() has the
|
||||
// unavoidable side-effect of giving them focus - this is irritating if trying to navigate
|
||||
@ -1474,14 +1477,14 @@ namespace XenAdmin
|
||||
f.SetUrl();
|
||||
if (!f.IsError)
|
||||
consoleFeatures.Add(f);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var page = GetLastSelectedPage(xenObject);
|
||||
if (page != null && page.Tag == f)
|
||||
f.SetUrl();
|
||||
otherFeatures.Add(f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1503,25 +1506,25 @@ namespace XenAdmin
|
||||
{
|
||||
if (!newTabs.Contains(page))
|
||||
TheTabControl.TabPages.Remove(page);
|
||||
}
|
||||
}
|
||||
|
||||
int m = 0; // Index into TheTabControl.TabPages
|
||||
|
||||
foreach (var newTab in newTabs)
|
||||
{
|
||||
{
|
||||
var index = TheTabControl.TabPages.IndexOf(newTab);
|
||||
if (index < 0)
|
||||
TheTabControl.TabPages.Insert(m, newTab);
|
||||
|
||||
m++;
|
||||
m++;
|
||||
|
||||
if (newTab == pageToSelect)
|
||||
TheTabControl.SelectedTab = newTab;
|
||||
}
|
||||
}
|
||||
|
||||
if (pageToSelect == null)
|
||||
TheTabControl.SelectedTab = TheTabControl.TabPages[0];
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
IgnoreTabChanges = false;
|
||||
@ -2519,7 +2522,7 @@ namespace XenAdmin
|
||||
$"{Branding.XENCENTER_VERSION}.{Program.Version.Revision}",
|
||||
"ui_link",
|
||||
Messages.XENCENTER);
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(helpTopicUrl))
|
||||
Program.OpenURL(helpTopicUrl);
|
||||
|
||||
@ -2714,11 +2717,11 @@ namespace XenAdmin
|
||||
{
|
||||
if (WizardHelpers.IsValidFile(path, out var failureReason))
|
||||
{
|
||||
var wizard = new PatchingWizard();
|
||||
wizard.Show(this);
|
||||
wizard.NextStep();
|
||||
wizard.AddFile(path);
|
||||
}
|
||||
var wizard = new PatchingWizard();
|
||||
wizard.Show(this);
|
||||
wizard.NextStep();
|
||||
wizard.AddFile(path);
|
||||
}
|
||||
else
|
||||
using (var popup = new ThreeButtonDialog(new ThreeButtonDialog.Details(
|
||||
SystemIcons.Error, failureReason, Messages.UPDATES)))
|
||||
@ -2817,7 +2820,7 @@ namespace XenAdmin
|
||||
IXenObject xenObject = SelectionManager.Selection[0].XenObject;
|
||||
TitleLabel.Text = xenObject.NameWithLocation();
|
||||
TitleIcon.Image = Images.GetImage16For(xenObject);
|
||||
|
||||
|
||||
licenseText = GetLicenseStatusText(xenObject, out licenseColor);
|
||||
|
||||
// When in folder view only show the logged in label if it is clear to which connection the object belongs (most likely pools and hosts)
|
||||
@ -2843,29 +2846,29 @@ namespace XenAdmin
|
||||
{
|
||||
foreColor = Program.TitleBarForeColor;
|
||||
|
||||
var pool = xenObject as Pool;
|
||||
var pool = xenObject as Pool;
|
||||
if (pool != null && pool.Connection != null && pool.Connection.IsConnected && pool.Connection.CacheIsPopulated)
|
||||
{
|
||||
if (pool.IsFreeLicenseOrExpired())
|
||||
{
|
||||
if (pool.IsFreeLicenseOrExpired())
|
||||
{
|
||||
foreColor = Color.Red;
|
||||
return Messages.MAINWINDOW_HEADER_UNLICENSED;
|
||||
}
|
||||
}
|
||||
|
||||
return string.Format(Messages.MAINWINDOW_HEADER_LICENSED_WITH, Helpers.GetFriendlyLicenseName(pool));
|
||||
}
|
||||
}
|
||||
|
||||
var host = xenObject as Host;
|
||||
var host = xenObject as Host;
|
||||
if (host != null && host.Connection != null && host.Connection.IsConnected && host.Connection.CacheIsPopulated)
|
||||
{
|
||||
if (host.IsFreeLicenseOrExpired())
|
||||
{
|
||||
if (host.IsExpired())
|
||||
{
|
||||
foreColor = Color.Red;
|
||||
return Messages.MAINWINDOW_HEADER_UNLICENSED;
|
||||
}
|
||||
}
|
||||
|
||||
return string.Format(Messages.MAINWINDOW_HEADER_LICENSED_WITH, Helpers.GetFriendlyLicenseName(host));
|
||||
}
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
@ -2948,7 +2951,7 @@ namespace XenAdmin
|
||||
alertPage.ShowPage();
|
||||
break;
|
||||
case NotificationsSubMode.Updates:
|
||||
if (alertPage.Visible)
|
||||
if (alertPage.Visible)
|
||||
alertPage.HidePage();
|
||||
if (eventsPage.Visible)
|
||||
eventsPage.HidePage();
|
||||
@ -2957,11 +2960,11 @@ namespace XenAdmin
|
||||
case NotificationsSubMode.Events:
|
||||
if (alertPage.Visible)
|
||||
alertPage.HidePage();
|
||||
if (updatesPage.Visible)
|
||||
if (updatesPage.Visible)
|
||||
updatesPage.HidePage();
|
||||
eventsPage.ShowPage();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
TheTabControl.Visible = false;
|
||||
|
||||
@ -3026,7 +3029,7 @@ namespace XenAdmin
|
||||
SearchPage.BuildList();
|
||||
|
||||
UpdateHeader();
|
||||
UpdateToolbars();
|
||||
UpdateToolbars();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
@ -52,7 +52,7 @@ namespace XenAdminTests.ArchiveTests
|
||||
|
||||
foreach (KeyValuePair<ArchiveFactory.Type, Type> pair in validIterators)
|
||||
{
|
||||
string target = Path.Combine(Directory.GetCurrentDirectory(), @"TestResources\emptyfile.bz2");
|
||||
string target = Path.Combine(Directory.GetCurrentDirectory(), @"XenAdminTests\TestResources\emptyfile.bz2");
|
||||
using (MemoryStream ms = new MemoryStream(File.ReadAllBytes(target)))
|
||||
{
|
||||
ArchiveIterator providedStream = ArchiveFactory.Reader(pair.Key, ms);
|
||||
@ -81,17 +81,15 @@ namespace XenAdminTests.ArchiveTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
[ExpectedException(typeof(NotSupportedException))]
|
||||
public void TestInvalidTarGzWriterGeneration()
|
||||
{
|
||||
CreateInvalidWriterType(ArchiveFactory.Type.TarGz);
|
||||
Assert.That(()=> CreateInvalidWriterType(ArchiveFactory.Type.TarGz), Throws.Exception.With.TypeOf(typeof(NotSupportedException)));
|
||||
}
|
||||
|
||||
[Test]
|
||||
[ExpectedException(typeof(NotSupportedException))]
|
||||
public void TestInvalidTarBz2WriterGeneration()
|
||||
{
|
||||
CreateInvalidWriterType(ArchiveFactory.Type.TarBz2);
|
||||
Assert.That(() => CreateInvalidWriterType(ArchiveFactory.Type.TarBz2), Throws.Exception.With.TypeOf(typeof(NotSupportedException)));
|
||||
}
|
||||
|
||||
private void CreateInvalidWriterType(ArchiveFactory.Type type)
|
||||
|
@ -155,13 +155,13 @@ namespace XenAdminTests.ArchiveTests
|
||||
}
|
||||
#endregion
|
||||
|
||||
[TestFixtureSetUp]
|
||||
[OneTimeSetUp]
|
||||
public void Setup()
|
||||
{
|
||||
fakeIterator = new ArchiveIteratorFake();
|
||||
}
|
||||
|
||||
[TestFixtureTearDown]
|
||||
[OneTimeTearDown]
|
||||
public void TearDown()
|
||||
{
|
||||
fakeIterator.Dispose();
|
||||
@ -175,18 +175,16 @@ namespace XenAdminTests.ArchiveTests
|
||||
|
||||
|
||||
[Test]
|
||||
[ExpectedException(typeof(ArgumentNullException))]
|
||||
public void AnExceptionIsThrownForNullArgumentWhenCallingExtractAllContents()
|
||||
{
|
||||
fakeIterator.ExtractAllContents(null);
|
||||
Assert.That(() => fakeIterator.ExtractAllContents(null), Throws.ArgumentNullException);
|
||||
}
|
||||
|
||||
[Test]
|
||||
[ExpectedException(typeof(ArgumentNullException))]
|
||||
public void AnExceptionIsThrownForANullFileNameWhenCallingExtractAllContents()
|
||||
{
|
||||
fakeIterator.CurrentFileNameReturn = null;
|
||||
fakeIterator.ExtractAllContents(Path.GetTempPath());
|
||||
Assert.That(() => fakeIterator.ExtractAllContents(Path.GetTempPath()), Throws.ArgumentNullException);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -120,13 +120,13 @@ namespace XenAdminTests.ArchiveTests
|
||||
|
||||
private FakeArchiveWriter fakeWriter;
|
||||
|
||||
[TestFixtureSetUp]
|
||||
[OneTimeSetUp]
|
||||
public void FixtureSetup()
|
||||
{
|
||||
fakeWriter = new FakeArchiveWriter();
|
||||
}
|
||||
|
||||
[TestFixtureTearDown]
|
||||
[OneTimeTearDown]
|
||||
public void FixtureTearDown()
|
||||
{
|
||||
fakeWriter.Dispose();
|
||||
@ -182,10 +182,9 @@ namespace XenAdminTests.ArchiveTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
[ExpectedException(typeof(FileNotFoundException))]
|
||||
public void CreateArchiveThrowsWithBadPath()
|
||||
{
|
||||
fakeWriter.CreateArchive("Yellow brick road - not a path!");
|
||||
Assert.That(()=> fakeWriter.CreateArchive("Yellow brick road - not a path!"), Throws.Exception.With.TypeOf(typeof(FileNotFoundException)));
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -42,7 +42,7 @@ namespace XenAdminTests.ArchiveTests
|
||||
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
|
||||
public class TarArchiveWriterTests : ThirdPartyArchiveWriterTest
|
||||
{
|
||||
[TestFixtureSetUp]
|
||||
[OneTimeSetUp]
|
||||
public void TestFixtureSetUp()
|
||||
{
|
||||
Writer = new SharpZipTarArchiveWriter();
|
||||
@ -53,14 +53,14 @@ namespace XenAdminTests.ArchiveTests
|
||||
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
|
||||
public class ZipArchiveWriterTests : ThirdPartyArchiveWriterTest
|
||||
{
|
||||
[TestFixtureSetUp]
|
||||
[OneTimeSetUp]
|
||||
public void TestFixtureSetUp()
|
||||
{
|
||||
Writer = new DotNetZipZipWriter();
|
||||
Reader = null;
|
||||
}
|
||||
|
||||
[TestFixtureTearDown]
|
||||
[OneTimeTearDown]
|
||||
public void TestFixtureTearDown()
|
||||
{
|
||||
Writer.Dispose();
|
||||
|
@ -45,7 +45,7 @@ namespace XenAdminTests.CommandTests
|
||||
: base(false, CommandTestsDatabase.George)
|
||||
{ }
|
||||
|
||||
[Test, Timeout( 100 * 1000 )]
|
||||
[Test, MaxTime( 100 * 1000 )]
|
||||
public void Run()
|
||||
{
|
||||
AddHostCommandTest tester = new AddHostCommandTest();
|
||||
@ -102,8 +102,8 @@ namespace XenAdminTests.CommandTests
|
||||
|
||||
//Test name is correct
|
||||
string subnodeOneText = MainWindowWrapper.TreeView.Nodes[0].Nodes[1].Text;
|
||||
Assert.IsNotNullOrEmpty(subnodeOneText,
|
||||
"Subnode 1's text is null or empty: The host may not have been added");
|
||||
Assert.IsNotNull(subnodeOneText, "Subnode 1's text is null: The host may not have been added");
|
||||
Assert.IsNotEmpty(subnodeOneText, "Subnode 1's text is empty: The host may not have been added");
|
||||
Assert.AreEqual("krakout", subnodeOneText,
|
||||
"Subnode1's text containing the host name was incorrect");
|
||||
|
||||
|
@ -49,7 +49,7 @@ namespace XenAdminTests.CommandTests
|
||||
{ }
|
||||
|
||||
[Test]
|
||||
[Timeout(100 * 1000)]
|
||||
[MaxTime(100 * 1000)]
|
||||
public void Run()
|
||||
{
|
||||
AddHostToPoolCommandTest tester = new AddHostToPoolCommandTest();
|
||||
|
@ -61,8 +61,8 @@ namespace XenAdminTests.CommandTests
|
||||
}
|
||||
|
||||
[Test, Category(TestCategories.SmokeTest)]
|
||||
[TestCase(true, Description = "Is LunPerVdi", Result = false)]
|
||||
[TestCase(false, Description = "Is Not LunPerVdi", Result = true)]
|
||||
[TestCase(true, Description = "Is LunPerVdi", ExpectedResult = false)]
|
||||
[TestCase(false, Description = "Is Not LunPerVdi", ExpectedResult = true)]
|
||||
public bool VerifyLunPerVdiBehaviour(bool IsLunPerVdi)
|
||||
{
|
||||
Mock<VM> vm = ObjectFactory.BuiltObject<VM>(ObjectBuilderType.VmWithHomeServerHost, id);
|
||||
@ -78,8 +78,8 @@ namespace XenAdminTests.CommandTests
|
||||
}
|
||||
|
||||
[Test, Category(TestCategories.SmokeTest)]
|
||||
[TestCase(true, Description = "Wlb enabled", Result = false)]
|
||||
[TestCase(false, Description = "Wlb disabled", Result = true)]
|
||||
[TestCase(true, Description = "Wlb enabled", ExpectedResult = false)]
|
||||
[TestCase(false, Description = "Wlb disabled", ExpectedResult = true)]
|
||||
public bool IntrapoolWlbEnabledBehaviour(bool WlbEnabled)
|
||||
{
|
||||
Mock<VM> vm = ObjectFactory.BuiltObject<VM>(ObjectBuilderType.VmWithHomeServerHost, id);
|
||||
@ -99,10 +99,10 @@ namespace XenAdminTests.CommandTests
|
||||
|
||||
|
||||
[Test, Category(TestCategories.SmokeTest)]
|
||||
[TestCase(true, true, Description = "Wlb enabled both", Result = false)]
|
||||
[TestCase(false, false, Description = "Wlb disabled both", Result = true)]
|
||||
[TestCase(true, false, Description = "Wlb enabled VM", Result = false)]
|
||||
[TestCase(false, true, Description = "Wlb enabled target", Result = true)]
|
||||
[TestCase(true, true, Description = "Wlb enabled both", ExpectedResult = false)]
|
||||
[TestCase(false, false, Description = "Wlb disabled both", ExpectedResult = true)]
|
||||
[TestCase(true, false, Description = "Wlb enabled VM", ExpectedResult = false)]
|
||||
[TestCase(false, true, Description = "Wlb enabled target", ExpectedResult = true)]
|
||||
public bool CrossPoolWlbEnabledBehaviour(bool WlbEnabledVM, bool WlbEnabledTarget)
|
||||
{
|
||||
//First connection
|
||||
|
@ -51,7 +51,7 @@ namespace XenAdminTests.CommandTests
|
||||
{ }
|
||||
|
||||
[Test]
|
||||
[Timeout(100 * 1000)]
|
||||
[MaxTime(100 * 1000)]
|
||||
public void Run()
|
||||
{
|
||||
NewFolderCommandTest tester = new NewFolderCommandTest();
|
||||
@ -67,7 +67,7 @@ namespace XenAdminTests.CommandTests
|
||||
{ }
|
||||
|
||||
[Test]
|
||||
[Timeout(100 * 1000)]
|
||||
[MaxTime(100 * 1000)]
|
||||
public void Run()
|
||||
{
|
||||
NewFolderCommandTest tester = new NewFolderCommandTest();
|
||||
|
@ -94,7 +94,7 @@ namespace XenAdminTests.CommandTests
|
||||
{ }
|
||||
|
||||
[Test]
|
||||
[Timeout(100 * 1000)]
|
||||
[MaxTime(100 * 1000)]
|
||||
public void Run()
|
||||
{
|
||||
VMLifecycleCommandTest tester = new VMLifecycleCommandTest();
|
||||
|
@ -74,7 +74,7 @@ namespace XenAdminTests.CompressionTests
|
||||
|
||||
foreach (KeyValuePair<CompressionFactory.Type, Type> pair in validReaders)
|
||||
{
|
||||
string target = Path.Combine(Directory.GetCurrentDirectory(), "TestResources", "emptyfile.bz2");
|
||||
string target = Path.Combine(Directory.GetCurrentDirectory(), @"XenAdminTests\TestResources", "emptyfile.bz2");
|
||||
/*
|
||||
* Note: Reading a bzip2 file in as a byte[] works for gzip as well as bzip2 stream
|
||||
* as the implementation of bzip2 must be initialised with a string containing a
|
||||
@ -97,14 +97,16 @@ namespace XenAdminTests.CompressionTests
|
||||
* As this is not the case then this null construction will throw an exception
|
||||
*/
|
||||
[Test]
|
||||
[ExpectedException(typeof(IOException))]
|
||||
public void TestFailingReaderGeneration()
|
||||
{
|
||||
using (MemoryStream ms = new MemoryStream())
|
||||
Assert.Throws<IOException>(() =>
|
||||
{
|
||||
using( CompressionFactory.Reader(CompressionFactory.Type.Bz2, ms))
|
||||
{}
|
||||
}
|
||||
using (MemoryStream ms = new MemoryStream())
|
||||
{
|
||||
using (CompressionFactory.Reader(CompressionFactory.Type.Bz2, ms))
|
||||
{ }
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -56,13 +56,13 @@ namespace XenAdminTests.CompressionTests
|
||||
|
||||
private CompressionStreamFake fakeCompressionStream;
|
||||
|
||||
[TestFixtureSetUp]
|
||||
[OneTimeSetUp]
|
||||
public void TestFixtureSetUp()
|
||||
{
|
||||
fakeCompressionStream = new CompressionStreamFake();
|
||||
}
|
||||
|
||||
[TestFixtureTearDown]
|
||||
[OneTimeTearDown]
|
||||
public void TestFixtureTearDown()
|
||||
{
|
||||
fakeCompressionStream.Dispose();
|
||||
|
@ -41,7 +41,7 @@ namespace XenAdminTests.CompressionTests
|
||||
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
|
||||
public class GzipCompressionTests : ThirdPartyCompressionTests
|
||||
{
|
||||
[TestFixtureSetUp]
|
||||
[OneTimeSetUp]
|
||||
public void SetupFixture()
|
||||
{
|
||||
Compressor = new DotNetZipGZipOutputStream();
|
||||
@ -52,7 +52,7 @@ namespace XenAdminTests.CompressionTests
|
||||
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
|
||||
public class Bzip2CompressionTests : ThirdPartyCompressionTests
|
||||
{
|
||||
[TestFixtureSetUp]
|
||||
[OneTimeSetUp]
|
||||
public void SetupFixture()
|
||||
{
|
||||
Compressor = new DotNetZipBZip2OutputStream();
|
||||
|
@ -106,7 +106,7 @@ namespace XenAdminTests.Controls
|
||||
Assert.That(gb.ManipulatedText, Is.EqualTo(String.Empty), "Manipulated text TestCase width: " + width);
|
||||
}
|
||||
|
||||
public IEnumerable<TestCase> TestCasesNoMnemonicNoEllipsing
|
||||
public static IEnumerable<TestCase> TestCasesNoMnemonicNoEllipsing
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -137,7 +137,7 @@ namespace XenAdminTests.Controls
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<TestCase> TestCasesWithMnemonicNoEllipsing
|
||||
public static IEnumerable<TestCase> TestCasesWithMnemonicNoEllipsing
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -163,7 +163,7 @@ namespace XenAdminTests.Controls
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<TestCase> TestCasesWithMnemonic
|
||||
public static IEnumerable<TestCase> TestCasesWithMnemonic
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -190,7 +190,7 @@ namespace XenAdminTests.Controls
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerable<TestCase> TestCasesNoMnemonic
|
||||
public static IEnumerable<TestCase> TestCasesNoMnemonic
|
||||
{
|
||||
get
|
||||
{
|
||||
|
@ -50,9 +50,9 @@ namespace XenAdminTests.Controls
|
||||
}
|
||||
|
||||
[Test]
|
||||
[TestCase(0, Result = true)]
|
||||
[TestCase(1, Result = false)]
|
||||
[TestCase(22, Result = false)]
|
||||
[TestCase(0, ExpectedResult = true)]
|
||||
[TestCase(1, ExpectedResult = false)]
|
||||
[TestCase(22, ExpectedResult = false)]
|
||||
public bool VBDCountDisablesItem(int vbdCount)
|
||||
{
|
||||
Mock<VDI> vdi = GetMockVdi(vbdCount);
|
||||
@ -68,12 +68,12 @@ namespace XenAdminTests.Controls
|
||||
Assert.That(item.Enabled, Is.EqualTo(expectedEnabled), description);
|
||||
}
|
||||
|
||||
[Test, ExpectedException(typeof(ArgumentNullException))]
|
||||
[Test]
|
||||
public void NullAdditionalConstraintsThrows()
|
||||
{
|
||||
Mock<VDI> vdi = GetMockVdi(0);
|
||||
LunComboBoxItem item = new LunComboBoxItem(vdi.Object) { AdditionalConstraints = null };
|
||||
bool b = item.Enabled;
|
||||
Assert.That(()=> item.Enabled, Throws.ArgumentNullException);
|
||||
}
|
||||
|
||||
|
||||
|
@ -49,8 +49,8 @@ namespace XenAdminTests.Controls
|
||||
}
|
||||
|
||||
[Test]
|
||||
[TestCase(true, Result = true)]
|
||||
[TestCase(false, Result = false)]
|
||||
[TestCase(true, ExpectedResult = true)]
|
||||
[TestCase(false, ExpectedResult = false)]
|
||||
public bool IsValidForMapping(bool lunPerVDI)
|
||||
{
|
||||
Mock<SR> sr = ObjectManager.NewXenObject<SR>(id);
|
||||
|
@ -40,6 +40,7 @@ using XenAPI;
|
||||
|
||||
namespace XenAdminTests.Controls
|
||||
{
|
||||
[SetCulture("en-EN")]
|
||||
public class SrPickerItemTests : DatabaseTester_TestFixture
|
||||
{
|
||||
private const string dbName = "TampaTwoHostPoolSelectioniSCSI.xml";
|
||||
|
@ -53,13 +53,13 @@ namespace XenAdminTests
|
||||
: base(databases)
|
||||
{ }
|
||||
|
||||
[TestFixtureSetUp]
|
||||
[OneTimeSetUp]
|
||||
public void SetUp()
|
||||
{
|
||||
Setup();
|
||||
}
|
||||
|
||||
[TestFixtureTearDown]
|
||||
[OneTimeTearDown]
|
||||
public void TearDown()
|
||||
{
|
||||
Dispose();
|
||||
|
@ -108,7 +108,7 @@ namespace XenAdminTests.DialogTests.boston.CertificateDialogTests
|
||||
{
|
||||
get
|
||||
{
|
||||
string certFileName = Path.Combine(Directory.GetCurrentDirectory(), "TestResources", "TestDevCertificate.cer");
|
||||
string certFileName = Path.Combine(TestContext.CurrentContext.TestDirectory, "TestResources", "TestDevCertificate.cer");
|
||||
return X509Certificate.CreateFromCertFile(certFileName);
|
||||
}
|
||||
}
|
||||
@ -134,4 +134,4 @@ namespace XenAdminTests.DialogTests.boston.CertificateDialogTests
|
||||
Assert.IsTrue(TestUtils.GetButton(dialog, certificateDialogControlNames.CancelButton ).Enabled, "Cancel button");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -64,7 +64,7 @@ namespace XenAdminTests.DialogTests.state1_xml.DialogsForConnection
|
||||
{
|
||||
IXenConnection connection = null;
|
||||
|
||||
[TestFixtureSetUp]
|
||||
[OneTimeSetUp]
|
||||
public void ChooseConnection()
|
||||
{
|
||||
connection = GetAnyConnection();
|
||||
|
@ -50,7 +50,7 @@ namespace XenAdminTests.DialogTests.LicenseManager.Comparers
|
||||
public bool VersionChecked { get; set; }
|
||||
}
|
||||
|
||||
private IEnumerable<TestCase> TestCases
|
||||
private static IEnumerable<TestCase> TestCases
|
||||
{
|
||||
get
|
||||
{
|
||||
|
@ -42,14 +42,14 @@ namespace XenAdminTests.HealthCheckTests
|
||||
{
|
||||
public class CredentialTests : UnitTester_TestFixture
|
||||
{
|
||||
[TestFixtureSetUp]
|
||||
[OneTimeSetUp]
|
||||
public void FixtureSetup()
|
||||
{
|
||||
CredentialReceiver.instance.Init();
|
||||
ServerListHelper.instance.Init();
|
||||
}
|
||||
|
||||
[TestFixtureTearDown]
|
||||
[OneTimeTearDown]
|
||||
public void FixtureTearDown()
|
||||
{
|
||||
CredentialReceiver.instance.UnInit();
|
||||
|
@ -63,14 +63,14 @@ namespace XenAdminTests.HealthCheckTests
|
||||
config[HealthCheckSettings.LAST_FAILED_UPLOAD] = "";
|
||||
return config;
|
||||
}
|
||||
[TestFixtureSetUp]
|
||||
[OneTimeSetUp]
|
||||
public void FixtureSetup()
|
||||
{
|
||||
CredentialReceiver.instance.Init();
|
||||
ServerListHelper.instance.Init();
|
||||
}
|
||||
|
||||
[TestFixtureTearDown]
|
||||
[OneTimeTearDown]
|
||||
public void FixtureTearDown()
|
||||
{
|
||||
CredentialReceiver.instance.UnInit();
|
||||
@ -106,7 +106,7 @@ namespace XenAdminTests.HealthCheckTests
|
||||
|
||||
}
|
||||
|
||||
[Test, Timeout( 100 * 1000 )]
|
||||
[Test, MaxTime( 100 * 1000 )]
|
||||
public void checkUploadLock()
|
||||
{
|
||||
IXenConnection connection = DatabaseManager.ConnectionFor(dbName);
|
||||
|
@ -92,8 +92,8 @@ namespace XenAdminTests
|
||||
}
|
||||
}
|
||||
|
||||
Assert.IsNullOrEmpty(missingSb.ToString(), "Missing resources detected.");
|
||||
Assert.IsNullOrEmpty(extraSb.ToString(), "Unecessary resources detected");
|
||||
Assert.That(missingSb.ToString(), Is.Null.Or.Empty); //Missing resources detected.
|
||||
Assert.That(extraSb.ToString(), Is.Null.Or.Empty); //"Unecessary resources detected"
|
||||
}
|
||||
|
||||
#region Auxiliary private methods
|
||||
|
@ -133,7 +133,7 @@ namespace XenAdminTests.LicensingTests
|
||||
}
|
||||
|
||||
#region Private Helper Methods
|
||||
private IEnumerable<ExipryDateTestCase> CoarseExpiryDateTestCases
|
||||
private static IEnumerable<ExipryDateTestCase> CoarseExpiryDateTestCases
|
||||
{
|
||||
get
|
||||
{
|
||||
|
@ -54,7 +54,7 @@ namespace XenAdminTests.LicensingTests
|
||||
public string Contains { get; set; }
|
||||
}
|
||||
|
||||
private IEnumerable<TestCase> TestData
|
||||
private static IEnumerable<TestCase> TestData
|
||||
{
|
||||
get
|
||||
{
|
||||
|
@ -214,13 +214,13 @@ namespace XenAdminTests
|
||||
: base(readOnly, databases)
|
||||
{ }
|
||||
|
||||
[TestFixtureSetUp]
|
||||
[OneTimeSetUp]
|
||||
public void SetUp()
|
||||
{
|
||||
base._SetUp();
|
||||
}
|
||||
|
||||
[TestFixtureTearDown]
|
||||
[OneTimeTearDown]
|
||||
public void TearDown()
|
||||
{
|
||||
base._TearDown();
|
||||
@ -233,13 +233,13 @@ namespace XenAdminTests
|
||||
: base(databases)
|
||||
{ }
|
||||
|
||||
[SetUp]
|
||||
[OneTimeSetUp]
|
||||
public void SetUp()
|
||||
{
|
||||
base._SetUp();
|
||||
}
|
||||
|
||||
[TearDown]
|
||||
[OneTimeTearDown]
|
||||
public void TearDown()
|
||||
{
|
||||
base._TearDown();
|
||||
|
@ -191,7 +191,7 @@ namespace XenAdminTests
|
||||
|
||||
public static string GetTestResource(string name)
|
||||
{
|
||||
return Path.Combine(Directory.GetCurrentDirectory(), "TestResources", name);
|
||||
return Path.Combine(Directory.GetCurrentDirectory(), @"XenAdminTests\TestResources", name);
|
||||
}
|
||||
|
||||
|
||||
|
@ -43,23 +43,21 @@ namespace XenAdminTests.MiscTests
|
||||
class StreamUtilitiesTests
|
||||
{
|
||||
[Test]
|
||||
[ExpectedException(typeof(ArgumentNullException))]
|
||||
public void BufferedStreamCopyWithNullInputStream()
|
||||
{
|
||||
using( MemoryStream ms = new MemoryStream() )
|
||||
{
|
||||
StreamUtilities.BufferedStreamCopy( null, ms );
|
||||
Assert.That(() => StreamUtilities.BufferedStreamCopy(null, ms), Throws.ArgumentNullException);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[Test]
|
||||
[ExpectedException(typeof(ArgumentNullException))]
|
||||
public void BufferedStreamCopyWithNullOutputStream()
|
||||
{
|
||||
using (MemoryStream ms = new MemoryStream())
|
||||
{
|
||||
StreamUtilities.BufferedStreamCopy(ms, null);
|
||||
Assert.That(() => StreamUtilities.BufferedStreamCopy(ms, null), Throws.ArgumentNullException);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -76,17 +76,15 @@ namespace XenAdminTests.MiscTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
[ExpectedException(typeof(FormatException))]
|
||||
public void ISODateTimeParseWithBadFormat()
|
||||
{
|
||||
TimeUtil.ParseISO8601DateTime("20111225T1020:37Z");
|
||||
Assert.That(() => TimeUtil.ParseISO8601DateTime("20111225T1020:37Z"), Throws.Exception.With.TypeOf(typeof(FormatException)));
|
||||
}
|
||||
|
||||
[Test]
|
||||
[ExpectedException(typeof(ArgumentNullException))]
|
||||
public void ISODateTimeParseWithNullArg()
|
||||
{
|
||||
TimeUtil.ParseISO8601DateTime(null);
|
||||
Assert.That(() => TimeUtil.ParseISO8601DateTime(null), Throws.ArgumentNullException);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -38,7 +38,7 @@ using System.IO;
|
||||
|
||||
namespace XenAdminTests.MiscTests
|
||||
{
|
||||
[TestFixture, RequiresSTA]
|
||||
[TestFixture, Apartment(ApartmentState.STA)]
|
||||
public class WebBrowser2Tests : MainWindowLauncher_TestFixture
|
||||
{
|
||||
private WebBrowser2 _wb;
|
||||
|
@ -56,7 +56,7 @@ namespace XenAdminTests.PluginTests
|
||||
_pluginManager = new PluginManager();
|
||||
}
|
||||
|
||||
[Test, RequiresSTA]
|
||||
[Test, Apartment(System.Threading.ApartmentState.STA)]
|
||||
public void TestLoadPlugin()
|
||||
{
|
||||
_pluginLoader = new TestPluginLoader("TabPageFeatureTestPlugin", _pluginManager);
|
||||
|
@ -49,7 +49,7 @@ namespace XenAdminTests.SearchTests
|
||||
|
||||
protected virtual string resultsFileName { get { return "searchresults.xml"; } }
|
||||
|
||||
[TestFixtureSetUp]
|
||||
[OneTimeSetUp]
|
||||
public void LoadResultsFile()
|
||||
{
|
||||
//You can enable the below line to get the search results written out if new ones are required
|
||||
|
@ -64,7 +64,7 @@ namespace XenAdminTests.SearchTests
|
||||
|
||||
PropertyAccessor ipAddress = PropertyAccessors.Get(PropertyNames.ip_address);
|
||||
|
||||
foreach(IXenConnection connection in ConnectionsManager.XenConnectionsCopy)
|
||||
foreach (IXenConnection connection in ConnectionsManager.XenConnectionsCopy)
|
||||
{
|
||||
foreach (IXenObject o in connection.Cache.XenSearchableObjects)
|
||||
{
|
||||
|
@ -41,7 +41,7 @@ namespace XenAdminTests.SearchTests
|
||||
class SearchMarshallingTests
|
||||
{
|
||||
[Test]
|
||||
public void RunTest()
|
||||
public void SearchMarshallingTest()
|
||||
{
|
||||
foreach (Search search in Search.Searches)
|
||||
{
|
||||
|
@ -46,7 +46,7 @@ namespace XenAdminTests.SearchTests
|
||||
: base(databases)
|
||||
{ }
|
||||
|
||||
[SetUp]
|
||||
[OneTimeSetUp]
|
||||
public void SwitchToSearchTab()
|
||||
{
|
||||
MainWindowWrapper mainWindowWrapper = new MainWindowWrapper(Program.MainWindow);
|
||||
|
@ -101,7 +101,7 @@ namespace XenAdminTests.SearchTests
|
||||
/// </summary>
|
||||
/// <param name="xenObject">The xen object to be tested.</param>
|
||||
[Test]
|
||||
[Ignore]
|
||||
[Ignore("???")]
|
||||
public void TestSearcherUpdatesWhenTagsChange()
|
||||
{
|
||||
MW(() => EditSearchButton.PerformClick());
|
||||
@ -144,7 +144,7 @@ namespace XenAdminTests.SearchTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Ignore]
|
||||
[Ignore("")]
|
||||
public void TestSearcherUpdatesWhenCustomFieldsChange()
|
||||
{
|
||||
MW(() => EditSearchButton.PerformClick());
|
||||
|
@ -53,7 +53,7 @@ namespace XenAdminTests.TabsAndMenus
|
||||
public LicenseStatus.HostState State { get; set; }
|
||||
}
|
||||
|
||||
private IEnumerable<TestData> StatusTestData
|
||||
private static IEnumerable<TestData> StatusTestData
|
||||
{
|
||||
get
|
||||
{
|
||||
|
@ -102,7 +102,7 @@ namespace XenAdminTests.TabsAndMenus
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Ignore]
|
||||
[Ignore("")]
|
||||
public void TestAfterConnection()
|
||||
{
|
||||
foreach (VirtualTreeNode n in GetAllTreeNodes())
|
||||
|
@ -54,7 +54,7 @@ namespace XenAdminTests.TabsAndMenus
|
||||
{
|
||||
}
|
||||
|
||||
[TestFixtureSetUp]
|
||||
[OneTimeSetUp]
|
||||
public void TestFixtureSetUp()
|
||||
{
|
||||
DisableAllPlugins();
|
||||
|
@ -44,12 +44,12 @@ namespace XenAdminTests.TabsAndMenus
|
||||
{ }
|
||||
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
[TestFixtureSetUp]
|
||||
[OneTimeSetUp]
|
||||
public void TestFixtureSetUp()
|
||||
{
|
||||
}
|
||||
|
||||
[Test, Timeout(120000)]
|
||||
[Test, MaxTime(120000)]
|
||||
[Ignore("Ignore this test, because it takes too long.")]
|
||||
public void AddALotOfVIFsThenRemoveThemShouldNotThrowAnException()
|
||||
{
|
||||
|
@ -61,7 +61,7 @@ namespace XenAdminTests.TabsAndMenus
|
||||
CheckHelp = false;
|
||||
}
|
||||
|
||||
[TestFixtureSetUp]
|
||||
[OneTimeSetUp]
|
||||
public void TestFixtureSetUp()
|
||||
{
|
||||
string plugins = Path.Combine(Program.AssemblyDir, "Plugins");
|
||||
@ -96,7 +96,7 @@ namespace XenAdminTests.TabsAndMenus
|
||||
EnableAllPlugins();
|
||||
}
|
||||
|
||||
[TestFixtureTearDown]
|
||||
[OneTimeTearDown]
|
||||
public void TestFixtureTearDown()
|
||||
{
|
||||
foreach (string folder in _folders)
|
||||
|
@ -42,7 +42,7 @@ namespace XenAdminTests.TabsAndMenus
|
||||
public class StartUpStateTests : TabsAndMenus
|
||||
{
|
||||
|
||||
[TestFixtureSetUp]
|
||||
[OneTimeSetUp]
|
||||
public void TestFixtureSetUp()
|
||||
{
|
||||
ConnectToStateDBs("state1.xml");
|
||||
@ -50,7 +50,7 @@ namespace XenAdminTests.TabsAndMenus
|
||||
DisableAllPlugins();
|
||||
}
|
||||
|
||||
[TestFixtureTearDown]
|
||||
[OneTimeTearDown]
|
||||
public new void TearDown()
|
||||
{
|
||||
MW(RemoveStateDBs);
|
||||
|
@ -53,7 +53,7 @@ namespace XenAdminTests.TabsAndMenus
|
||||
{
|
||||
}
|
||||
|
||||
[TestFixtureSetUp]
|
||||
[OneTimeSetUp]
|
||||
public void TestFixtureSetUp()
|
||||
{
|
||||
DisableAllPlugins();
|
||||
|
@ -51,7 +51,7 @@ namespace XenAdminTests.TabsAndMenus
|
||||
{
|
||||
}
|
||||
|
||||
[TestFixtureSetUp]
|
||||
[OneTimeSetUp]
|
||||
public void TestFixtureSetUp()
|
||||
{
|
||||
DisableAllPlugins();
|
||||
|
@ -189,7 +189,7 @@ namespace XenAdminTests
|
||||
|
||||
private string TestResource(string name)
|
||||
{
|
||||
return Path.Combine(Directory.GetCurrentDirectory(), "TestResources", name);
|
||||
return Path.Combine(Directory.GetCurrentDirectory(), @"XenAdminTests\TestResources", name);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -71,7 +71,7 @@
|
||||
<row ref="OpaqueRef:6fbb2520-fe9e-f107-aaba-e0591ba02c55" qos__supported_algorithms="()" other_config="(('owner' ''))" uuid="e9eededb-07e6-b2a4-149a-ff4be46bbafc" allowed_operations="()" qos__algorithm_params="()" type="Disk" VM="OpaqueRef:3eb72824-9758-ee08-619a-0fe51c6dbe1b" VDI="OpaqueRef:69ff47ea-9558-34f1-aa56-dc56e6506a67" qos__algorithm_type="" metrics="OpaqueRef:c75f1aa4-0f9c-a7e4-4d82-cd28a10a6d46" device="xvdb" empty="false" bootable="false" current_operations="()" unpluggable="false" status_detail="" runtime_properties="()" userdevice="1" mode="RW" storage_lock="false" status_code="0" currently_attached="false" _ref="OpaqueRef:6fbb2520-fe9e-f107-aaba-e0591ba02c55" reserved="false"/>
|
||||
</table>
|
||||
<table name="host">
|
||||
<row ref="OpaqueRef:179a6549-c043-772a-404e-5f6c874369f2" API_version__vendor="XenSource" blobs="()" edition="enterprise" bios_strings="(('bios-vendor' 'Intel Corp.') ('bios-version' 'NT94510J.86A.4034.2006.1109.0935') ('system-manufacturer' '') ('system-product-name' '') ('system-version' '') ('system-serial-number' '') ('oem-1' 'Xen') ('oem-2' 'MS_VM_CERT/SHA1/bdbeb6e0a816d43fa6d3fe8aaef04c2bad9d3e3d') ('hp-rombios' ''))" other_config="(('iscsi_iqn' 'iqn.2009-11.com.xensource.uk:6b4a3ff5') ('agent_start_time' '1257501232.') ('boot_time' '1257501199.'))" supported_bootloaders="('pygrub' 'eliloader')" software_version="(('product_version' '6.0.0') ('product_brand' 'XenServer') ('build_number' '14395c') ('hg_id' '9e784cde94d3') ('hostname' 'taris-2') ('date' '2009-11-03') ('dbv' '2009.0201') ('xapi' '1.3') ('xen' '3.4.1') ('linux' '2.6.27.29-0.1.1.xs5.5.0.670.1029xen') ('xencenter_min' '1.7') ('xencenter_max' '1.7') ('package-linux' 'installed') ('xs:main' 'Base Pack, version 5.5.0, build 14395c'))" uuid="e2abcc86-ea46-4154-bba5-a619a8dcf34b" allowed_operations="('vm_migrate' 'evacuate' 'provision' 'vm_resume' 'vm_start')" cpu_configuration="()" logging="()" boot_free_mem="3105599488" sched_policy="credit" crash_dump_sr="OpaqueRef:9df0a7b4-4ec9-7612-62d8-d454a8d4d4b9" ha_network_peers="()" tags="()" license_server="(('port' '27000') ('address' '10.80.239.186'))" ha_statefiles="()" external_auth_service_name="" metrics="OpaqueRef:065b76ae-8306-9cf2-6826-25af3a1e62a0" API_version__major="2" capabilities="('xen-3.0-x86_64' 'xen-3.0-x86_32p' 'hvm-3.0-x86_32' 'hvm-3.0-x86_32p' 'hvm-3.0-x86_64' '')" address="10.80.226.57" power_on_config="()" external_auth_configuration="()" current_operations="()" API_version__minor="0" API_version__vendor_implementation="()" name__label="krakout" name__description="Default install of XenServer" power_on_mode="wake-on-lan" license_params="(('sku_type' 'XE Enterprise') ('version' '5.5.0') ('serialnumber' '') ('sockets' '1') ('productcode' '') ('expiry' '20300101T00:00:00Z') ('grace' 'no') ('name' '') ('company' '') ('address1' '') ('address2' '') ('city' '') ('state' '') ('postalcode' '') ('country' '') ('sku_marketing_name' 'Citrix Essentials for XenServer, Enterprise Edition') ('restrict_connection' 'false') ('restrict_pooling' 'false') ('restrict_qos' 'false') ('restrict_pool_attached_storage' 'false') ('restrict_netapp' 'false') ('restrict_equalogic' 'false') ('restrict_vlan' 'false') ('enable_xha' 'true') ('restrict_marathon' 'false') ('platform_filter' 'false') ('restrict_email_alerting' 'false') ('restrict_historical_performance' 'false') ('restrict_wlb' 'false') ('restrict_rbac' 'false') ('regular_nag_dialog' 'false'))" hostname="krakout" suspend_image_sr="OpaqueRef:9df0a7b4-4ec9-7612-62d8-d454a8d4d4b9" memory__overhead="114675712" enabled="true" external_auth_type="" _ref="OpaqueRef:179a6549-c043-772a-404e-5f6c874369f2"/>
|
||||
<row ref="OpaqueRef:179a6549-c043-772a-404e-5f6c874369f2" API_version__vendor="XenSource" blobs="()" edition="enterprise-per-socket" bios_strings="(('bios-vendor' 'Intel Corp.') ('bios-version' 'NT94510J.86A.4034.2006.1109.0935') ('system-manufacturer' '') ('system-product-name' '') ('system-version' '') ('system-serial-number' '') ('oem-1' 'Xen') ('oem-2' 'MS_VM_CERT/SHA1/bdbeb6e0a816d43fa6d3fe8aaef04c2bad9d3e3d') ('hp-rombios' ''))" other_config="(('iscsi_iqn' 'iqn.2009-11.com.xensource.uk:6b4a3ff5') ('agent_start_time' '1257501232.') ('boot_time' '1257501199.'))" supported_bootloaders="('pygrub' 'eliloader')" software_version="(('product_version' '6.0.0') ('product_brand' 'XenServer') ('build_number' '14395c') ('hg_id' '9e784cde94d3') ('hostname' 'taris-2') ('date' '2009-11-03') ('dbv' '2009.0201') ('xapi' '1.3') ('xen' '3.4.1') ('linux' '2.6.27.29-0.1.1.xs5.5.0.670.1029xen') ('xencenter_min' '1.7') ('xencenter_max' '1.7') ('package-linux' 'installed') ('xs:main' 'Base Pack, version 5.5.0, build 14395c'))" uuid="e2abcc86-ea46-4154-bba5-a619a8dcf34b" allowed_operations="('vm_migrate' 'evacuate' 'provision' 'vm_resume' 'vm_start')" cpu_configuration="()" logging="()" boot_free_mem="3105599488" sched_policy="credit" crash_dump_sr="OpaqueRef:9df0a7b4-4ec9-7612-62d8-d454a8d4d4b9" ha_network_peers="()" tags="()" license_server="(('port' '27000') ('address' '10.80.239.186'))" ha_statefiles="()" external_auth_service_name="" metrics="OpaqueRef:065b76ae-8306-9cf2-6826-25af3a1e62a0" API_version__major="2" capabilities="('xen-3.0-x86_64' 'xen-3.0-x86_32p' 'hvm-3.0-x86_32' 'hvm-3.0-x86_32p' 'hvm-3.0-x86_64' '')" address="10.80.226.57" power_on_config="()" external_auth_configuration="()" current_operations="()" API_version__minor="0" API_version__vendor_implementation="()" name__label="krakout" name__description="Default install of XenServer" power_on_mode="wake-on-lan" license_params="(('sku_type' 'XE Enterprise') ('version' '5.5.0') ('serialnumber' '') ('sockets' '1') ('productcode' '') ('expiry' '20300101T00:00:00Z') ('grace' 'no') ('name' '') ('company' '') ('address1' '') ('address2' '') ('city' '') ('state' '') ('postalcode' '') ('country' '') ('sku_marketing_name' 'Citrix Essentials for XenServer, Enterprise Edition') ('restrict_connection' 'false') ('restrict_pooling' 'false') ('restrict_qos' 'false') ('restrict_pool_attached_storage' 'false') ('restrict_netapp' 'false') ('restrict_equalogic' 'false') ('restrict_vlan' 'false') ('enable_xha' 'true') ('restrict_marathon' 'false') ('platform_filter' 'false') ('restrict_email_alerting' 'false') ('restrict_historical_performance' 'false') ('restrict_wlb' 'false') ('restrict_rbac' 'false') ('regular_nag_dialog' 'false'))" hostname="krakout" suspend_image_sr="OpaqueRef:9df0a7b4-4ec9-7612-62d8-d454a8d4d4b9" memory__overhead="114675712" enabled="true" external_auth_type="" _ref="OpaqueRef:179a6549-c043-772a-404e-5f6c874369f2"/>
|
||||
</table>
|
||||
<table name="subject"/>
|
||||
<table name="auth"/>
|
||||
|
@ -64,7 +64,7 @@
|
||||
<row ref="OpaqueRef:67c7a4a8-a841-ad31-fe9d-56dfcfe03ba6" qos__supported_algorithms="()" other_config="(('owner' ''))" uuid="8955cbf5-1cc0-8567-7e2a-4f4213372bb7" allowed_operations="('pause' 'unpause' 'attach')" qos__algorithm_params="()" type="Disk" VM="OpaqueRef:762d2c59-3c84-cd05-a454-4897962fe5b5" VDI="OpaqueRef:b8ea65ad-586b-3d15-f5f2-780acb934545" qos__algorithm_type="" metrics="OpaqueRef:66d470c8-eac9-d95a-460c-e056769c6000" device="xvdb" empty="false" bootable="false" current_operations="()" unpluggable="false" status_detail="" runtime_properties="()" userdevice="1" mode="RW" storage_lock="false" status_code="0" currently_attached="true" _ref="OpaqueRef:67c7a4a8-a841-ad31-fe9d-56dfcfe03ba6" reserved="false"/>
|
||||
</table>
|
||||
<table name="host">
|
||||
<row ref="OpaqueRef:6e16d828-f28b-d36c-c368-2194826409d1" API_version__vendor="XenSource" blobs="()" edition="enterprise" bios_strings="(('bios-vendor' 'Dell Inc.') ('bios-version' 'A06') ('system-manufacturer' 'Dell Inc.') ('system-product-name' 'Precision WorkStation 380') ('system-version' '') ('system-serial-number' '8WCH72J') ('oem-1' 'Xen') ('oem-2' 'MS_VM_CERT/SHA1/bdbeb6e0a816d43fa6d3fe8aaef04c2bad9d3e3d') ('oem-3' 'www.dell.com') ('hp-rombios' ''))" other_config="(('iscsi_iqn' 'iqn.2010-02.com.xensource.uk:18539f30') ('agent_start_time' '1265631903.') ('boot_time' '1265631835.'))" supported_bootloaders="('pygrub' 'eliloader')" software_version="(('product_version' '6.0.0') ('product_brand' 'XenServer') ('build_number' '28413c') ('hg_id' 'd309fdf36ab6') ('hostname' 'taris-2') ('date' '2010-02-07') ('dbv' '2010.0507') ('xapi' '1.3') ('xen' '3.4.2') ('linux' '2.6.27.42-0.1.1.xs5.6.900.741.1067xen') ('xencenter_min' '1.7') ('xencenter_max' '1.7') ('package-linux' 'installed') ('xs:linux' 'Linux Pack, version 5.6.900, build 28413c') ('xs:main' 'Base Pack, version 5.6.900, build 28413c'))" uuid="d8f16192-fd93-4525-971e-f980673788cb" allowed_operations="('vm_migrate' 'evacuate' 'provision' 'vm_resume' 'vm_start')" cpu_configuration="()" logging="()" boot_free_mem="4102082560" sched_policy="credit" crash_dump_sr="OpaqueRef:c8654249-a6e3-8599-a424-94cd918727ac" ha_network_peers="('d8f16192-fd93-4525-971e-f980673788cb')" tags="()" license_server="(('port' '27000') ('address' '10.80.237.18'))" ha_statefiles="('OpaqueRef:70c562db-730f-f6e3-31be-e85a74ac1dda')" external_auth_service_name="" metrics="OpaqueRef:035bd33e-d0e7-17c4-0be3-d372d845ace2" API_version__major="2" capabilities="('xen-3.0-x86_64' 'xen-3.0-x86_32p' 'hvm-3.0-x86_32' 'hvm-3.0-x86_32p' 'hvm-3.0-x86_64' '')" address="10.80.226.1" power_on_config="()" external_auth_configuration="()" current_operations="()" API_version__minor="0" API_version__vendor_implementation="()" name__label="grimsby" name__description="Default install of XenServer" power_on_mode="" license_params="(('sku_type' 'XE Enterprise') ('version' '5.6.900') ('serialnumber' '') ('sockets' '1') ('productcode' '') ('expiry' '20100702T17:22:34Z') ('grace' 'no') ('name' '') ('company' '') ('address1' '') ('address2' '') ('city' '') ('state' '') ('postalcode' '') ('country' '') ('sku_marketing_name' 'Citrix Essentials for XenServer, Enterprise Edition') ('earlyrelease' 'true') ('restrict_connection' 'false') ('restrict_pooling' 'false') ('restrict_qos' 'false') ('restrict_pool_attached_storage' 'false') ('restrict_netapp' 'false') ('restrict_equalogic' 'false') ('restrict_vlan' 'false') ('enable_xha' 'true') ('restrict_marathon' 'false') ('platform_filter' 'false') ('restrict_email_alerting' 'false') ('restrict_historical_performance' 'false') ('restrict_wlb' 'false') ('restrict_rbac' 'false') ('restrict_dmc' 'false') ('restrict_checkpoint' 'false') ('restrict_vswitch_controller' 'false') ('restrict_cpu_masking' 'false') ('regular_nag_dialog' 'false') ('restrict_rpu' 'false')" hostname="grimsby" suspend_image_sr="OpaqueRef:c8654249-a6e3-8599-a424-94cd918727ac" memory__overhead="133287936" enabled="true" external_auth_type="" _ref="OpaqueRef:6e16d828-f28b-d36c-c368-2194826409d1"/>
|
||||
<row ref="OpaqueRef:6e16d828-f28b-d36c-c368-2194826409d1" API_version__vendor="XenSource" blobs="()" edition="enterprise-per-socket" bios_strings="(('bios-vendor' 'Dell Inc.') ('bios-version' 'A06') ('system-manufacturer' 'Dell Inc.') ('system-product-name' 'Precision WorkStation 380') ('system-version' '') ('system-serial-number' '8WCH72J') ('oem-1' 'Xen') ('oem-2' 'MS_VM_CERT/SHA1/bdbeb6e0a816d43fa6d3fe8aaef04c2bad9d3e3d') ('oem-3' 'www.dell.com') ('hp-rombios' ''))" other_config="(('iscsi_iqn' 'iqn.2010-02.com.xensource.uk:18539f30') ('agent_start_time' '1265631903.') ('boot_time' '1265631835.'))" supported_bootloaders="('pygrub' 'eliloader')" software_version="(('product_version' '6.0.0') ('product_brand' 'XenServer') ('build_number' '28413c') ('hg_id' 'd309fdf36ab6') ('hostname' 'taris-2') ('date' '2010-02-07') ('dbv' '2010.0507') ('xapi' '1.3') ('xen' '3.4.2') ('linux' '2.6.27.42-0.1.1.xs5.6.900.741.1067xen') ('xencenter_min' '1.7') ('xencenter_max' '1.7') ('package-linux' 'installed') ('xs:linux' 'Linux Pack, version 5.6.900, build 28413c') ('xs:main' 'Base Pack, version 5.6.900, build 28413c'))" uuid="d8f16192-fd93-4525-971e-f980673788cb" allowed_operations="('vm_migrate' 'evacuate' 'provision' 'vm_resume' 'vm_start')" cpu_configuration="()" logging="()" boot_free_mem="4102082560" sched_policy="credit" crash_dump_sr="OpaqueRef:c8654249-a6e3-8599-a424-94cd918727ac" ha_network_peers="('d8f16192-fd93-4525-971e-f980673788cb')" tags="()" license_server="(('port' '27000') ('address' '10.80.237.18'))" ha_statefiles="('OpaqueRef:70c562db-730f-f6e3-31be-e85a74ac1dda')" external_auth_service_name="" metrics="OpaqueRef:035bd33e-d0e7-17c4-0be3-d372d845ace2" API_version__major="2" capabilities="('xen-3.0-x86_64' 'xen-3.0-x86_32p' 'hvm-3.0-x86_32' 'hvm-3.0-x86_32p' 'hvm-3.0-x86_64' '')" address="10.80.226.1" power_on_config="()" external_auth_configuration="()" current_operations="()" API_version__minor="0" API_version__vendor_implementation="()" name__label="grimsby" name__description="Default install of XenServer" power_on_mode="" license_params="(('sku_type' 'XE Enterprise') ('version' '5.6.900') ('serialnumber' '') ('sockets' '1') ('productcode' '') ('expiry' '20100702T17:22:34Z') ('grace' 'no') ('name' '') ('company' '') ('address1' '') ('address2' '') ('city' '') ('state' '') ('postalcode' '') ('country' '') ('sku_marketing_name' 'Citrix Essentials for XenServer, Enterprise Edition') ('earlyrelease' 'true') ('restrict_connection' 'false') ('restrict_pooling' 'false') ('restrict_qos' 'false') ('restrict_pool_attached_storage' 'false') ('restrict_netapp' 'false') ('restrict_equalogic' 'false') ('restrict_vlan' 'false') ('enable_xha' 'true') ('restrict_marathon' 'false') ('platform_filter' 'false') ('restrict_email_alerting' 'false') ('restrict_historical_performance' 'false') ('restrict_wlb' 'false') ('restrict_rbac' 'false') ('restrict_dmc' 'false') ('restrict_checkpoint' 'false') ('restrict_vswitch_controller' 'false') ('restrict_cpu_masking' 'false') ('regular_nag_dialog' 'false') ('restrict_rpu' 'false')" hostname="grimsby" suspend_image_sr="OpaqueRef:c8654249-a6e3-8599-a424-94cd918727ac" memory__overhead="133287936" enabled="true" external_auth_type="" _ref="OpaqueRef:6e16d828-f28b-d36c-c368-2194826409d1"/>
|
||||
</table>
|
||||
<table name="subject"/>
|
||||
<table name="auth"/>
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -69,7 +69,7 @@
|
||||
<row ref="OpaqueRef:86f94796-d4be-4cfb-c0db-129f3a9069ec" qos__supported_algorithms="()" other_config="(('owner' ''))" uuid="3a200e26-bb43-6385-ccaf-fda49ada4ac2" allowed_operations="()" qos__algorithm_params="()" type="Disk" VM="OpaqueRef:efaea92a-a141-c59e-dafb-0e448d7f1f7e" VDI="OpaqueRef:dffadfa3-edf9-9257-bcf6-0e8d6a3d1d9d" qos__algorithm_type="" metrics="OpaqueRef:fc8eeebf-57a6-0ce1-0295-0e9acf8e6313" device="xvda" empty="false" bootable="true" current_operations="()" unpluggable="false" status_detail="" runtime_properties="()" userdevice="0" mode="RW" storage_lock="false" status_code="0" currently_attached="true" _ref="OpaqueRef:86f94796-d4be-4cfb-c0db-129f3a9069ec" reserved="false"/>
|
||||
</table>
|
||||
<table name="host">
|
||||
<row ref="OpaqueRef:f4ad0ca3-a03e-8814-2b53-62fa86ca0c3c" API_version__vendor="XenSource" blobs="()" edition="enterprise" bios_strings="(('bios-vendor' 'Intel Corp.') ('bios-version' 'NT94510J.86A.4034.2006.1109.0935') ('system-manufacturer' '') ('system-product-name' '') ('system-version' '') ('system-serial-number' '') ('oem-1' 'Xen') ('oem-2' 'MS_VM_CERT/SHA1/bdbeb6e0a816d43fa6d3fe8aaef04c2bad9d3e3d') ('hp-rombios' ''))" other_config="(('iscsi_iqn' 'iqn.2010-01.com.xensource.uk:01b4445b') ('agent_start_time' '1264784748.') ('boot_time' '1264784696.'))" supported_bootloaders="('pygrub' 'eliloader')" software_version="(('product_version' '5.5.900') ('product_brand' 'XenServer') ('build_number' '28071c') ('hg_id' 'b73ac3d3b185') ('hostname' 'taris-2') ('date' '2010-01-28') ('dbv' '2010.0507') ('xapi' '1.3') ('xen' '3.4.2') ('linux' '2.6.27.42-0.1.1.xs5.5.900.739.1067xen') ('xencenter_min' '1.7') ('xencenter_max' '1.7') ('package-linux' 'installed') ('xs:linux' 'Linux Pack, version 5.5.900, build 28071c') ('xs:main' 'Base Pack, version 5.5.900, build 28071c'))" uuid="a8252175-849b-4519-aa27-c840e77db3e0" allowed_operations="('vm_migrate' 'evacuate' 'provision' 'vm_resume' 'vm_start')" cpu_configuration="()" logging="()" boot_free_mem="3105529856" sched_policy="credit" crash_dump_sr="OpaqueRef:88cbbd27-07ea-86f7-7478-9820b4512b31" ha_network_peers="()" tags="('zzz' 'zz' 'q' 'p' 'o' 'n' 'ghi' 'abc')" license_server="(('port' '27000') ('address' '10.80.237.18'))" ha_statefiles="()" external_auth_service_name="xencenter.net" metrics="OpaqueRef:7ec997c0-06c0-361e-f28c-541c7b1311f2" API_version__major="2" capabilities="('xen-3.0-x86_64' 'xen-3.0-x86_32p' 'hvm-3.0-x86_32' 'hvm-3.0-x86_32p' 'hvm-3.0-x86_64' '')" address="10.80.226.57" power_on_config="()" external_auth_configuration="(('domain' 'xencenter.net') ('user' 'Administrator'))" current_operations="()" API_version__minor="0" API_version__vendor_implementation="()" name__label="krakout" name__description="Default install of XenServer" power_on_mode="" license_params="(('sku_type' 'XE Enterprise') ('version' '5.5.900') ('serialnumber' '') ('sockets' '1') ('productcode' '') ('expiry' '20100301T15:59:56Z') ('grace' 'regular grace') ('name' '') ('company' '') ('address1' '') ('address2' '') ('city' '') ('state' '') ('postalcode' '') ('country' '') ('sku_marketing_name' 'Citrix Essentials for XenServer, Enterprise Edition') ('earlyrelease' 'true') ('restrict_connection' 'false') ('restrict_pooling' 'false') ('restrict_qos' 'false') ('restrict_pool_attached_storage' 'false') ('restrict_netapp' 'false') ('restrict_equalogic' 'false') ('restrict_vlan' 'false') ('enable_xha' 'true') ('restrict_marathon' 'false') ('platform_filter' 'false') ('restrict_email_alerting' 'false') ('restrict_historical_performance' 'false') ('restrict_wlb' 'false') ('restrict_rbac' 'false') ('restrict_hotfix_apply' 'false') ('regular_nag_dialog' 'false'))" hostname="krakout" suspend_image_sr="OpaqueRef:88cbbd27-07ea-86f7-7478-9820b4512b31" memory__overhead="114745344" enabled="true" external_auth_type="AD" _ref="OpaqueRef:f4ad0ca3-a03e-8814-2b53-62fa86ca0c3c"/>
|
||||
<row ref="OpaqueRef:f4ad0ca3-a03e-8814-2b53-62fa86ca0c3c" API_version__vendor="XenSource" blobs="()" edition="enterprise-per-socket" bios_strings="(('bios-vendor' 'Intel Corp.') ('bios-version' 'NT94510J.86A.4034.2006.1109.0935') ('system-manufacturer' '') ('system-product-name' '') ('system-version' '') ('system-serial-number' '') ('oem-1' 'Xen') ('oem-2' 'MS_VM_CERT/SHA1/bdbeb6e0a816d43fa6d3fe8aaef04c2bad9d3e3d') ('hp-rombios' ''))" other_config="(('iscsi_iqn' 'iqn.2010-01.com.xensource.uk:01b4445b') ('agent_start_time' '1264784748.') ('boot_time' '1264784696.'))" supported_bootloaders="('pygrub' 'eliloader')" software_version="(('product_version' '5.5.900') ('product_brand' 'XenServer') ('build_number' '28071c') ('hg_id' 'b73ac3d3b185') ('hostname' 'taris-2') ('date' '2010-01-28') ('dbv' '2010.0507') ('xapi' '1.3') ('xen' '3.4.2') ('linux' '2.6.27.42-0.1.1.xs5.5.900.739.1067xen') ('xencenter_min' '1.7') ('xencenter_max' '1.7') ('package-linux' 'installed') ('xs:linux' 'Linux Pack, version 5.5.900, build 28071c') ('xs:main' 'Base Pack, version 5.5.900, build 28071c'))" uuid="a8252175-849b-4519-aa27-c840e77db3e0" allowed_operations="('vm_migrate' 'evacuate' 'provision' 'vm_resume' 'vm_start')" cpu_configuration="()" logging="()" boot_free_mem="3105529856" sched_policy="credit" crash_dump_sr="OpaqueRef:88cbbd27-07ea-86f7-7478-9820b4512b31" ha_network_peers="()" tags="('zzz' 'zz' 'q' 'p' 'o' 'n' 'ghi' 'abc')" license_server="(('port' '27000') ('address' '10.80.237.18'))" ha_statefiles="()" external_auth_service_name="xencenter.net" metrics="OpaqueRef:7ec997c0-06c0-361e-f28c-541c7b1311f2" API_version__major="2" capabilities="('xen-3.0-x86_64' 'xen-3.0-x86_32p' 'hvm-3.0-x86_32' 'hvm-3.0-x86_32p' 'hvm-3.0-x86_64' '')" address="10.80.226.57" power_on_config="()" external_auth_configuration="(('domain' 'xencenter.net') ('user' 'Administrator'))" current_operations="()" API_version__minor="0" API_version__vendor_implementation="()" name__label="krakout" name__description="Default install of XenServer" power_on_mode="" license_params="(('sku_type' 'XE Enterprise') ('version' '5.5.900') ('serialnumber' '') ('sockets' '1') ('productcode' '') ('expiry' '20100301T15:59:56Z') ('grace' 'regular grace') ('name' '') ('company' '') ('address1' '') ('address2' '') ('city' '') ('state' '') ('postalcode' '') ('country' '') ('sku_marketing_name' 'Citrix Essentials for XenServer, Enterprise Edition') ('earlyrelease' 'true') ('restrict_connection' 'false') ('restrict_pooling' 'false') ('restrict_qos' 'false') ('restrict_pool_attached_storage' 'false') ('restrict_netapp' 'false') ('restrict_equalogic' 'false') ('restrict_vlan' 'false') ('enable_xha' 'true') ('restrict_marathon' 'false') ('platform_filter' 'false') ('restrict_email_alerting' 'false') ('restrict_historical_performance' 'false') ('restrict_wlb' 'false') ('restrict_rbac' 'false') ('restrict_hotfix_apply' 'false') ('regular_nag_dialog' 'false'))" hostname="krakout" suspend_image_sr="OpaqueRef:88cbbd27-07ea-86f7-7478-9820b4512b31" memory__overhead="114745344" enabled="true" external_auth_type="AD" _ref="OpaqueRef:f4ad0ca3-a03e-8814-2b53-62fa86ca0c3c"/>
|
||||
</table>
|
||||
<table name="subject"/>
|
||||
<table name="auth"/>
|
||||
|
@ -213,7 +213,7 @@ namespace XenAdminTests.TreeTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Ignore]
|
||||
[Ignore("")]
|
||||
public void TestPersistenceWhenAddingThenRemovingTextSearch()
|
||||
{
|
||||
PutInNavigationMode(NavigationPane.NavigationMode.Infrastructure);
|
||||
|
@ -63,13 +63,13 @@ namespace XenAdminTests
|
||||
: base(databases)
|
||||
{ }
|
||||
|
||||
[TestFixtureSetUp]
|
||||
[OneTimeSetUp]
|
||||
public void SetUp()
|
||||
{
|
||||
Setup();
|
||||
}
|
||||
|
||||
[TestFixtureTearDown]
|
||||
[OneTimeTearDown]
|
||||
public void TearDown()
|
||||
{
|
||||
Dispose();
|
||||
|
@ -158,10 +158,10 @@ namespace XenAdminTests.UnitTests.AlertTests
|
||||
VerifyHostsExpectations(Times.Never);
|
||||
}
|
||||
|
||||
[Test, ExpectedException(typeof(NullReferenceException))]
|
||||
[Test]
|
||||
public void TestAlertWithNullPatch()
|
||||
{
|
||||
XenServerPatchAlert alert = new XenServerPatchAlert(null);
|
||||
Assert.That(()=> new XenServerPatchAlert(null), Throws.Exception.With.TypeOf(typeof(NullReferenceException)));
|
||||
}
|
||||
|
||||
private void VerifyConnExpectations(Func<Times> times)
|
||||
|
@ -158,10 +158,10 @@ namespace XenAdminTests.UnitTests.AlertTests
|
||||
VerifyHostsExpectations(Times.Never);
|
||||
}
|
||||
|
||||
[Test, ExpectedException(typeof(NullReferenceException))]
|
||||
[Test]
|
||||
public void TestAlertWithNullVersion()
|
||||
{
|
||||
var alert = new XenServerVersionAlert(null);
|
||||
Assert.That(()=> new XenServerVersionAlert(null), Throws.Exception.With.TypeOf(typeof(NullReferenceException)));
|
||||
}
|
||||
|
||||
private void VerifyConnExpectations(Func<Times> times)
|
||||
|
@ -45,7 +45,7 @@ namespace XenAdminTests.UnitTests
|
||||
const string cpu3 = "040ce33d-bfebfbff-00000001-20100801";
|
||||
const string cpu4 = "000ce3bd-bfebfbff-00000001";
|
||||
|
||||
[TestFixtureSetUp]
|
||||
[OneTimeSetUp]
|
||||
public void SetupResults()
|
||||
{
|
||||
// A cpu does not have less features than itself
|
||||
|
@ -45,7 +45,7 @@ namespace XenAdminTests.UnitTests
|
||||
const string cpu3 = "040ce33d-bfebfbff-00000001-20100801";
|
||||
const string mask = "ffffff7f-ffffffff-ffffffff-ffffffff";
|
||||
|
||||
[TestFixtureSetUp]
|
||||
[OneTimeSetUp]
|
||||
public void SetupResults()
|
||||
{
|
||||
// Can always mask a CPU to itself
|
||||
|
@ -37,7 +37,7 @@ using System;
|
||||
|
||||
namespace XenAdminTests.UnitTests.MiscTests
|
||||
{
|
||||
[TestFixture, Category(TestCategories.Unit)]
|
||||
[TestFixture, Category(TestCategories.Unit), SetCulture("en-EN")]
|
||||
internal class UtilTests
|
||||
{
|
||||
#region Test Data
|
||||
|
@ -45,10 +45,10 @@ namespace XenAdminTests.UnitTests.WlbTests
|
||||
private WlbPoolConfiguration wlbPool;
|
||||
private const int NUMBER_OF_PROPERTIES = 33;
|
||||
|
||||
[Test, ExpectedException(typeof(Exception))]
|
||||
[Test]
|
||||
public void NullCtorThrows()
|
||||
{
|
||||
wlbPool = new WlbPoolConfiguration(null);
|
||||
Assert.That(()=> new WlbPoolConfiguration(null), Throws.Exception);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -76,7 +76,7 @@ namespace XenAdminTests.UnitTests.WlbTests
|
||||
}
|
||||
}
|
||||
|
||||
Assert.IsNullOrEmpty(wlbPool.ReportingSMTPServer);
|
||||
Assert.That(wlbPool.ReportingSMTPServer, Is.Null.Or.Empty);
|
||||
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ using XenAdminTests.UnitTests.UnitTestHelper;
|
||||
|
||||
namespace XenAdminTests.UnitTests.WlbTests
|
||||
{
|
||||
[TestFixture, Category(TestCategories.Unit)]
|
||||
[TestFixture, Category(TestCategories.Unit), SetCulture("en-EN")]
|
||||
public class WlbScheduledTaskTests
|
||||
{
|
||||
#region Private Class Data
|
||||
@ -111,10 +111,10 @@ namespace XenAdminTests.UnitTests.WlbTests
|
||||
|
||||
}
|
||||
|
||||
[Test, ExpectedException(typeof(KeyNotFoundException))]
|
||||
[Test]
|
||||
public void ExceptionRaisedIfOptModeNotSetButRequested()
|
||||
{
|
||||
WlbScheduledTask.GetTaskOptMode(task);
|
||||
Assert.That(() => WlbScheduledTask.GetTaskOptMode(task), Throws.Exception.With.TypeOf(typeof(KeyNotFoundException)));
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -50,18 +50,18 @@ namespace XenAdminTests.UnitTests.WlbTests
|
||||
Assert.IsNull(tasks.GetNextExecutingTask(), "GetNextExecutingTask");
|
||||
}
|
||||
|
||||
[Test, ExpectedException(typeof(IndexOutOfRangeException))]
|
||||
[Test]
|
||||
public void EmptyConstructorCausesCurrentScheduledPerformanceModeToThrow()
|
||||
{
|
||||
WlbScheduledTasks tasks = new WlbScheduledTasks();
|
||||
tasks.GetCurrentScheduledPerformanceMode();
|
||||
Assert.That(()=> tasks.GetCurrentScheduledPerformanceMode(), Throws.Exception.With.TypeOf(typeof(IndexOutOfRangeException)));
|
||||
}
|
||||
|
||||
[Test, ExpectedException(typeof(IndexOutOfRangeException))]
|
||||
[Test]
|
||||
public void EmptyConstructorCausesLastTaskToThrow()
|
||||
{
|
||||
WlbScheduledTasks tasks = new WlbScheduledTasks();
|
||||
tasks.GetLastExecutingTask();
|
||||
Assert.That(() => tasks.GetLastExecutingTask(), Throws.Exception.With.TypeOf(typeof(IndexOutOfRangeException)));
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -49,7 +49,7 @@ namespace XenAdminTests.UnitTests
|
||||
/// <summary>
|
||||
/// Gets all Types that derive from IXenObject except Folder and DockerContainer
|
||||
/// </summary>
|
||||
public IEnumerable<Type> AllXenObjectTypesExceptFolder
|
||||
public static IEnumerable<Type> AllXenObjectTypesExceptFolder
|
||||
{
|
||||
get
|
||||
{
|
||||
|
@ -71,7 +71,7 @@ namespace XenAdminTests.WizardTests
|
||||
|
||||
}
|
||||
|
||||
[TestFixtureSetUp]
|
||||
[OneTimeSetUp]
|
||||
public void TestSetup()
|
||||
{
|
||||
//one host pool
|
||||
@ -196,7 +196,7 @@ namespace XenAdminTests.WizardTests
|
||||
{
|
||||
var filter = new CrossPoolMigrateCanMigrateFilter(data.Item1, data.Item2, WizardMode.Migrate);
|
||||
Assert.False(filter.FailureFound, "Did not expect to find failure");
|
||||
Assert.IsNullOrEmpty(filter.Reason, "Did not expect failure reason");
|
||||
Assert.That(filter.Reason, Is.Null.Or.Empty); //Did not expect failure reason
|
||||
}
|
||||
}
|
||||
|
||||
@ -225,7 +225,7 @@ namespace XenAdminTests.WizardTests
|
||||
{
|
||||
var filter = new CrossPoolMigrateCanMigrateFilter(data.Item1, data.Item2, WizardMode.Migrate);
|
||||
Assert.True(filter.FailureFound, "Expected to find failure");
|
||||
Assert.IsNullOrEmpty(filter.Reason, "Did not expect failure reason");
|
||||
Assert.That(filter.Reason, Is.Null.Or.Empty); //Did not expect failure reason
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -61,10 +61,10 @@ namespace XenAdminTests.WizardTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
[TestCase(true, true, Description = "Wlb enabled both", Result = true)]
|
||||
[TestCase(false, false, Description = "Wlb disabled both", Result = false)]
|
||||
[TestCase(true, false, Description = "Wlb enabled VM", Result = true)]
|
||||
[TestCase(false, true, Description = "Wlb enabled target", Result = true)]
|
||||
[TestCase(true, true, Description = "Wlb enabled both", ExpectedResult = true)]
|
||||
[TestCase(false, false, Description = "Wlb disabled both", ExpectedResult = false)]
|
||||
[TestCase(true, false, Description = "Wlb enabled VM", ExpectedResult = true)]
|
||||
[TestCase(false, true, Description = "Wlb enabled target", ExpectedResult = true)]
|
||||
public bool WlbEnabledFilterResults(bool WlbEnabledVM, bool WlbEnabledTarget)
|
||||
{
|
||||
Mock<Pool> pool = ObjectManager.NewXenObject<Pool>(id);
|
||||
@ -78,10 +78,10 @@ namespace XenAdminTests.WizardTests
|
||||
}
|
||||
|
||||
[Test]
|
||||
[TestCase(true, true, Description = "Wlb enabled both", Result = hostFailureReason)]
|
||||
[TestCase(false, false, Description = "Wlb disabled both", Result = vmFailureReason)]
|
||||
[TestCase(true, false, Description = "Wlb enabled VM", Result = vmFailureReason)]
|
||||
[TestCase(false, true, Description = "Wlb enabled target", Result = hostFailureReason)]
|
||||
[TestCase(true, true, Description = "Wlb enabled both", ExpectedResult = hostFailureReason)]
|
||||
[TestCase(false, false, Description = "Wlb disabled both", ExpectedResult = vmFailureReason)]
|
||||
[TestCase(true, false, Description = "Wlb enabled VM", ExpectedResult = vmFailureReason)]
|
||||
[TestCase(false, true, Description = "Wlb enabled target", ExpectedResult = hostFailureReason)]
|
||||
public string WlbEnabledFailureReasons(bool WlbEnabledVM, bool WlbEnabledTarget)
|
||||
{
|
||||
Mock<Pool> pool = ObjectManager.NewXenObject<Pool>(id);
|
||||
|
@ -36,7 +36,7 @@ using XenAdmin.Wizards.DRWizards;
|
||||
|
||||
namespace XenAdminTests.WizardTests
|
||||
{
|
||||
[TestFixture, Category(TestCategories.UICategoryB)]
|
||||
[TestFixture, Category(TestCategories.UICategoryB), SetCulture("en-EN")]
|
||||
public class DRFailoverWizardSummaryReportTests
|
||||
{
|
||||
|
||||
|
@ -102,7 +102,7 @@ namespace XenAdminTests.WizardTests.ExportWizard
|
||||
private readonly string errorMessage = Messages.EXPORT_APPLIANCE_PAGE_ERROR_APP_EXISTS;
|
||||
private readonly string noErrorMessage = string.Empty;
|
||||
|
||||
private IEnumerable<TestCase> TestCases
|
||||
private static IEnumerable<TestCase> TestCases
|
||||
{
|
||||
get
|
||||
{
|
||||
@ -192,12 +192,12 @@ namespace XenAdminTests.WizardTests.ExportWizard
|
||||
Assert.That(checker.ErrorReason, Is.EqualTo(errorMessage), "error message");
|
||||
}
|
||||
|
||||
[Test, ExpectedException(typeof(ArgumentNullException))]
|
||||
[Test]
|
||||
public void NullPaths()
|
||||
{
|
||||
ApplianceCheck checker = new ApplianceExistsCheck(null, null,
|
||||
ApplianceCheck.FileExtension.ovaovf);
|
||||
checker.Validate();
|
||||
Assert.That(()=> checker.Validate(), Throws.ArgumentNullException);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -97,28 +97,28 @@ namespace XenAdminTests.WizardTests
|
||||
}
|
||||
}
|
||||
|
||||
[Test, ExpectedException(typeof(ArgumentException))]
|
||||
[Test]
|
||||
public void VerifyExceptionThrownForNullConstructedCommand()
|
||||
{
|
||||
var filter = new ResidentHostIsSameAsSelectionFilter(null, new List<VM>());
|
||||
Assert.That(() => new ResidentHostIsSameAsSelectionFilter(null, new List<VM>()), Throws.ArgumentException);
|
||||
}
|
||||
|
||||
[Test, ExpectedException(typeof(ArgumentException))]
|
||||
[Test]
|
||||
public void VerifyExceptionThrownForDoubleNullConstructedCommand()
|
||||
{
|
||||
var filter = new ResidentHostIsSameAsSelectionFilter(null, null);
|
||||
Assert.That(() => new ResidentHostIsSameAsSelectionFilter(null, null), Throws.ArgumentException);
|
||||
}
|
||||
|
||||
[Test, ExpectedException(typeof(ArgumentException))]
|
||||
[Test]
|
||||
public void VerifyExceptionThrownForNullIXenObjectAsTarget()
|
||||
{
|
||||
var filter = new ResidentHostIsSameAsSelectionFilter(null, CreateSingleVmListFromOneHostPool());
|
||||
Assert.That(() => new ResidentHostIsSameAsSelectionFilter(null, CreateSingleVmListFromOneHostPool()), Throws.ArgumentException);
|
||||
}
|
||||
|
||||
[Test, ExpectedException(typeof(ArgumentException))]
|
||||
[Test]
|
||||
public void VerifyExceptionThrownForUnsupportedTargetObject()
|
||||
{
|
||||
var filter = new ResidentHostIsSameAsSelectionFilter(CreateSingleVmListFromOneHostPool().First(), new List<VM>());
|
||||
Assert.That(()=> new ResidentHostIsSameAsSelectionFilter(CreateSingleVmListFromOneHostPool().First(), new List<VM>()), Throws.ArgumentException);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -58,16 +58,15 @@ namespace XenAdminTests.WizardTests
|
||||
|
||||
|
||||
[Test(Description = "Test that the Enter key takes us forward through the wizard")]
|
||||
[Timeout(100 * 1000)]
|
||||
public void RunWizardKeyboardTests()
|
||||
{
|
||||
SetUp();
|
||||
|
||||
RunWizardTests(() =>
|
||||
{
|
||||
{
|
||||
//ensure the focus is not on Previous or Cancel, otherwise pressing Enter will result in clicking those
|
||||
for (int j = 0; j < wizard.Controls.Count; j++)
|
||||
{
|
||||
{
|
||||
if (!btnCancel.Focused && !btnPrevious.Focused)
|
||||
break;
|
||||
wizard.Controls[j].Focus();
|
||||
@ -76,16 +75,16 @@ namespace XenAdminTests.WizardTests
|
||||
},
|
||||
btnPrevious.PerformClick,
|
||||
() =>
|
||||
{
|
||||
{
|
||||
var key = doFinish ? Keys.Enter : Keys.Escape;
|
||||
Win32.PostMessage(wizard.Handle, Win32.WM_KEYDOWN, new IntPtr((int)key), IntPtr.Zero);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
[Test(Description = "Test that Next/Previous buttons take us forwards/backwards through the wizard")]
|
||||
[Timeout(100 * 1000)]
|
||||
public void RunWizardButtonTests()
|
||||
{
|
||||
{
|
||||
SetUp();
|
||||
|
||||
RunWizardTests(
|
||||
@ -102,7 +101,13 @@ namespace XenAdminTests.WizardTests
|
||||
});
|
||||
}
|
||||
|
||||
<<<<<<< .mine
|
||||
[Test, MaxTime(100 * 1000)]
|
||||
public void RunWizardTests()
|
||||
=======
|
||||
private void SetUp()
|
||||
|
||||
>>>>>>> .theirs
|
||||
{
|
||||
RunBefore();
|
||||
|
||||
@ -136,7 +141,7 @@ namespace XenAdminTests.WizardTests
|
||||
|
||||
// wait for any progress dialog to close
|
||||
MWWaitFor(() => wizard.Visible && wizard.CanFocus);
|
||||
|
||||
|
||||
Assert.AreEqual(pageNames[i + 1], CurrentPageName(wizard),
|
||||
$"Next button didn't get from page {pageNames[i]} to page {pageNames[i + 1]}");
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="15.0">
|
||||
<Import Project="..\packages\NUnit.3.10.1\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.10.1\build\NUnit.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
@ -12,6 +13,8 @@
|
||||
<AssemblyName>XenAdminTests</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
|
||||
<TargetFrameworkProfile />
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@ -34,6 +37,9 @@
|
||||
<Prefer32Bit>false</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Castle.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=407dd0808d44fbdc, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Castle.Core.4.2.1\lib\net45\Castle.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="CookComputing.XmlRpcV2, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\CookComputing.XmlRpcV2.dll</HintPath>
|
||||
@ -42,9 +48,8 @@
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\log4net.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Moq, Version=4.0.10827.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\packages\Moq.dll</HintPath>
|
||||
<Reference Include="Moq, Version=4.8.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Moq.4.8.2\lib\net45\Moq.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
@ -55,11 +60,18 @@
|
||||
<HintPath>..\packages\nunit.framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core">
|
||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.3.0\lib\portable-net45+win8+wp8+wpa81\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ValueTuple, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ValueTuple.4.4.0\lib\netstandard1.0\System.ValueTuple.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
@ -143,6 +155,7 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="TestResources\enterprise.xslic">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
@ -484,6 +497,12 @@
|
||||
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}".</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\NUnit.3.10.1\build\NUnit.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\NUnit.3.10.1\build\NUnit.props'))" />
|
||||
</Target>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
|
@ -223,7 +223,7 @@ namespace XenAdminTests.XenModelTests
|
||||
|
||||
private string TestResource(string name)
|
||||
{
|
||||
return Path.Combine(Directory.GetCurrentDirectory(), "TestResources", name);
|
||||
return Path.Combine(Directory.GetCurrentDirectory(), @"XenAdminTests\TestResources", name);
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
@ -58,7 +58,7 @@ namespace XenAdminTests.XenOvf
|
||||
}
|
||||
}
|
||||
|
||||
private IEnumerable<TestCase> TestCases
|
||||
private static IEnumerable<TestCase> TestCases
|
||||
{
|
||||
get
|
||||
{
|
||||
|
8
XenAdminTests/packages.config
Normal file
8
XenAdminTests/packages.config
Normal file
@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Castle.Core" version="4.2.1" targetFramework="net46" />
|
||||
<package id="Moq" version="4.8.2" targetFramework="net46" />
|
||||
<package id="NUnit" version="3.10.1" targetFramework="net46" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.3.0" targetFramework="net46" />
|
||||
<package id="System.ValueTuple" version="4.4.0" targetFramework="net46" />
|
||||
</packages>
|
@ -59,6 +59,8 @@ namespace XenAdmin.Core
|
||||
|
||||
public const string GuiTempObjectPrefix = "__gui__";
|
||||
|
||||
public const string PRODUCT_BRAND_XCP_NG = "XCP-ng";
|
||||
|
||||
public static NumberFormatInfo _nfi = new CultureInfo("en-US", false).NumberFormat;
|
||||
|
||||
public static readonly Regex SessionRefRegex = new Regex(@"OpaqueRef:[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}");
|
||||
@ -1812,6 +1814,8 @@ namespace XenAdmin.Core
|
||||
var master = GetMaster(connection);
|
||||
if (master == null)
|
||||
return false;
|
||||
if (master.ProductBrand() == PRODUCT_BRAND_XCP_NG)
|
||||
return true;
|
||||
if (ElyOrGreater(connection))
|
||||
return master.AppliedUpdates().Any(update => update.Name().ToLower().StartsWith("xscontainer"));
|
||||
return master.SuppPacks().Any(suppPack => suppPack.Name.ToLower().StartsWith("xscontainer"));
|
||||
|
@ -289,10 +289,10 @@ namespace XenAPI
|
||||
return edition == "free" || edition == "express";
|
||||
}
|
||||
|
||||
public virtual bool IsFreeLicenseOrExpired()
|
||||
public virtual bool IsExpired()
|
||||
{
|
||||
if (Connection != null && Connection.CacheIsPopulated)
|
||||
return IsFreeLicense() || LicenseExpiryUTC() < DateTime.UtcNow - Connection.ServerTimeOffset;
|
||||
return LicenseExpiryUTC() < DateTime.UtcNow - Connection.ServerTimeOffset;
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -437,7 +437,7 @@ namespace XenAPI
|
||||
{
|
||||
return h.license_params.ContainsKey("restrict_rpu")
|
||||
? BoolKey(h.license_params, "restrict_rpu")
|
||||
: h.IsFreeLicenseOrExpired(); // restrict on Free edition or if the license has expired
|
||||
: h.IsExpired(); // restrict if the license has expired
|
||||
}
|
||||
|
||||
public static bool RestrictCorosync(Host h)
|
||||
|
@ -95,10 +95,10 @@ namespace XenAPI
|
||||
return false;
|
||||
}
|
||||
|
||||
public bool IsFreeLicenseOrExpired()
|
||||
public bool IsFreeLicenseOrExpired
|
||||
{
|
||||
return Connection.Cache.Hosts.Any(h => h.IsFreeLicenseOrExpired());
|
||||
}
|
||||
return Connection.Cache.Hosts.Any(h => h.IsExpired());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determine whether the given pool is a visible pool, i.e. not a pool-of-one.
|
||||
|
@ -85,7 +85,7 @@ BRANDING_XC_PRODUCT_6_0_VERSION=6.0
|
||||
BRANDING_XC_PRODUCT_6_2_VERSION=6.2
|
||||
BRANDING_XC_PRODUCT_6_5_VERSION=6.5
|
||||
BRANDING_XC_PRODUCT_7_0_VERSION=7.0
|
||||
BRANDING_XENSERVER_UPDATE_URL=https://xcp-ng.org
|
||||
BRANDING_XENSERVER_UPDATE_URL="https://raw.githubusercontent.com/xcp-ng/xenadmin/master/updates.xml"
|
||||
BRANDING_HIDDEN_FEATURES=""
|
||||
BRANDING_ADDITIONAL_FEATURES=""
|
||||
|
||||
@ -96,6 +96,11 @@ BRANDING_ADDITIONAL_FEATURES=""
|
||||
#
|
||||
#######################################################################
|
||||
|
||||
if [ -z "$BUILD_NUMBER" ]; then
|
||||
echo "Need to set BUILD_NUMBER"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
version_cpp()
|
||||
{
|
||||
@ -109,6 +114,7 @@ version_cpp()
|
||||
version_csharp()
|
||||
{
|
||||
sed -b -i -e "s/0\.0\.0\.0/${BRANDING_XC_PRODUCT_VERSION}.${BUILD_NUMBER}/g" \
|
||||
-e "s/0000/${BRANDING_XC_PRODUCT_VERSION}.${BUILD_NUMBER}/g" \
|
||||
$1
|
||||
}
|
||||
|
||||
|
47
branding-xcp-ng/build.sh
Normal file
47
branding-xcp-ng/build.sh
Normal file
@ -0,0 +1,47 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright (c) Citrix Systems, Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms,
|
||||
# with or without modification, are permitted provided
|
||||
# that the following conditions are met:
|
||||
#
|
||||
# * Redistributions of source code must retain the above
|
||||
# copyright notice, this list of conditions and the
|
||||
# following disclaimer.
|
||||
# * Redistributions in binary form must reproduce the above
|
||||
# copyright notice, this list of conditions and the
|
||||
# following disclaimer in the documentation and/or other
|
||||
# materials provided with the distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
|
||||
# CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
|
||||
# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
|
||||
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
# SUCH DAMAGE.
|
||||
|
||||
set -ex
|
||||
|
||||
SET_ENV_FILE="/cygdrive/c/env.sh"
|
||||
if [ -f ${SET_ENV_FILE} ]; then
|
||||
. ${SET_ENV_FILE}
|
||||
fi
|
||||
|
||||
#build
|
||||
MSBUILD="MSBuild.exe /nologo /m /verbosity:minimal /p:Configuration=Release /p:TargetFrameworkVersion=v4.6 /p:VisualStudioVersion=13.0"
|
||||
|
||||
$MSBUILD XenAdmin.sln
|
||||
$MSBUILD xe/Xe.csproj
|
||||
$MSBUILD /p:SolutionDir="${REPO}/XenAdmin" splash/splash.vcxproj
|
||||
|
||||
set +u
|
Loading…
Reference in New Issue
Block a user