mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2024-12-03 16:41:04 +01:00
CP-27568: Update the RPU hotfix to version 5
Signed-off-by: Mihaela Stoica <mihaela.stoica@citrix.com>
This commit is contained in:
parent
01273b205c
commit
e85954fb75
@ -42,7 +42,7 @@ namespace XenAdmin.Diagnostics.Hotfixing
|
||||
Clearwater,
|
||||
Creedence,
|
||||
Dundee,
|
||||
ElyFalcon
|
||||
ElyJura
|
||||
}
|
||||
|
||||
private readonly Hotfix clearwaterHotfix = new SingleHotfix
|
||||
@ -63,16 +63,16 @@ namespace XenAdmin.Diagnostics.Hotfixing
|
||||
UUID = "474a0f28-0d33-4c9b-9e20-52baaea8ce5e"
|
||||
};
|
||||
|
||||
private readonly Hotfix elyFalconHotfix = new SingleHotfix
|
||||
private readonly Hotfix elyJuraHotfix = new SingleHotfix
|
||||
{
|
||||
Filename = "RPU004",
|
||||
UUID = "439235bf-48fa-4ee3-9c11-d67084a01205"
|
||||
UUID = "c79166a9-c71d-4c3f-9cca-019a274e8d87"
|
||||
};
|
||||
|
||||
public Hotfix Hotfix(Host host)
|
||||
{
|
||||
if (Helpers.ElyOrGreater(host) && !Helpers.InvernessOrGreater(host))
|
||||
return Hotfix(HotfixableServerVersion.ElyFalcon);
|
||||
if (Helpers.ElyOrGreater(host) && !Helpers.KolkataOrGreater(host))
|
||||
return Hotfix(HotfixableServerVersion.ElyJura);
|
||||
if (Helpers.DundeeOrGreater(host) && !Helpers.ElyOrGreater(host))
|
||||
return Hotfix(HotfixableServerVersion.Dundee);
|
||||
if (Helpers.CreedenceOrGreater(host) && !Helpers.DundeeOrGreater(host))
|
||||
@ -85,8 +85,8 @@ namespace XenAdmin.Diagnostics.Hotfixing
|
||||
|
||||
public Hotfix Hotfix(HotfixableServerVersion version)
|
||||
{
|
||||
if (version == HotfixableServerVersion.ElyFalcon)
|
||||
return elyFalconHotfix;
|
||||
if (version == HotfixableServerVersion.ElyJura)
|
||||
return elyJuraHotfix;
|
||||
if (version == HotfixableServerVersion.Dundee)
|
||||
return dundeeHotfix;
|
||||
if (version == HotfixableServerVersion.Creedence)
|
||||
|
@ -59,7 +59,7 @@ namespace XenAdminTests.UnitTests.Diagnostics
|
||||
string[] enumNames = Enum.GetNames(typeof (HotfixFactory.HotfixableServerVersion));
|
||||
Array.Sort(enumNames);
|
||||
|
||||
string[] expectedNames = new []{"Clearwater", "Creedence", "Dundee", "ElyFalcon"};
|
||||
string[] expectedNames = new []{"Clearwater", "Creedence", "Dundee", "ElyJura"};
|
||||
Array.Sort(expectedNames);
|
||||
|
||||
CollectionAssert.AreEqual(expectedNames, enumNames, "Expected contents of HotfixableServerVersion enum");
|
||||
@ -80,9 +80,9 @@ namespace XenAdminTests.UnitTests.Diagnostics
|
||||
factory.Hotfix(HotfixFactory.HotfixableServerVersion.Dundee).UUID,
|
||||
"Dundee UUID lookup from enum");
|
||||
|
||||
Assert.AreEqual("439235bf-48fa-4ee3-9c11-d67084a01205",
|
||||
factory.Hotfix(HotfixFactory.HotfixableServerVersion.ElyFalcon).UUID,
|
||||
"Ely/Falcon UUID lookup from enum");
|
||||
Assert.AreEqual("c79166a9-c71d-4c3f-9cca-019a274e8d87",
|
||||
factory.Hotfix(HotfixFactory.HotfixableServerVersion.ElyJura).UUID,
|
||||
"Ely-Jura UUID lookup from enum");
|
||||
}
|
||||
|
||||
[Test]
|
||||
@ -101,12 +101,12 @@ namespace XenAdminTests.UnitTests.Diagnostics
|
||||
"Dundee Filename lookup from enum");
|
||||
|
||||
Assert.AreEqual("RPU004",
|
||||
factory.Hotfix(HotfixFactory.HotfixableServerVersion.ElyFalcon).Filename,
|
||||
"Ely/Falcon Filename lookup from enum");
|
||||
factory.Hotfix(HotfixFactory.HotfixableServerVersion.ElyJura).Filename,
|
||||
"Ely-Jura Filename lookup from enum");
|
||||
}
|
||||
|
||||
[Test]
|
||||
[TestCase("2.3.50", Description = "Inverness")]
|
||||
[TestCase("2.5.50", Description = "Kolkata")]
|
||||
[TestCase("9999.9999.9999", Description = "Future")]
|
||||
public void TestPlatformVersionNumbersInvernessOrGreaterGiveNulls(string platformVersion)
|
||||
{
|
||||
@ -116,7 +116,9 @@ namespace XenAdminTests.UnitTests.Diagnostics
|
||||
}
|
||||
|
||||
[Test]
|
||||
[TestCase("2.3.50", Description = "Inverness", Result = false)]
|
||||
[TestCase("2.5.50", Description = "Kolkata", Result = false)]
|
||||
[TestCase("2.5.0", Description = "Jura", Result = true)]
|
||||
[TestCase("2.4.0", Description = "Inverness", Result = true)]
|
||||
[TestCase("2.3.0", Description = "Falcon", Result = true)]
|
||||
[TestCase("2.1.1", Description = "Ely", Result = true)]
|
||||
[TestCase("2.0.0", Description = "Dundee", Result = true)]
|
||||
|
Loading…
Reference in New Issue
Block a user