mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 15:29:26 +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
a3f18f35b7
commit
00eb9eb155
1
.gitignore
vendored
1
.gitignore
vendored
@ -41,3 +41,4 @@ XenOvfApi/External Tools/*
|
|||||||
_ReSharper.*/
|
_ReSharper.*/
|
||||||
*.opensdf
|
*.opensdf
|
||||||
*.sdf
|
*.sdf
|
||||||
|
/.vs
|
||||||
|
@ -54,7 +54,7 @@ namespace XenAdmin.Dialogs
|
|||||||
|
|
||||||
VersionLabel.Text = string.Format(Messages.VERSION_NUMBER, Branding.PRODUCT_VERSION_TEXT,
|
VersionLabel.Text = string.Format(Messages.VERSION_NUMBER, Branding.PRODUCT_VERSION_TEXT,
|
||||||
Branding.XENCENTER_VERSION, buildText, IntPtr.Size * 8);
|
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;
|
label2.Visible = !HiddenFeatures.CopyrightHidden;
|
||||||
|
|
||||||
showAgainCheckBox.Checked = Properties.Settings.Default.ShowAboutDialog;
|
showAgainCheckBox.Checked = Properties.Settings.Default.ShowAboutDialog;
|
||||||
|
@ -256,13 +256,13 @@
|
|||||||
<value>14, 3, 14, 5</value>
|
<value>14, 3, 14, 5</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="label2.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>275, 15</value>
|
<value>161, 15</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="label2.TabIndex" type="System.Int32, mscorlib">
|
<data name="label2.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="label2.Text" xml:space="preserve">
|
<data name="label2.Text" xml:space="preserve">
|
||||||
<value>Copyright © [Citrix] Systems, Inc. All rights reserved.</value>
|
<value>Copyright © XCP-ng Project.</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>label2.Name" xml:space="preserve">
|
<data name=">>label2.Name" xml:space="preserve">
|
||||||
<value>label2</value>
|
<value>label2</value>
|
||||||
@ -292,7 +292,7 @@
|
|||||||
<value>14, 23, 14, 5</value>
|
<value>14, 23, 14, 5</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="licenseDetailsLabel.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="licenseDetailsLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>254, 15</value>
|
<value>175, 15</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="licenseDetailsLabel.TabIndex" type="System.Int32, mscorlib">
|
<data name="licenseDetailsLabel.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>19</value>
|
<value>19</value>
|
||||||
@ -328,7 +328,7 @@
|
|||||||
<value>14, 23, 14, 5</value>
|
<value>14, 23, 14, 5</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="VersionLabel.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="VersionLabel.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>323, 15</value>
|
<value>203, 15</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="VersionLabel.TabIndex" type="System.Int32, mscorlib">
|
<data name="VersionLabel.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>15</value>
|
<value>15</value>
|
||||||
@ -364,7 +364,7 @@
|
|||||||
<value>12, 6, 3, 3</value>
|
<value>12, 6, 3, 3</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="showAgainCheckBox.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="showAgainCheckBox.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>321, 19</value>
|
<value>258, 19</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="showAgainCheckBox.TabIndex" type="System.Int32, mscorlib">
|
<data name="showAgainCheckBox.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>21</value>
|
<value>21</value>
|
||||||
@ -478,6 +478,6 @@
|
|||||||
<value>AboutDialog</value>
|
<value>AboutDialog</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>$this.Type" xml:space="preserve">
|
<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>
|
</data>
|
||||||
</root>
|
</root>
|
@ -45,8 +45,8 @@ namespace XenAdmin.Dialogs
|
|||||||
public LegalNoticesDialog()
|
public LegalNoticesDialog()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
label2.Text = string.Format(Messages.COPYRIGHT, Branding.COMPANY_NAME_LEGAL);
|
//label2.Text = string.Format(Messages.COPYRIGHT, Branding.COMPANY_NAME_LEGAL);
|
||||||
this.label1.Visible = this.label2.Visible = !XenAdmin.Core.HiddenFeatures.CopyrightHidden;
|
//this.label1.Visible = this.label2.Visible = !XenAdmin.Core.HiddenFeatures.CopyrightHidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void button1_Click(object sender, EventArgs e)
|
private void button1_Click(object sender, EventArgs e)
|
||||||
|
@ -415,7 +415,7 @@ namespace XenAdmin
|
|||||||
|
|
||||||
if (host_is_live)
|
if (host_is_live)
|
||||||
{
|
{
|
||||||
if (host.IsFreeLicenseOrExpired())
|
if (host.IsExpired())
|
||||||
{
|
{
|
||||||
return Icons.ServerUnlicensed;
|
return Icons.ServerUnlicensed;
|
||||||
}
|
}
|
||||||
@ -454,7 +454,7 @@ namespace XenAdmin
|
|||||||
{
|
{
|
||||||
if (!pool.Connection.IsConnected)
|
if (!pool.Connection.IsConnected)
|
||||||
return Icons.HostDisconnected;
|
return Icons.HostDisconnected;
|
||||||
if (pool.Connection.Cache.Hosts.Any(h => h.IsFreeLicenseOrExpired()))
|
if (pool.Connection.Cache.Hosts.Any(h => h.IsExpired()))
|
||||||
return Icons.PoolUnlicensed;
|
return Icons.PoolUnlicensed;
|
||||||
if (pool.IsPoolFullyUpgraded())
|
if (pool.IsPoolFullyUpgraded())
|
||||||
return Icons.PoolConnected;
|
return Icons.PoolConnected;
|
||||||
|
@ -1005,8 +1005,10 @@ namespace XenAdmin
|
|||||||
|
|
||||||
public static bool SameProductBrand(Host host)
|
public static bool SameProductBrand(Host host)
|
||||||
{
|
{
|
||||||
var brand = host.ProductBrand();
|
// XCP-ng Console: we want to connect to any flavor of XenServer
|
||||||
return brand == Branding.PRODUCT_BRAND || Branding.PRODUCT_BRAND == "[XenServer product]";
|
return true;
|
||||||
|
//var brand = host.ProductBrand();
|
||||||
|
//return brand == Branding.PRODUCT_BRAND || Branding.PRODUCT_BRAND == "[XenServer product]";
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -2915,7 +2917,7 @@ namespace XenAdmin
|
|||||||
|
|
||||||
if (pool.Connection != null && pool.Connection.CacheIsPopulated)
|
if (pool.Connection != null && pool.Connection.CacheIsPopulated)
|
||||||
{
|
{
|
||||||
if (pool.IsFreeLicenseOrExpired)
|
if (pool.IsExpired)
|
||||||
{
|
{
|
||||||
LicenseStatusTitleLabel.Text = Messages.MAINWINDOW_HEADER_UNLICENSED;
|
LicenseStatusTitleLabel.Text = Messages.MAINWINDOW_HEADER_UNLICENSED;
|
||||||
LicenseStatusTitleLabel.ForeColor = Color.Red;
|
LicenseStatusTitleLabel.ForeColor = Color.Red;
|
||||||
@ -2933,7 +2935,7 @@ namespace XenAdmin
|
|||||||
|
|
||||||
if (host.Connection != null && host.Connection.CacheIsPopulated)
|
if (host.Connection != null && host.Connection.CacheIsPopulated)
|
||||||
{
|
{
|
||||||
if (host.IsFreeLicenseOrExpired())
|
if (host.IsExpired())
|
||||||
{
|
{
|
||||||
LicenseStatusTitleLabel.Text = Messages.MAINWINDOW_HEADER_UNLICENSED;
|
LicenseStatusTitleLabel.Text = Messages.MAINWINDOW_HEADER_UNLICENSED;
|
||||||
LicenseStatusTitleLabel.ForeColor = Color.Red;
|
LicenseStatusTitleLabel.ForeColor = Color.Red;
|
||||||
|
@ -52,7 +52,7 @@ namespace XenAdminTests.ArchiveTests
|
|||||||
|
|
||||||
foreach (KeyValuePair<ArchiveFactory.Type, Type> pair in validIterators)
|
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)))
|
using (MemoryStream ms = new MemoryStream(File.ReadAllBytes(target)))
|
||||||
{
|
{
|
||||||
ArchiveIterator providedStream = ArchiveFactory.Reader(pair.Key, ms);
|
ArchiveIterator providedStream = ArchiveFactory.Reader(pair.Key, ms);
|
||||||
@ -81,17 +81,15 @@ namespace XenAdminTests.ArchiveTests
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
[ExpectedException(typeof(NotSupportedException))]
|
|
||||||
public void TestInvalidTarGzWriterGeneration()
|
public void TestInvalidTarGzWriterGeneration()
|
||||||
{
|
{
|
||||||
CreateInvalidWriterType(ArchiveFactory.Type.TarGz);
|
Assert.That(()=> CreateInvalidWriterType(ArchiveFactory.Type.TarGz), Throws.Exception.With.TypeOf(typeof(NotSupportedException)));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
[ExpectedException(typeof(NotSupportedException))]
|
|
||||||
public void TestInvalidTarBz2WriterGeneration()
|
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)
|
private void CreateInvalidWriterType(ArchiveFactory.Type type)
|
||||||
|
@ -155,13 +155,13 @@ namespace XenAdminTests.ArchiveTests
|
|||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
[OneTimeSetUp]
|
||||||
public void Setup()
|
public void Setup()
|
||||||
{
|
{
|
||||||
fakeIterator = new ArchiveIteratorFake();
|
fakeIterator = new ArchiveIteratorFake();
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
[OneTimeTearDown]
|
||||||
public void TearDown()
|
public void TearDown()
|
||||||
{
|
{
|
||||||
fakeIterator.Dispose();
|
fakeIterator.Dispose();
|
||||||
@ -175,18 +175,16 @@ namespace XenAdminTests.ArchiveTests
|
|||||||
|
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
[ExpectedException(typeof(ArgumentNullException))]
|
|
||||||
public void AnExceptionIsThrownForNullArgumentWhenCallingExtractAllContents()
|
public void AnExceptionIsThrownForNullArgumentWhenCallingExtractAllContents()
|
||||||
{
|
{
|
||||||
fakeIterator.ExtractAllContents(null);
|
Assert.That(() => fakeIterator.ExtractAllContents(null), Throws.ArgumentNullException);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
[ExpectedException(typeof(ArgumentNullException))]
|
|
||||||
public void AnExceptionIsThrownForANullFileNameWhenCallingExtractAllContents()
|
public void AnExceptionIsThrownForANullFileNameWhenCallingExtractAllContents()
|
||||||
{
|
{
|
||||||
fakeIterator.CurrentFileNameReturn = null;
|
fakeIterator.CurrentFileNameReturn = null;
|
||||||
fakeIterator.ExtractAllContents(Path.GetTempPath());
|
Assert.That(() => fakeIterator.ExtractAllContents(Path.GetTempPath()), Throws.ArgumentNullException);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@ -120,13 +120,13 @@ namespace XenAdminTests.ArchiveTests
|
|||||||
|
|
||||||
private FakeArchiveWriter fakeWriter;
|
private FakeArchiveWriter fakeWriter;
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
[OneTimeSetUp]
|
||||||
public void FixtureSetup()
|
public void FixtureSetup()
|
||||||
{
|
{
|
||||||
fakeWriter = new FakeArchiveWriter();
|
fakeWriter = new FakeArchiveWriter();
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
[OneTimeTearDown]
|
||||||
public void FixtureTearDown()
|
public void FixtureTearDown()
|
||||||
{
|
{
|
||||||
fakeWriter.Dispose();
|
fakeWriter.Dispose();
|
||||||
@ -182,10 +182,9 @@ namespace XenAdminTests.ArchiveTests
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
[ExpectedException(typeof(FileNotFoundException))]
|
|
||||||
public void CreateArchiveThrowsWithBadPath()
|
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]
|
[Test]
|
||||||
|
@ -42,7 +42,7 @@ namespace XenAdminTests.ArchiveTests
|
|||||||
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
|
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
|
||||||
public class TarArchiveWriterTests : ThirdPartyArchiveWriterTest
|
public class TarArchiveWriterTests : ThirdPartyArchiveWriterTest
|
||||||
{
|
{
|
||||||
[TestFixtureSetUp]
|
[OneTimeSetUp]
|
||||||
public void TestFixtureSetUp()
|
public void TestFixtureSetUp()
|
||||||
{
|
{
|
||||||
Writer = new SharpZipTarArchiveWriter();
|
Writer = new SharpZipTarArchiveWriter();
|
||||||
@ -53,14 +53,14 @@ namespace XenAdminTests.ArchiveTests
|
|||||||
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
|
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
|
||||||
public class ZipArchiveWriterTests : ThirdPartyArchiveWriterTest
|
public class ZipArchiveWriterTests : ThirdPartyArchiveWriterTest
|
||||||
{
|
{
|
||||||
[TestFixtureSetUp]
|
[OneTimeSetUp]
|
||||||
public void TestFixtureSetUp()
|
public void TestFixtureSetUp()
|
||||||
{
|
{
|
||||||
Writer = new DotNetZipZipWriter();
|
Writer = new DotNetZipZipWriter();
|
||||||
Reader = null;
|
Reader = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
[OneTimeTearDown]
|
||||||
public void TestFixtureTearDown()
|
public void TestFixtureTearDown()
|
||||||
{
|
{
|
||||||
Writer.Dispose();
|
Writer.Dispose();
|
||||||
|
@ -45,7 +45,7 @@ namespace XenAdminTests.CommandTests
|
|||||||
: base(false, CommandTestsDatabase.George)
|
: base(false, CommandTestsDatabase.George)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
[Test, Timeout( 100 * 1000 )]
|
[Test, MaxTime( 100 * 1000 )]
|
||||||
public void Run()
|
public void Run()
|
||||||
{
|
{
|
||||||
AddHostCommandTest tester = new AddHostCommandTest();
|
AddHostCommandTest tester = new AddHostCommandTest();
|
||||||
@ -102,8 +102,8 @@ namespace XenAdminTests.CommandTests
|
|||||||
|
|
||||||
//Test name is correct
|
//Test name is correct
|
||||||
string subnodeOneText = MainWindowWrapper.TreeView.Nodes[0].Nodes[1].Text;
|
string subnodeOneText = MainWindowWrapper.TreeView.Nodes[0].Nodes[1].Text;
|
||||||
Assert.IsNotNullOrEmpty(subnodeOneText,
|
Assert.IsNotNull(subnodeOneText, "Subnode 1's text is null: The host may not have been added");
|
||||||
"Subnode 1's text is null or empty: 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,
|
Assert.AreEqual("krakout", subnodeOneText,
|
||||||
"Subnode1's text containing the host name was incorrect");
|
"Subnode1's text containing the host name was incorrect");
|
||||||
|
|
||||||
|
@ -49,7 +49,7 @@ namespace XenAdminTests.CommandTests
|
|||||||
{ }
|
{ }
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
[Timeout(100 * 1000)]
|
[MaxTime(100 * 1000)]
|
||||||
public void Run()
|
public void Run()
|
||||||
{
|
{
|
||||||
AddHostToPoolCommandTest tester = new AddHostToPoolCommandTest();
|
AddHostToPoolCommandTest tester = new AddHostToPoolCommandTest();
|
||||||
|
@ -61,8 +61,8 @@ namespace XenAdminTests.CommandTests
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test, Category(TestCategories.SmokeTest)]
|
[Test, Category(TestCategories.SmokeTest)]
|
||||||
[TestCase(true, Description = "Is LunPerVdi", Result = false)]
|
[TestCase(true, Description = "Is LunPerVdi", ExpectedResult = false)]
|
||||||
[TestCase(false, Description = "Is Not LunPerVdi", Result = true)]
|
[TestCase(false, Description = "Is Not LunPerVdi", ExpectedResult = true)]
|
||||||
public bool VerifyLunPerVdiBehaviour(bool IsLunPerVdi)
|
public bool VerifyLunPerVdiBehaviour(bool IsLunPerVdi)
|
||||||
{
|
{
|
||||||
Mock<VM> vm = ObjectFactory.BuiltObject<VM>(ObjectBuilderType.VmWithHomeServerHost, id);
|
Mock<VM> vm = ObjectFactory.BuiltObject<VM>(ObjectBuilderType.VmWithHomeServerHost, id);
|
||||||
@ -78,8 +78,8 @@ namespace XenAdminTests.CommandTests
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test, Category(TestCategories.SmokeTest)]
|
[Test, Category(TestCategories.SmokeTest)]
|
||||||
[TestCase(true, Description = "Wlb enabled", Result = false)]
|
[TestCase(true, Description = "Wlb enabled", ExpectedResult = false)]
|
||||||
[TestCase(false, Description = "Wlb disabled", Result = true)]
|
[TestCase(false, Description = "Wlb disabled", ExpectedResult = true)]
|
||||||
public bool IntrapoolWlbEnabledBehaviour(bool WlbEnabled)
|
public bool IntrapoolWlbEnabledBehaviour(bool WlbEnabled)
|
||||||
{
|
{
|
||||||
Mock<VM> vm = ObjectFactory.BuiltObject<VM>(ObjectBuilderType.VmWithHomeServerHost, id);
|
Mock<VM> vm = ObjectFactory.BuiltObject<VM>(ObjectBuilderType.VmWithHomeServerHost, id);
|
||||||
@ -99,10 +99,10 @@ namespace XenAdminTests.CommandTests
|
|||||||
|
|
||||||
|
|
||||||
[Test, Category(TestCategories.SmokeTest)]
|
[Test, Category(TestCategories.SmokeTest)]
|
||||||
[TestCase(true, true, Description = "Wlb enabled both", Result = false)]
|
[TestCase(true, true, Description = "Wlb enabled both", ExpectedResult = false)]
|
||||||
[TestCase(false, false, Description = "Wlb disabled both", Result = true)]
|
[TestCase(false, false, Description = "Wlb disabled both", ExpectedResult = true)]
|
||||||
[TestCase(true, false, Description = "Wlb enabled VM", Result = false)]
|
[TestCase(true, false, Description = "Wlb enabled VM", ExpectedResult = false)]
|
||||||
[TestCase(false, true, Description = "Wlb enabled target", Result = true)]
|
[TestCase(false, true, Description = "Wlb enabled target", ExpectedResult = true)]
|
||||||
public bool CrossPoolWlbEnabledBehaviour(bool WlbEnabledVM, bool WlbEnabledTarget)
|
public bool CrossPoolWlbEnabledBehaviour(bool WlbEnabledVM, bool WlbEnabledTarget)
|
||||||
{
|
{
|
||||||
//First connection
|
//First connection
|
||||||
|
@ -51,7 +51,7 @@ namespace XenAdminTests.CommandTests
|
|||||||
{ }
|
{ }
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
[Timeout(100 * 1000)]
|
[MaxTime(100 * 1000)]
|
||||||
public void Run()
|
public void Run()
|
||||||
{
|
{
|
||||||
NewFolderCommandTest tester = new NewFolderCommandTest();
|
NewFolderCommandTest tester = new NewFolderCommandTest();
|
||||||
@ -67,7 +67,7 @@ namespace XenAdminTests.CommandTests
|
|||||||
{ }
|
{ }
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
[Timeout(100 * 1000)]
|
[MaxTime(100 * 1000)]
|
||||||
public void Run()
|
public void Run()
|
||||||
{
|
{
|
||||||
NewFolderCommandTest tester = new NewFolderCommandTest();
|
NewFolderCommandTest tester = new NewFolderCommandTest();
|
||||||
|
@ -94,7 +94,7 @@ namespace XenAdminTests.CommandTests
|
|||||||
{ }
|
{ }
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
[Timeout(100 * 1000)]
|
[MaxTime(100 * 1000)]
|
||||||
public void Run()
|
public void Run()
|
||||||
{
|
{
|
||||||
VMLifecycleCommandTest tester = new VMLifecycleCommandTest();
|
VMLifecycleCommandTest tester = new VMLifecycleCommandTest();
|
||||||
|
@ -74,7 +74,7 @@ namespace XenAdminTests.CompressionTests
|
|||||||
|
|
||||||
foreach (KeyValuePair<CompressionFactory.Type, Type> pair in validReaders)
|
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
|
* 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
|
* 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
|
* As this is not the case then this null construction will throw an exception
|
||||||
*/
|
*/
|
||||||
[Test]
|
[Test]
|
||||||
[ExpectedException(typeof(IOException))]
|
|
||||||
public void TestFailingReaderGeneration()
|
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;
|
private CompressionStreamFake fakeCompressionStream;
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
[OneTimeSetUp]
|
||||||
public void TestFixtureSetUp()
|
public void TestFixtureSetUp()
|
||||||
{
|
{
|
||||||
fakeCompressionStream = new CompressionStreamFake();
|
fakeCompressionStream = new CompressionStreamFake();
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
[OneTimeTearDown]
|
||||||
public void TestFixtureTearDown()
|
public void TestFixtureTearDown()
|
||||||
{
|
{
|
||||||
fakeCompressionStream.Dispose();
|
fakeCompressionStream.Dispose();
|
||||||
|
@ -41,7 +41,7 @@ namespace XenAdminTests.CompressionTests
|
|||||||
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
|
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
|
||||||
public class GzipCompressionTests : ThirdPartyCompressionTests
|
public class GzipCompressionTests : ThirdPartyCompressionTests
|
||||||
{
|
{
|
||||||
[TestFixtureSetUp]
|
[OneTimeSetUp]
|
||||||
public void SetupFixture()
|
public void SetupFixture()
|
||||||
{
|
{
|
||||||
Compressor = new DotNetZipGZipOutputStream();
|
Compressor = new DotNetZipGZipOutputStream();
|
||||||
@ -52,7 +52,7 @@ namespace XenAdminTests.CompressionTests
|
|||||||
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
|
[TestFixture, Category(TestCategories.UICategoryA), Category(TestCategories.SmokeTest)]
|
||||||
public class Bzip2CompressionTests : ThirdPartyCompressionTests
|
public class Bzip2CompressionTests : ThirdPartyCompressionTests
|
||||||
{
|
{
|
||||||
[TestFixtureSetUp]
|
[OneTimeSetUp]
|
||||||
public void SetupFixture()
|
public void SetupFixture()
|
||||||
{
|
{
|
||||||
Compressor = new DotNetZipBZip2OutputStream();
|
Compressor = new DotNetZipBZip2OutputStream();
|
||||||
|
@ -106,7 +106,7 @@ namespace XenAdminTests.Controls
|
|||||||
Assert.That(gb.ManipulatedText, Is.EqualTo(String.Empty), "Manipulated text TestCase width: " + width);
|
Assert.That(gb.ManipulatedText, Is.EqualTo(String.Empty), "Manipulated text TestCase width: " + width);
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<TestCase> TestCasesNoMnemonicNoEllipsing
|
public static IEnumerable<TestCase> TestCasesNoMnemonicNoEllipsing
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@ -137,7 +137,7 @@ namespace XenAdminTests.Controls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<TestCase> TestCasesWithMnemonicNoEllipsing
|
public static IEnumerable<TestCase> TestCasesWithMnemonicNoEllipsing
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@ -163,7 +163,7 @@ namespace XenAdminTests.Controls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<TestCase> TestCasesWithMnemonic
|
public static IEnumerable<TestCase> TestCasesWithMnemonic
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@ -190,7 +190,7 @@ namespace XenAdminTests.Controls
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public IEnumerable<TestCase> TestCasesNoMnemonic
|
public static IEnumerable<TestCase> TestCasesNoMnemonic
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
@ -50,9 +50,9 @@ namespace XenAdminTests.Controls
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
[TestCase(0, Result = true)]
|
[TestCase(0, ExpectedResult = true)]
|
||||||
[TestCase(1, Result = false)]
|
[TestCase(1, ExpectedResult = false)]
|
||||||
[TestCase(22, Result = false)]
|
[TestCase(22, ExpectedResult = false)]
|
||||||
public bool VBDCountDisablesItem(int vbdCount)
|
public bool VBDCountDisablesItem(int vbdCount)
|
||||||
{
|
{
|
||||||
Mock<VDI> vdi = GetMockVdi(vbdCount);
|
Mock<VDI> vdi = GetMockVdi(vbdCount);
|
||||||
@ -68,12 +68,12 @@ namespace XenAdminTests.Controls
|
|||||||
Assert.That(item.Enabled, Is.EqualTo(expectedEnabled), description);
|
Assert.That(item.Enabled, Is.EqualTo(expectedEnabled), description);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test, ExpectedException(typeof(ArgumentNullException))]
|
[Test]
|
||||||
public void NullAdditionalConstraintsThrows()
|
public void NullAdditionalConstraintsThrows()
|
||||||
{
|
{
|
||||||
Mock<VDI> vdi = GetMockVdi(0);
|
Mock<VDI> vdi = GetMockVdi(0);
|
||||||
LunComboBoxItem item = new LunComboBoxItem(vdi.Object) { AdditionalConstraints = null };
|
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]
|
[Test]
|
||||||
[TestCase(true, Result = true)]
|
[TestCase(true, ExpectedResult = true)]
|
||||||
[TestCase(false, Result = false)]
|
[TestCase(false, ExpectedResult = false)]
|
||||||
public bool IsValidForMapping(bool lunPerVDI)
|
public bool IsValidForMapping(bool lunPerVDI)
|
||||||
{
|
{
|
||||||
Mock<SR> sr = ObjectManager.NewXenObject<SR>(id);
|
Mock<SR> sr = ObjectManager.NewXenObject<SR>(id);
|
||||||
|
@ -40,6 +40,7 @@ using XenAPI;
|
|||||||
|
|
||||||
namespace XenAdminTests.Controls
|
namespace XenAdminTests.Controls
|
||||||
{
|
{
|
||||||
|
[SetCulture("en-EN")]
|
||||||
public class SrPickerItemTests : DatabaseTester_TestFixture
|
public class SrPickerItemTests : DatabaseTester_TestFixture
|
||||||
{
|
{
|
||||||
private const string dbName = "TampaTwoHostPoolSelectioniSCSI.xml";
|
private const string dbName = "TampaTwoHostPoolSelectioniSCSI.xml";
|
||||||
|
@ -53,13 +53,13 @@ namespace XenAdminTests
|
|||||||
: base(databases)
|
: base(databases)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
[OneTimeSetUp]
|
||||||
public void SetUp()
|
public void SetUp()
|
||||||
{
|
{
|
||||||
Setup();
|
Setup();
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
[OneTimeTearDown]
|
||||||
public void TearDown()
|
public void TearDown()
|
||||||
{
|
{
|
||||||
Dispose();
|
Dispose();
|
||||||
|
@ -108,7 +108,7 @@ namespace XenAdminTests.DialogTests.boston.CertificateDialogTests
|
|||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
string certFileName = Path.Combine(Directory.GetCurrentDirectory(), "TestResources", "TestDevCertificate.cer");
|
string certFileName = Path.Combine(TestContext.CurrentContext.TestDirectory, "TestResources", "TestDevCertificate.cer");
|
||||||
return X509Certificate.CreateFromCertFile(certFileName);
|
return X509Certificate.CreateFromCertFile(certFileName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -64,7 +64,7 @@ namespace XenAdminTests.DialogTests.state1_xml.DialogsForConnection
|
|||||||
{
|
{
|
||||||
IXenConnection connection = null;
|
IXenConnection connection = null;
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
[OneTimeSetUp]
|
||||||
public void ChooseConnection()
|
public void ChooseConnection()
|
||||||
{
|
{
|
||||||
connection = GetAnyConnection();
|
connection = GetAnyConnection();
|
||||||
|
@ -50,7 +50,7 @@ namespace XenAdminTests.DialogTests.LicenseManager.Comparers
|
|||||||
public bool VersionChecked { get; set; }
|
public bool VersionChecked { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
private IEnumerable<TestCase> TestCases
|
private static IEnumerable<TestCase> TestCases
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
@ -42,14 +42,14 @@ namespace XenAdminTests.HealthCheckTests
|
|||||||
{
|
{
|
||||||
public class CredentialTests : UnitTester_TestFixture
|
public class CredentialTests : UnitTester_TestFixture
|
||||||
{
|
{
|
||||||
[TestFixtureSetUp]
|
[OneTimeSetUp]
|
||||||
public void FixtureSetup()
|
public void FixtureSetup()
|
||||||
{
|
{
|
||||||
CredentialReceiver.instance.Init();
|
CredentialReceiver.instance.Init();
|
||||||
ServerListHelper.instance.Init();
|
ServerListHelper.instance.Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
[OneTimeTearDown]
|
||||||
public void FixtureTearDown()
|
public void FixtureTearDown()
|
||||||
{
|
{
|
||||||
CredentialReceiver.instance.UnInit();
|
CredentialReceiver.instance.UnInit();
|
||||||
|
@ -63,14 +63,14 @@ namespace XenAdminTests.HealthCheckTests
|
|||||||
config[HealthCheckSettings.LAST_FAILED_UPLOAD] = "";
|
config[HealthCheckSettings.LAST_FAILED_UPLOAD] = "";
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
[TestFixtureSetUp]
|
[OneTimeSetUp]
|
||||||
public void FixtureSetup()
|
public void FixtureSetup()
|
||||||
{
|
{
|
||||||
CredentialReceiver.instance.Init();
|
CredentialReceiver.instance.Init();
|
||||||
ServerListHelper.instance.Init();
|
ServerListHelper.instance.Init();
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
[OneTimeTearDown]
|
||||||
public void FixtureTearDown()
|
public void FixtureTearDown()
|
||||||
{
|
{
|
||||||
CredentialReceiver.instance.UnInit();
|
CredentialReceiver.instance.UnInit();
|
||||||
@ -106,7 +106,7 @@ namespace XenAdminTests.HealthCheckTests
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test, Timeout( 100 * 1000 )]
|
[Test, MaxTime( 100 * 1000 )]
|
||||||
public void checkUploadLock()
|
public void checkUploadLock()
|
||||||
{
|
{
|
||||||
IXenConnection connection = DatabaseManager.ConnectionFor(dbName);
|
IXenConnection connection = DatabaseManager.ConnectionFor(dbName);
|
||||||
|
@ -92,8 +92,8 @@ namespace XenAdminTests
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Assert.IsNullOrEmpty(missingSb.ToString(), "Missing resources detected.");
|
Assert.That(missingSb.ToString(), Is.Null.Or.Empty); //Missing resources detected.
|
||||||
Assert.IsNullOrEmpty(extraSb.ToString(), "Unecessary resources detected");
|
Assert.That(extraSb.ToString(), Is.Null.Or.Empty); //"Unecessary resources detected"
|
||||||
}
|
}
|
||||||
|
|
||||||
#region Auxiliary private methods
|
#region Auxiliary private methods
|
||||||
|
@ -133,7 +133,7 @@ namespace XenAdminTests.LicensingTests
|
|||||||
}
|
}
|
||||||
|
|
||||||
#region Private Helper Methods
|
#region Private Helper Methods
|
||||||
private IEnumerable<ExipryDateTestCase> CoarseExpiryDateTestCases
|
private static IEnumerable<ExipryDateTestCase> CoarseExpiryDateTestCases
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
@ -54,7 +54,7 @@ namespace XenAdminTests.LicensingTests
|
|||||||
public string Contains { get; set; }
|
public string Contains { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
private IEnumerable<TestCase> TestData
|
private static IEnumerable<TestCase> TestData
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
@ -214,13 +214,13 @@ namespace XenAdminTests
|
|||||||
: base(readOnly, databases)
|
: base(readOnly, databases)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
[OneTimeSetUp]
|
||||||
public void SetUp()
|
public void SetUp()
|
||||||
{
|
{
|
||||||
base._SetUp();
|
base._SetUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
[OneTimeTearDown]
|
||||||
public void TearDown()
|
public void TearDown()
|
||||||
{
|
{
|
||||||
base._TearDown();
|
base._TearDown();
|
||||||
@ -233,13 +233,13 @@ namespace XenAdminTests
|
|||||||
: base(databases)
|
: base(databases)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
[SetUp]
|
[OneTimeSetUp]
|
||||||
public void SetUp()
|
public void SetUp()
|
||||||
{
|
{
|
||||||
base._SetUp();
|
base._SetUp();
|
||||||
}
|
}
|
||||||
|
|
||||||
[TearDown]
|
[OneTimeTearDown]
|
||||||
public void TearDown()
|
public void TearDown()
|
||||||
{
|
{
|
||||||
base._TearDown();
|
base._TearDown();
|
||||||
|
@ -220,7 +220,7 @@ namespace XenAdminTests
|
|||||||
|
|
||||||
public static string GetTestResource(string name)
|
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
|
class StreamUtilitiesTests
|
||||||
{
|
{
|
||||||
[Test]
|
[Test]
|
||||||
[ExpectedException(typeof(ArgumentNullException))]
|
|
||||||
public void BufferedStreamCopyWithNullInputStream()
|
public void BufferedStreamCopyWithNullInputStream()
|
||||||
{
|
{
|
||||||
using( MemoryStream ms = new MemoryStream() )
|
using( MemoryStream ms = new MemoryStream() )
|
||||||
{
|
{
|
||||||
StreamUtilities.BufferedStreamCopy( null, ms );
|
Assert.That(() => StreamUtilities.BufferedStreamCopy(null, ms), Throws.ArgumentNullException);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
[ExpectedException(typeof(ArgumentNullException))]
|
|
||||||
public void BufferedStreamCopyWithNullOutputStream()
|
public void BufferedStreamCopyWithNullOutputStream()
|
||||||
{
|
{
|
||||||
using (MemoryStream ms = new MemoryStream())
|
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]
|
[Test]
|
||||||
[ExpectedException(typeof(FormatException))]
|
|
||||||
public void ISODateTimeParseWithBadFormat()
|
public void ISODateTimeParseWithBadFormat()
|
||||||
{
|
{
|
||||||
TimeUtil.ParseISO8601DateTime("20111225T1020:37Z");
|
Assert.That(() => TimeUtil.ParseISO8601DateTime("20111225T1020:37Z"), Throws.Exception.With.TypeOf(typeof(FormatException)));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
[ExpectedException(typeof(ArgumentNullException))]
|
|
||||||
public void ISODateTimeParseWithNullArg()
|
public void ISODateTimeParseWithNullArg()
|
||||||
{
|
{
|
||||||
TimeUtil.ParseISO8601DateTime(null);
|
Assert.That(() => TimeUtil.ParseISO8601DateTime(null), Throws.ArgumentNullException);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@ -40,7 +40,7 @@ using System.Net;
|
|||||||
|
|
||||||
namespace XenAdminTests.MiscTests
|
namespace XenAdminTests.MiscTests
|
||||||
{
|
{
|
||||||
[TestFixture, RequiresSTA]
|
[TestFixture, Apartment(ApartmentState.STA)]
|
||||||
public class WebBrowser2Tests : MainWindowLauncher_TestFixture
|
public class WebBrowser2Tests : MainWindowLauncher_TestFixture
|
||||||
{
|
{
|
||||||
private WebBrowser2 _wb;
|
private WebBrowser2 _wb;
|
||||||
|
@ -56,7 +56,7 @@ namespace XenAdminTests.PluginTests
|
|||||||
_pluginManager = new PluginManager();
|
_pluginManager = new PluginManager();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test, RequiresSTA]
|
[Test, Apartment(System.Threading.ApartmentState.STA)]
|
||||||
public void TestLoadPlugin()
|
public void TestLoadPlugin()
|
||||||
{
|
{
|
||||||
_pluginLoader = new TestPluginLoader("TabPageFeatureTestPlugin", _pluginManager);
|
_pluginLoader = new TestPluginLoader("TabPageFeatureTestPlugin", _pluginManager);
|
||||||
|
@ -49,7 +49,7 @@ namespace XenAdminTests.SearchTests
|
|||||||
|
|
||||||
protected virtual string resultsFileName { get { return "searchresults.xml"; } }
|
protected virtual string resultsFileName { get { return "searchresults.xml"; } }
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
[OneTimeSetUp]
|
||||||
public void LoadResultsFile()
|
public void LoadResultsFile()
|
||||||
{
|
{
|
||||||
//You can enable the below line to get the search results written out if new ones are required
|
//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);
|
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)
|
foreach (IXenObject o in connection.Cache.XenSearchableObjects)
|
||||||
{
|
{
|
||||||
|
@ -41,7 +41,7 @@ namespace XenAdminTests.SearchTests
|
|||||||
class SearchMarshallingTests
|
class SearchMarshallingTests
|
||||||
{
|
{
|
||||||
[Test]
|
[Test]
|
||||||
public void RunTest()
|
public void SearchMarshallingTest()
|
||||||
{
|
{
|
||||||
foreach (Search search in Search.Searches)
|
foreach (Search search in Search.Searches)
|
||||||
{
|
{
|
||||||
|
@ -46,7 +46,7 @@ namespace XenAdminTests.SearchTests
|
|||||||
: base(databases)
|
: base(databases)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
[SetUp]
|
[OneTimeSetUp]
|
||||||
public void SwitchToSearchTab()
|
public void SwitchToSearchTab()
|
||||||
{
|
{
|
||||||
MainWindowWrapper mainWindowWrapper = new MainWindowWrapper(Program.MainWindow);
|
MainWindowWrapper mainWindowWrapper = new MainWindowWrapper(Program.MainWindow);
|
||||||
|
@ -101,7 +101,7 @@ namespace XenAdminTests.SearchTests
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="xenObject">The xen object to be tested.</param>
|
/// <param name="xenObject">The xen object to be tested.</param>
|
||||||
[Test]
|
[Test]
|
||||||
[Ignore]
|
[Ignore("???")]
|
||||||
public void TestSearcherUpdatesWhenTagsChange()
|
public void TestSearcherUpdatesWhenTagsChange()
|
||||||
{
|
{
|
||||||
MW(() => EditSearchButton.PerformClick());
|
MW(() => EditSearchButton.PerformClick());
|
||||||
@ -144,7 +144,7 @@ namespace XenAdminTests.SearchTests
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
[Ignore]
|
[Ignore("")]
|
||||||
public void TestSearcherUpdatesWhenCustomFieldsChange()
|
public void TestSearcherUpdatesWhenCustomFieldsChange()
|
||||||
{
|
{
|
||||||
MW(() => EditSearchButton.PerformClick());
|
MW(() => EditSearchButton.PerformClick());
|
||||||
|
@ -53,7 +53,7 @@ namespace XenAdminTests.TabsAndMenus
|
|||||||
public LicenseStatus.HostState State { get; set; }
|
public LicenseStatus.HostState State { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
private IEnumerable<TestData> StatusTestData
|
private static IEnumerable<TestData> StatusTestData
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
@ -102,7 +102,7 @@ namespace XenAdminTests.TabsAndMenus
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
[Ignore]
|
[Ignore("")]
|
||||||
public void TestAfterConnection()
|
public void TestAfterConnection()
|
||||||
{
|
{
|
||||||
foreach (VirtualTreeNode n in GetAllTreeNodes())
|
foreach (VirtualTreeNode n in GetAllTreeNodes())
|
||||||
|
@ -54,7 +54,7 @@ namespace XenAdminTests.TabsAndMenus
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
[OneTimeSetUp]
|
||||||
public void TestFixtureSetUp()
|
public void TestFixtureSetUp()
|
||||||
{
|
{
|
||||||
DisableAllPlugins();
|
DisableAllPlugins();
|
||||||
|
@ -44,12 +44,12 @@ namespace XenAdminTests.TabsAndMenus
|
|||||||
{ }
|
{ }
|
||||||
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
private static readonly log4net.ILog log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
[OneTimeSetUp]
|
||||||
public void TestFixtureSetUp()
|
public void TestFixtureSetUp()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test, Timeout(120000)]
|
[Test, MaxTime(120000)]
|
||||||
[Ignore("Ignore this test, because it takes too long.")]
|
[Ignore("Ignore this test, because it takes too long.")]
|
||||||
public void AddALotOfVIFsThenRemoveThemShouldNotThrowAnException()
|
public void AddALotOfVIFsThenRemoveThemShouldNotThrowAnException()
|
||||||
{
|
{
|
||||||
|
@ -61,7 +61,7 @@ namespace XenAdminTests.TabsAndMenus
|
|||||||
CheckHelp = false;
|
CheckHelp = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
[OneTimeSetUp]
|
||||||
public void TestFixtureSetUp()
|
public void TestFixtureSetUp()
|
||||||
{
|
{
|
||||||
string plugins = Path.Combine(Program.AssemblyDir, "Plugins");
|
string plugins = Path.Combine(Program.AssemblyDir, "Plugins");
|
||||||
@ -96,7 +96,7 @@ namespace XenAdminTests.TabsAndMenus
|
|||||||
EnableAllPlugins();
|
EnableAllPlugins();
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
[OneTimeTearDown]
|
||||||
public void TestFixtureTearDown()
|
public void TestFixtureTearDown()
|
||||||
{
|
{
|
||||||
foreach (string folder in _folders)
|
foreach (string folder in _folders)
|
||||||
|
@ -42,7 +42,7 @@ namespace XenAdminTests.TabsAndMenus
|
|||||||
public class StartUpStateTests : TabsAndMenus
|
public class StartUpStateTests : TabsAndMenus
|
||||||
{
|
{
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
[OneTimeSetUp]
|
||||||
public void TestFixtureSetUp()
|
public void TestFixtureSetUp()
|
||||||
{
|
{
|
||||||
ConnectToStateDBs("state1.xml");
|
ConnectToStateDBs("state1.xml");
|
||||||
@ -50,7 +50,7 @@ namespace XenAdminTests.TabsAndMenus
|
|||||||
DisableAllPlugins();
|
DisableAllPlugins();
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
[OneTimeTearDown]
|
||||||
public new void TearDown()
|
public new void TearDown()
|
||||||
{
|
{
|
||||||
MW(RemoveStateDBs);
|
MW(RemoveStateDBs);
|
||||||
|
@ -52,7 +52,7 @@ namespace XenAdminTests.TabsAndMenus
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
[OneTimeSetUp]
|
||||||
public void TestFixtureSetUp()
|
public void TestFixtureSetUp()
|
||||||
{
|
{
|
||||||
DisableAllPlugins();
|
DisableAllPlugins();
|
||||||
|
@ -51,7 +51,7 @@ namespace XenAdminTests.TabsAndMenus
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
[OneTimeSetUp]
|
||||||
public void TestFixtureSetUp()
|
public void TestFixtureSetUp()
|
||||||
{
|
{
|
||||||
DisableAllPlugins();
|
DisableAllPlugins();
|
||||||
|
@ -189,7 +189,7 @@ namespace XenAdminTests
|
|||||||
|
|
||||||
private string TestResource(string name)
|
private string TestResource(string name)
|
||||||
{
|
{
|
||||||
return Path.Combine(Directory.GetCurrentDirectory(), "TestResources", name);
|
return Path.Combine(Directory.GetCurrentDirectory(), @"XenAdminTests\TestResources", name);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <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"/>
|
<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>
|
||||||
<table name="host">
|
<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>
|
||||||
<table name="subject"/>
|
<table name="subject"/>
|
||||||
<table name="auth"/>
|
<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"/>
|
<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>
|
||||||
<table name="host">
|
<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>
|
||||||
<table name="subject"/>
|
<table name="subject"/>
|
||||||
<table name="auth"/>
|
<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"/>
|
<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>
|
||||||
<table name="host">
|
<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>
|
||||||
<table name="subject"/>
|
<table name="subject"/>
|
||||||
<table name="auth"/>
|
<table name="auth"/>
|
||||||
|
@ -213,7 +213,7 @@ namespace XenAdminTests.TreeTests
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
[Ignore]
|
[Ignore("")]
|
||||||
public void TestPersistenceWhenAddingThenRemovingTextSearch()
|
public void TestPersistenceWhenAddingThenRemovingTextSearch()
|
||||||
{
|
{
|
||||||
PutInNavigationMode(NavigationPane.NavigationMode.Infrastructure);
|
PutInNavigationMode(NavigationPane.NavigationMode.Infrastructure);
|
||||||
|
@ -63,13 +63,13 @@ namespace XenAdminTests
|
|||||||
: base(databases)
|
: base(databases)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
[OneTimeSetUp]
|
||||||
public void SetUp()
|
public void SetUp()
|
||||||
{
|
{
|
||||||
Setup();
|
Setup();
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestFixtureTearDown]
|
[OneTimeTearDown]
|
||||||
public void TearDown()
|
public void TearDown()
|
||||||
{
|
{
|
||||||
Dispose();
|
Dispose();
|
||||||
|
@ -158,10 +158,10 @@ namespace XenAdminTests.UnitTests.AlertTests
|
|||||||
VerifyHostsExpectations(Times.Never);
|
VerifyHostsExpectations(Times.Never);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test, ExpectedException(typeof(NullReferenceException))]
|
[Test]
|
||||||
public void TestAlertWithNullPatch()
|
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)
|
private void VerifyConnExpectations(Func<Times> times)
|
||||||
|
@ -158,10 +158,10 @@ namespace XenAdminTests.UnitTests.AlertTests
|
|||||||
VerifyHostsExpectations(Times.Never);
|
VerifyHostsExpectations(Times.Never);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test, ExpectedException(typeof(NullReferenceException))]
|
[Test]
|
||||||
public void TestAlertWithNullVersion()
|
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)
|
private void VerifyConnExpectations(Func<Times> times)
|
||||||
|
@ -45,7 +45,7 @@ namespace XenAdminTests.UnitTests
|
|||||||
const string cpu3 = "040ce33d-bfebfbff-00000001-20100801";
|
const string cpu3 = "040ce33d-bfebfbff-00000001-20100801";
|
||||||
const string cpu4 = "000ce3bd-bfebfbff-00000001";
|
const string cpu4 = "000ce3bd-bfebfbff-00000001";
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
[OneTimeSetUp]
|
||||||
public void SetupResults()
|
public void SetupResults()
|
||||||
{
|
{
|
||||||
// A cpu does not have less features than itself
|
// 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 cpu3 = "040ce33d-bfebfbff-00000001-20100801";
|
||||||
const string mask = "ffffff7f-ffffffff-ffffffff-ffffffff";
|
const string mask = "ffffff7f-ffffffff-ffffffff-ffffffff";
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
[OneTimeSetUp]
|
||||||
public void SetupResults()
|
public void SetupResults()
|
||||||
{
|
{
|
||||||
// Can always mask a CPU to itself
|
// Can always mask a CPU to itself
|
||||||
|
@ -37,7 +37,7 @@ using System;
|
|||||||
|
|
||||||
namespace XenAdminTests.UnitTests.MiscTests
|
namespace XenAdminTests.UnitTests.MiscTests
|
||||||
{
|
{
|
||||||
[TestFixture, Category(TestCategories.Unit)]
|
[TestFixture, Category(TestCategories.Unit), SetCulture("en-EN")]
|
||||||
internal class UtilTests
|
internal class UtilTests
|
||||||
{
|
{
|
||||||
#region Test Data
|
#region Test Data
|
||||||
|
@ -45,10 +45,10 @@ namespace XenAdminTests.UnitTests.WlbTests
|
|||||||
private WlbPoolConfiguration wlbPool;
|
private WlbPoolConfiguration wlbPool;
|
||||||
private const int NUMBER_OF_PROPERTIES = 33;
|
private const int NUMBER_OF_PROPERTIES = 33;
|
||||||
|
|
||||||
[Test, ExpectedException(typeof(Exception))]
|
[Test]
|
||||||
public void NullCtorThrows()
|
public void NullCtorThrows()
|
||||||
{
|
{
|
||||||
wlbPool = new WlbPoolConfiguration(null);
|
Assert.That(()=> new WlbPoolConfiguration(null), Throws.Exception);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[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
|
namespace XenAdminTests.UnitTests.WlbTests
|
||||||
{
|
{
|
||||||
[TestFixture, Category(TestCategories.Unit)]
|
[TestFixture, Category(TestCategories.Unit), SetCulture("en-EN")]
|
||||||
public class WlbScheduledTaskTests
|
public class WlbScheduledTaskTests
|
||||||
{
|
{
|
||||||
#region Private Class Data
|
#region Private Class Data
|
||||||
@ -111,10 +111,10 @@ namespace XenAdminTests.UnitTests.WlbTests
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test, ExpectedException(typeof(KeyNotFoundException))]
|
[Test]
|
||||||
public void ExceptionRaisedIfOptModeNotSetButRequested()
|
public void ExceptionRaisedIfOptModeNotSetButRequested()
|
||||||
{
|
{
|
||||||
WlbScheduledTask.GetTaskOptMode(task);
|
Assert.That(() => WlbScheduledTask.GetTaskOptMode(task), Throws.Exception.With.TypeOf(typeof(KeyNotFoundException)));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@ -50,18 +50,18 @@ namespace XenAdminTests.UnitTests.WlbTests
|
|||||||
Assert.IsNull(tasks.GetNextExecutingTask(), "GetNextExecutingTask");
|
Assert.IsNull(tasks.GetNextExecutingTask(), "GetNextExecutingTask");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test, ExpectedException(typeof(IndexOutOfRangeException))]
|
[Test]
|
||||||
public void EmptyConstructorCausesCurrentScheduledPerformanceModeToThrow()
|
public void EmptyConstructorCausesCurrentScheduledPerformanceModeToThrow()
|
||||||
{
|
{
|
||||||
WlbScheduledTasks tasks = new WlbScheduledTasks();
|
WlbScheduledTasks tasks = new WlbScheduledTasks();
|
||||||
tasks.GetCurrentScheduledPerformanceMode();
|
Assert.That(()=> tasks.GetCurrentScheduledPerformanceMode(), Throws.Exception.With.TypeOf(typeof(IndexOutOfRangeException)));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test, ExpectedException(typeof(IndexOutOfRangeException))]
|
[Test]
|
||||||
public void EmptyConstructorCausesLastTaskToThrow()
|
public void EmptyConstructorCausesLastTaskToThrow()
|
||||||
{
|
{
|
||||||
WlbScheduledTasks tasks = new WlbScheduledTasks();
|
WlbScheduledTasks tasks = new WlbScheduledTasks();
|
||||||
tasks.GetLastExecutingTask();
|
Assert.That(() => tasks.GetLastExecutingTask(), Throws.Exception.With.TypeOf(typeof(IndexOutOfRangeException)));
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@ -49,7 +49,7 @@ namespace XenAdminTests.UnitTests
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets all Types that derive from IXenObject except Folder and DockerContainer
|
/// Gets all Types that derive from IXenObject except Folder and DockerContainer
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IEnumerable<Type> AllXenObjectTypesExceptFolder
|
public static IEnumerable<Type> AllXenObjectTypesExceptFolder
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
|
@ -71,7 +71,7 @@ namespace XenAdminTests.WizardTests
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestFixtureSetUp]
|
[OneTimeSetUp]
|
||||||
public void TestSetup()
|
public void TestSetup()
|
||||||
{
|
{
|
||||||
//one host pool
|
//one host pool
|
||||||
@ -196,7 +196,7 @@ namespace XenAdminTests.WizardTests
|
|||||||
{
|
{
|
||||||
var filter = new CrossPoolMigrateCanMigrateFilter(data.Item1, data.Item2, WizardMode.Migrate);
|
var filter = new CrossPoolMigrateCanMigrateFilter(data.Item1, data.Item2, WizardMode.Migrate);
|
||||||
Assert.False(filter.FailureFound, "Did not expect to find failure");
|
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);
|
var filter = new CrossPoolMigrateCanMigrateFilter(data.Item1, data.Item2, WizardMode.Migrate);
|
||||||
Assert.True(filter.FailureFound, "Expected to find failure");
|
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]
|
[Test]
|
||||||
[TestCase(true, true, Description = "Wlb enabled both", Result = true)]
|
[TestCase(true, true, Description = "Wlb enabled both", ExpectedResult = true)]
|
||||||
[TestCase(false, false, Description = "Wlb disabled both", Result = false)]
|
[TestCase(false, false, Description = "Wlb disabled both", ExpectedResult = false)]
|
||||||
[TestCase(true, false, Description = "Wlb enabled VM", Result = true)]
|
[TestCase(true, false, Description = "Wlb enabled VM", ExpectedResult = true)]
|
||||||
[TestCase(false, true, Description = "Wlb enabled target", Result = true)]
|
[TestCase(false, true, Description = "Wlb enabled target", ExpectedResult = true)]
|
||||||
public bool WlbEnabledFilterResults(bool WlbEnabledVM, bool WlbEnabledTarget)
|
public bool WlbEnabledFilterResults(bool WlbEnabledVM, bool WlbEnabledTarget)
|
||||||
{
|
{
|
||||||
Mock<Pool> pool = ObjectManager.NewXenObject<Pool>(id);
|
Mock<Pool> pool = ObjectManager.NewXenObject<Pool>(id);
|
||||||
@ -78,10 +78,10 @@ namespace XenAdminTests.WizardTests
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
[TestCase(true, true, Description = "Wlb enabled both", Result = hostFailureReason)]
|
[TestCase(true, true, Description = "Wlb enabled both", ExpectedResult = hostFailureReason)]
|
||||||
[TestCase(false, false, Description = "Wlb disabled both", Result = vmFailureReason)]
|
[TestCase(false, false, Description = "Wlb disabled both", ExpectedResult = vmFailureReason)]
|
||||||
[TestCase(true, false, Description = "Wlb enabled VM", Result = vmFailureReason)]
|
[TestCase(true, false, Description = "Wlb enabled VM", ExpectedResult = vmFailureReason)]
|
||||||
[TestCase(false, true, Description = "Wlb enabled target", Result = hostFailureReason)]
|
[TestCase(false, true, Description = "Wlb enabled target", ExpectedResult = hostFailureReason)]
|
||||||
public string WlbEnabledFailureReasons(bool WlbEnabledVM, bool WlbEnabledTarget)
|
public string WlbEnabledFailureReasons(bool WlbEnabledVM, bool WlbEnabledTarget)
|
||||||
{
|
{
|
||||||
Mock<Pool> pool = ObjectManager.NewXenObject<Pool>(id);
|
Mock<Pool> pool = ObjectManager.NewXenObject<Pool>(id);
|
||||||
|
@ -36,7 +36,7 @@ using XenAdmin.Wizards.DRWizards;
|
|||||||
|
|
||||||
namespace XenAdminTests.WizardTests
|
namespace XenAdminTests.WizardTests
|
||||||
{
|
{
|
||||||
[TestFixture, Category(TestCategories.UICategoryB)]
|
[TestFixture, Category(TestCategories.UICategoryB), SetCulture("en-EN")]
|
||||||
public class DRFailoverWizardSummaryReportTests
|
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 errorMessage = Messages.EXPORT_APPLIANCE_PAGE_ERROR_APP_EXISTS;
|
||||||
private readonly string noErrorMessage = string.Empty;
|
private readonly string noErrorMessage = string.Empty;
|
||||||
|
|
||||||
private IEnumerable<TestCase> TestCases
|
private static IEnumerable<TestCase> TestCases
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
@ -192,12 +192,12 @@ namespace XenAdminTests.WizardTests.ExportWizard
|
|||||||
Assert.That(checker.ErrorReason, Is.EqualTo(errorMessage), "error message");
|
Assert.That(checker.ErrorReason, Is.EqualTo(errorMessage), "error message");
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test, ExpectedException(typeof(ArgumentNullException))]
|
[Test]
|
||||||
public void NullPaths()
|
public void NullPaths()
|
||||||
{
|
{
|
||||||
ApplianceCheck checker = new ApplianceExistsCheck(null, null,
|
ApplianceCheck checker = new ApplianceExistsCheck(null, null,
|
||||||
ApplianceCheck.FileExtension.ovaovf);
|
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()
|
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()
|
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()
|
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()
|
public void VerifyExceptionThrownForUnsupportedTargetObject()
|
||||||
{
|
{
|
||||||
var filter = new ResidentHostIsSameAsSelectionFilter(CreateSingleVmListFromOneHostPool().First(), new List<VM>());
|
Assert.That(()=> new ResidentHostIsSameAsSelectionFilter(CreateSingleVmListFromOneHostPool().First(), new List<VM>()), Throws.ArgumentException);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@ -59,8 +59,7 @@ namespace XenAdminTests.WizardTests
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
[Test]
|
[Test, MaxTime(100 * 1000)]
|
||||||
[Timeout(100 * 1000)]
|
|
||||||
public void RunWizardKeyboardTests()
|
public void RunWizardKeyboardTests()
|
||||||
{
|
{
|
||||||
RunBefore();
|
RunBefore();
|
||||||
@ -102,8 +101,7 @@ namespace XenAdminTests.WizardTests
|
|||||||
MW(() => wizard.Dispose());
|
MW(() => wizard.Dispose());
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test, MaxTime(100 * 1000)]
|
||||||
[Timeout(100 * 1000)]
|
|
||||||
public void RunWizardTests()
|
public void RunWizardTests()
|
||||||
{
|
{
|
||||||
RunBefore();
|
RunBefore();
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="12.0">
|
||||||
|
<Import Project="..\packages\NUnit.3.10.1\build\NUnit.props" Condition="Exists('..\packages\NUnit.3.10.1\build\NUnit.props')" />
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||||
@ -17,6 +18,8 @@
|
|||||||
</UpgradeBackupLocation>
|
</UpgradeBackupLocation>
|
||||||
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
|
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
|
||||||
<TargetFrameworkProfile />
|
<TargetFrameworkProfile />
|
||||||
|
<NuGetPackageImportStamp>
|
||||||
|
</NuGetPackageImportStamp>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
@ -39,6 +42,9 @@
|
|||||||
<Prefer32Bit>false</Prefer32Bit>
|
<Prefer32Bit>false</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<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">
|
<Reference Include="CookComputing.XmlRpcV2, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\packages\CookComputing.XmlRpcV2.dll</HintPath>
|
<HintPath>..\packages\CookComputing.XmlRpcV2.dll</HintPath>
|
||||||
@ -47,9 +53,8 @@
|
|||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
<HintPath>..\packages\log4net.dll</HintPath>
|
<HintPath>..\packages\log4net.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Moq, Version=4.0.10827.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
<Reference Include="Moq, Version=4.8.0.0, Culture=neutral, PublicKeyToken=69f491c39445e920, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<HintPath>..\packages\Moq.4.8.2\lib\net45\Moq.dll</HintPath>
|
||||||
<HintPath>..\packages\Moq.dll</HintPath>
|
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||||
<SpecificVersion>False</SpecificVersion>
|
<SpecificVersion>False</SpecificVersion>
|
||||||
@ -60,11 +65,18 @@
|
|||||||
<HintPath>..\packages\nunit.framework.dll</HintPath>
|
<HintPath>..\packages\nunit.framework.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
|
<Reference Include="System.Configuration" />
|
||||||
<Reference Include="System.Core">
|
<Reference Include="System.Core">
|
||||||
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
<RequiredTargetFramework>3.5</RequiredTargetFramework>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
<Reference Include="System.Drawing" />
|
<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.Windows.Forms" />
|
||||||
<Reference Include="System.Xml" />
|
<Reference Include="System.Xml" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
@ -147,6 +159,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="app.config" />
|
<None Include="app.config" />
|
||||||
|
<None Include="packages.config" />
|
||||||
<None Include="TestResources\enterprise.xslic">
|
<None Include="TestResources\enterprise.xslic">
|
||||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
@ -489,6 +502,12 @@
|
|||||||
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
|
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
|
<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.
|
<!-- 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.
|
Other similar extension points exist, see Microsoft.Common.targets.
|
||||||
<Target Name="BeforeBuild">
|
<Target Name="BeforeBuild">
|
||||||
|
@ -223,7 +223,7 @@ namespace XenAdminTests.XenModelTests
|
|||||||
|
|
||||||
private string TestResource(string name)
|
private string TestResource(string name)
|
||||||
{
|
{
|
||||||
return Path.Combine(Directory.GetCurrentDirectory(), "TestResources", name);
|
return Path.Combine(Directory.GetCurrentDirectory(), @"XenAdminTests\TestResources", name);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ namespace XenAdminTests.XenOvf
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private IEnumerable<TestCase> TestCases
|
private static IEnumerable<TestCase> TestCases
|
||||||
{
|
{
|
||||||
get
|
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 GuiTempObjectPrefix = "__gui__";
|
||||||
|
|
||||||
|
public const string PRODUCT_BRAND_XCP_NG = "XCP-ng";
|
||||||
|
|
||||||
public static NumberFormatInfo _nfi = new CultureInfo("en-US", false).NumberFormat;
|
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}");
|
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}");
|
||||||
@ -1967,6 +1969,8 @@ namespace XenAdmin.Core
|
|||||||
var master = GetMaster(connection);
|
var master = GetMaster(connection);
|
||||||
if (master == null)
|
if (master == null)
|
||||||
return false;
|
return false;
|
||||||
|
if (master.ProductBrand() == PRODUCT_BRAND_XCP_NG)
|
||||||
|
return true;
|
||||||
if (ElyOrGreater(connection))
|
if (ElyOrGreater(connection))
|
||||||
return master.AppliedUpdates().Any(update => update.Name().ToLower().StartsWith("xscontainer"));
|
return master.AppliedUpdates().Any(update => update.Name().ToLower().StartsWith("xscontainer"));
|
||||||
return CreamOrGreater(connection) && master.SuppPacks().Any(suppPack => suppPack.Name.ToLower().StartsWith("xscontainer"));
|
return CreamOrGreater(connection) && master.SuppPacks().Any(suppPack => suppPack.Name.ToLower().StartsWith("xscontainer"));
|
||||||
|
@ -289,10 +289,10 @@ namespace XenAPI
|
|||||||
return edition == "free";
|
return edition == "free";
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual bool IsFreeLicenseOrExpired()
|
public virtual bool IsExpired()
|
||||||
{
|
{
|
||||||
if (Connection != null && Connection.CacheIsPopulated)
|
if (Connection != null && Connection.CacheIsPopulated)
|
||||||
return IsFreeLicense() || LicenseExpiryUTC() < DateTime.UtcNow - Connection.ServerTimeOffset;
|
return LicenseExpiryUTC() < DateTime.UtcNow - Connection.ServerTimeOffset;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -448,7 +448,7 @@ namespace XenAPI
|
|||||||
{
|
{
|
||||||
return h.license_params.ContainsKey("restrict_rpu")
|
return h.license_params.ContainsKey("restrict_rpu")
|
||||||
? BoolKey(h.license_params, "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)
|
public static bool RestrictCorosync(Host h)
|
||||||
|
@ -95,11 +95,11 @@ namespace XenAPI
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool IsFreeLicenseOrExpired
|
public bool IsExpired
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
return Connection.Cache.Hosts.Any(h => h.IsFreeLicenseOrExpired());
|
return Connection.Cache.Hosts.Any(h => h.IsExpired());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -85,7 +85,7 @@ BRANDING_XC_PRODUCT_6_0_VERSION=6.0
|
|||||||
BRANDING_XC_PRODUCT_6_2_VERSION=6.2
|
BRANDING_XC_PRODUCT_6_2_VERSION=6.2
|
||||||
BRANDING_XC_PRODUCT_6_5_VERSION=6.5
|
BRANDING_XC_PRODUCT_6_5_VERSION=6.5
|
||||||
BRANDING_XC_PRODUCT_7_0_VERSION=7.0
|
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_HIDDEN_FEATURES=""
|
||||||
BRANDING_ADDITIONAL_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()
|
version_cpp()
|
||||||
{
|
{
|
||||||
@ -109,6 +114,7 @@ version_cpp()
|
|||||||
version_csharp()
|
version_csharp()
|
||||||
{
|
{
|
||||||
sed -b -i -e "s/0\.0\.0\.0/${BRANDING_XC_PRODUCT_VERSION}.${BUILD_NUMBER}/g" \
|
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
|
$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