Skip to content

Commit 9da07ac

Browse files
committed
Use GetAssetName to generate random value in "create subdef" test.
1 parent 9ffb26b commit 9da07ac

File tree

3 files changed

+455
-5364
lines changed

3 files changed

+455
-5364
lines changed

src/ResourceManager/SubscriptionDefinition/Commands.SubscriptionDefinition.Test/ScenarioTests/SubscriptionDefinitionTests.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,10 @@
1212
// limitations under the License.
1313
// ----------------------------------------------------------------------------------
1414

15-
using Microsoft.Azure.Commands.SubscriptionDefinition.Test.ScenarioTests.ScenarioTest;
1615
using Microsoft.Azure.Commands.ScenarioTest;
16+
using Microsoft.Azure.Commands.SubscriptionDefinition.Test.ScenarioTests.ScenarioTest;
1717
using Microsoft.WindowsAzure.Commands.ScenarioTest;
1818
using Xunit;
19-
using Microsoft.WindowsAzure.Commands.Test.Utilities.Common;
20-
using Microsoft.Azure.Test;
21-
using System;
2219

2320
namespace Microsoft.Azure.Commands.SubscriptionDefinition.Test.ScenarioTests
2421
{

src/ResourceManager/SubscriptionDefinition/Commands.SubscriptionDefinition.Test/ScenarioTests/SubscriptionDefinitionTests.ps1

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,7 @@ function Test-NewSubscriptionDefinition
4747
$definitions = Get-AzureRmSubscriptionDefinition
4848
$previousDefinitionCount = $definitions.Count
4949

50-
if ($env:AZURE_TEST_MODE -eq "Record")
51-
{
52-
$myNewSubDefName = "testsub" + [Guid]::NewGuid().ToString().Remove(5)
53-
}
54-
else
55-
{
56-
$myNewSubDefName = "MyTestSubDef1"
57-
}
50+
$myNewSubDefName = GetAssetName
5851

5952
$definition = New-AzureRmSubscriptionDefinition -Name $myNewSubDefName -OfferType MS-AZR-0017P
6053

0 commit comments

Comments
 (0)