Skip to content

Commit 6c3816c

Browse files
brnleehngSumanan
authored andcommitted
Updated Batch Account cmdlets to use Tag Conversion Helper (Azure#2651)
* Importing tags module into Batch module * Using common tags library * Added test changes for tag conversion helper Adding LogicApps Powershell SDK for API 2016-06-01. (Azure#2653) * Adding LogicApps Powershell SDK for API 2016-06-01. * Updating tests, help, and formatting in LogicApps SDK. * Updating LogicApps PS module version. [AzureRT] Sprint 62 (Azure#2682) * Re-record failed Compute tests * Fix service name issue for Set-AzureServicDiagnosticsExtension cmdlet Azure#267 * Update test clean for RDFE service management tests. * Update Tags parameter so that it does not get from pipeline. * Update cloud exception error output * Update the failed test * Fix setting default storage account name. Updating Tag usage in SQL cmdlets (Azure#2667) * Converting Tags usage. * added some cmdlets that I missed previously for tags update powershell cmdlets for OperationalInsights/Workspaces/DataSources (Azure#2671) * reference to newer version, also add dataModel * Coding complete, some sort of tested. * bug fixes * rename some class to avoid confusion * add more test coverage * test recording ready * localize error string to resource file, fix comments * fix sdk ref version * re-recording test * Add help doc * fix comments * mssing reak condition Aligned Profile version reference in the packages. (Azure#2686) * Aligned Profile version reference in the packages. * Removed reference to Microsoft.Azure.Common.Authentication nuget package in test projects. Updated Set-AzureRmVMChefExtension cmd implementation to pass settings file as hash Fixed client.rb file parsing error Fixed parsing issues when options like chef_server_url and validation_client_name are passed separately Added tests without recording Added Remove-AzureRmVMChefExtension command in ARM Implemented Get-AzureRmVMChefExtension command Updated specs to test Remove-AzureRmVMChefExtension and Get-AzureRmVMChefExtension Added BootstrapVersion and UninstallChefClient options Fetching latest extension version Removed unwanted options and updated help file Removed specs for now Updated helpfile for Get-AzureRmVMChefExtension and Remove-AzureRmVMChefExtension Added license header Added SupportsShouldProcess and ConfirmAction
1 parent 4a4aeca commit 6c3816c

File tree

200 files changed

+35278
-13309
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

200 files changed

+35278
-13309
lines changed

src/Common/Commands.ScenarioTests.Common/Assert.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function Assert-ThrowsContains
6767
}
6868
catch
6969
{
70-
if ($message -ne "")
70+
if ($compare -ne "")
7171
{
7272
$actualMessage = $_.Exception.Message
7373
Write-Output ("Caught exception: '$actualMessage'")
@@ -105,7 +105,7 @@ function Assert-ThrowsLike
105105
}
106106
catch
107107
{
108-
if ($message -ne "")
108+
if ($compare -ne "")
109109
{
110110
$actualMessage = $_.Exception.Message
111111
Write-Output ("Caught exception: '$actualMessage'")

src/ResourceManager/AzureBatch/Commands.Batch.Test/BatchTestHelpers.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
using System.Reflection;
2828
using System.Threading.Tasks;
2929
using Microsoft.Azure.Commands.Batch.Models;
30+
using Microsoft.Azure.Commands.ResourceManager.Common.Tags;
3031
using Xunit;
3132
using ProxyModels = Microsoft.Azure.Batch.Protocol.Models;
3233

@@ -69,7 +70,7 @@ public static AccountResource CreateAccountResource(string accountName, string r
6970

7071
if (tags != null)
7172
{
72-
resource.Tags = Microsoft.Azure.Commands.Batch.Helpers.CreateTagDictionary(tags, true);
73+
resource.Tags = TagsConversionHelper.CreateTagDictionary(tags, true);
7374
}
7475

7576
return resource;

src/ResourceManager/AzureBatch/Commands.Batch.Test/ScenarioTests/BatchAccountTests.ps1

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,22 @@ function Test-CreatesNewBatchAccount
3131
$account = Get-BatchAccountName
3232
$resourceGroup = Get-ResourceGroupName
3333
$location = Get-BatchAccountProviderLocation
34+
$tagName = "testtag"
35+
$tagValue = "testval"
3436

3537
try
3638
{
3739
New-AzureRmResourceGroup -Name $resourceGroup -Location $location
3840

3941
# Test
40-
$actual = New-AzureRmBatchAccount -Name $account -ResourceGroupName $resourceGroup -Location $location -Tag @{Name = "testtag"; Value = "testval"}
42+
$actual = New-AzureRmBatchAccount -Name $account -ResourceGroupName $resourceGroup -Location $location -Tag @{$tagName = $tagValue}
4143
$expected = Get-AzureRmBatchAccount -Name $account -ResourceGroupName $resourceGroup
4244

4345
# Assert
4446
Assert-AreEqual $expected.AccountName $actual.AccountName
4547
Assert-AreEqual $expected.ResourceGroupName $actual.ResourceGroupName
4648
Assert-AreEqual $expected.Location $actual.Location
47-
Assert-AreEqual $expected.Tags[0]["Name"] $actual.Tags[0]["Name"]
48-
Assert-AreEqual $expected.Tags[0]["Value"] $actual.Tags[0]["Value"]
49+
Assert-AreEqual $expected.Tags[0][$tagName] $actual.Tags[0][$tagName]
4950
Assert-True { $actual.CoreQuota -gt 0 }
5051
Assert-True { $actual.PoolQuota -gt 0 }
5152
Assert-True { $actual.ActiveJobAndJobScheduleQuota -gt 0 }
@@ -78,22 +79,21 @@ function Test-UpdatesExistingBatchAccount
7879
New-AzureRmResourceGroup -Name $resourceGroup -Location $location
7980

8081
#Test
81-
$new = New-AzureRmBatchAccount -Name $account -ResourceGroupName $resourceGroup -Location $location -Tag @{Name = $tagName1; Value = $tagValue1}
82+
$new = New-AzureRmBatchAccount -Name $account -ResourceGroupName $resourceGroup -Location $location -Tag @{$tagName1 = $tagValue1}
8283
Assert-AreEqual 1 $new.Tags.Count
8384

8485
# Update Tag
85-
$actual = Set-AzureRmBatchAccount -Name $account -ResourceGroupName $resourceGroup -Tag @{Name = $tagName2; Value = $tagValue2}
86+
$actual = Set-AzureRmBatchAccount -Name $account -ResourceGroupName $resourceGroup -Tag @{$tagName2 = $tagValue2}
8687
$expected = Get-AzureRmBatchAccount -Name $account -ResourceGroupName $resourceGroup
8788

8889
# Assert
8990
Assert-AreEqual $expected.AccountName $actual.AccountName
9091
Assert-AreEqual $expected.ResourceGroupName $actual.ResourceGroupName
9192
Assert-AreEqual $expected.Location $actual.Location
9293
Assert-AreEqual 1 $expected.Tags.Count
93-
Assert-AreEqual $tagName2 $expected.Tags[0]["Name"]
94-
Assert-AreEqual $tagValue2 $expected.Tags[0]["Value"]
95-
Assert-AreEqual $expected.Tags[0]["Name"] $actual.Tags[0]["Name"]
96-
Assert-AreEqual $expected.Tags[0]["Value"] $actual.Tags[0]["Value"]
94+
Assert-AreEqual $tagValue2 $expected.Tags[0][$tagName2]
95+
Assert-AreEqual $expected.Tags[0][$tagName2] $actual.Tags[0][$tagName2]
96+
9797
}
9898
finally
9999
{
@@ -179,13 +179,15 @@ function Test-BatchAccountKeys
179179
$account = Get-BatchAccountName
180180
$resourceGroup = Get-ResourceGroupName
181181
$location = Get-BatchAccountProviderLocation
182+
$tagName = "testtag"
183+
$tagValue = "testval"
182184

183185
try
184186
{
185187
New-AzureRmResourceGroup -Name $resourceGroup -Location $location
186188

187189
# Test
188-
$new = New-AzureRmBatchAccount -Name $account -ResourceGroupName $resourceGroup -Location $location -Tag @{Name = "testtag"; Value = "testval"}
190+
$new = New-AzureRmBatchAccount -Name $account -ResourceGroupName $resourceGroup -Location $location -Tag @{$tagName = $tagValue}
189191
$originalKeys = Get-AzureRmBatchAccountKeys -Name $account -ResourceGroupName $resourceGroup
190192
$originalPrimaryKey = $originalKeys.PrimaryAccountKey
191193
$originalSecondaryKey = $originalKeys.SecondaryAccountKey

src/ResourceManager/AzureBatch/Commands.Batch/Accounts/Helpers.cs

Lines changed: 4 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -21,93 +21,15 @@
2121
using System.Collections.Generic;
2222
using System.Linq;
2323
using System.Text;
24-
using Microsoft.Rest.Azure;
24+
using Microsoft.Azure.Commands.ResourceManager.Common.Tags;
2525

2626
namespace Microsoft.Azure.Commands.Batch
2727
{
2828
internal class Helpers
2929
{
3030
// copied from Resources\Commands.Resources
31-
3231
private const string ExcludedTagPrefix = "hidden-related:/";
3332

34-
public static PSTagValuePair Create(Hashtable hashtable)
35-
{
36-
if (hashtable == null ||
37-
!hashtable.ContainsKey("Name"))
38-
{
39-
return null;
40-
}
41-
42-
PSTagValuePair tagValue = new PSTagValuePair();
43-
tagValue.Name = hashtable["Name"].ToString();
44-
45-
if (hashtable.ContainsKey("Value"))
46-
{
47-
tagValue.Value = hashtable["Value"].ToString();
48-
}
49-
50-
return tagValue;
51-
}
52-
53-
public static Dictionary<string, string> CreateTagDictionary(Hashtable[] hashtableArray, bool validate)
54-
{
55-
Dictionary<string, string> tagDictionary = null;
56-
if (hashtableArray != null && hashtableArray.Length > 0)
57-
{
58-
tagDictionary = new Dictionary<string, string>();
59-
foreach (var tag in hashtableArray)
60-
{
61-
var tagValuePair = Create(tag);
62-
if (tagValuePair != null)
63-
{
64-
if (tagValuePair.Value != null)
65-
{
66-
tagDictionary[tagValuePair.Name] = tagValuePair.Value;
67-
}
68-
else
69-
{
70-
tagDictionary[tagValuePair.Name] = "";
71-
}
72-
}
73-
}
74-
}
75-
76-
if (validate)
77-
{
78-
if (hashtableArray != null && hashtableArray.Length > 0 && hashtableArray[0].Count > 0 &&
79-
(tagDictionary == null || tagDictionary.Count == 0))
80-
{
81-
throw new ArgumentException(Resources.InvalidTagFormat);
82-
}
83-
if (hashtableArray != null && hashtableArray.Length > 0 && hashtableArray[0].Count > 0 &&
84-
(tagDictionary == null || hashtableArray.Length != tagDictionary.Count))
85-
{
86-
throw new ArgumentException(Resources.InvalidTagFormatNotUniqueName);
87-
}
88-
}
89-
90-
return tagDictionary;
91-
}
92-
93-
public static Hashtable[] CreateTagHashtable(IDictionary<string, string> dictionary)
94-
{
95-
List<Hashtable> tagHashtable = new List<Hashtable>();
96-
if (dictionary != null)
97-
{
98-
foreach (string key in dictionary.Keys)
99-
{
100-
tagHashtable.Add(new Hashtable
101-
{
102-
{"Name", key},
103-
{"Value", dictionary[key]}
104-
});
105-
}
106-
}
107-
108-
return tagHashtable.ToArray();
109-
}
110-
11133
public static string FormatTagsTable(Hashtable[] tags)
11234
{
11335
if (tags == null)
@@ -130,13 +52,11 @@ public static string FormatTagsTable(Hashtable[] tags)
13052
string rowFormat = "{0, -" + maxNameLength + "} {1, -" + maxValueLength + "}\r\n";
13153
resourcesTable.AppendLine();
13254
resourcesTable.AppendFormat(rowFormat, "Name", "Value");
133-
resourcesTable.AppendFormat(rowFormat,
134-
GeneralUtilities.GenerateSeparator(maxNameLength, "="),
135-
GeneralUtilities.GenerateSeparator(maxValueLength, "="));
13655

13756
foreach (Hashtable tag in tags)
13857
{
139-
PSTagValuePair tagValuePair = Helpers.Create(tag);
58+
PSTagValuePair tagValuePair = TagsConversionHelper.Create(tag);
59+
14060
if (tagValuePair != null)
14161
{
14262
if (tagValuePair.Name.StartsWith(ExcludedTagPrefix))
@@ -166,7 +86,7 @@ public static bool MatchesTag(AccountResource account, Hashtable tag)
16686
{
16787
if (tag != null && tag.Count >= 1)
16888
{
169-
PSTagValuePair tagValuePair = Helpers.Create(tag);
89+
PSTagValuePair tagValuePair = TagsConversionHelper.Create(tag);
17090
if (tagValuePair == null)
17191
{
17292
throw new ArgumentException(Resources.InvalidTagFormat);

src/ResourceManager/AzureBatch/Commands.Batch/Commands.Batch.csproj

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,6 @@
301301
<Compile Include="Models.Generated\PSResourceStatistics.cs" />
302302
<Compile Include="Models.Generated\PSStartTask.cs" />
303303
<Compile Include="Models.Generated\PSStartTaskInformation.cs" />
304-
<Compile Include="Models\PSTagValuePair.cs" />
305304
<Compile Include="Models.Generated\PSTaskConstraints.cs" />
306305
<Compile Include="Models.Generated\PSTaskExecutionInformation.cs" />
307306
<Compile Include="Models.Generated\PSTaskInformation.cs" />

src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchAccountContext.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
using System.Collections;
2222
using System.Net.Http;
2323
using System.Threading;
24+
using Microsoft.Azure.Commands.ResourceManager.Common.Tags;
2425

2526
namespace Microsoft.Azure.Commands.Batch
2627
{
@@ -178,7 +179,7 @@ internal void ConvertAccountResourceToAccountContext(AccountResource resource)
178179
this.AccountEndpoint = accountEndpoint;
179180
this.Location = resource.Location;
180181
this.State = resource.ProvisioningState.ToString();
181-
this.Tags = Helpers.CreateTagHashtable(resource.Tags);
182+
this.Tags = TagsConversionHelper.CreateTagHashtable(resource.Tags);
182183
this.CoreQuota = resource.CoreQuota;
183184
this.PoolQuota = resource.PoolQuota;
184185
this.ActiveJobAndJobScheduleQuota = resource.ActiveJobAndJobScheduleQuota;

src/ResourceManager/AzureBatch/Commands.Batch/Models/BatchClient.Accounts.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
using System.Linq;
2323
using System.Net.Http;
2424
using Microsoft.Azure.Batch;
25+
using Microsoft.Azure.Commands.ResourceManager.Common.Tags;
2526
using Microsoft.Rest.Azure;
2627
using CloudException = Hyak.Common.CloudException;
2728

@@ -40,7 +41,7 @@ public partial class BatchClient
4041
/// <returns>A BatchAccountContext object representing the new account</returns>
4142
public virtual BatchAccountContext CreateAccount(string resourceGroupName, string accountName, string location, Hashtable[] tags, string autoStorageAccountId)
4243
{
43-
Dictionary<string, string> tagDictionary = Helpers.CreateTagDictionary(tags, validate: true);
44+
Dictionary<string, string> tagDictionary = TagsConversionHelper.CreateTagDictionary(tags, validate: true);
4445

4546
AutoStorageBaseProperties autoStorage = (string.IsNullOrEmpty(autoStorageAccountId)) ? null : new AutoStorageBaseProperties
4647
{
@@ -74,8 +75,8 @@ public virtual BatchAccountContext UpdateAccount(string resourceGroupName, strin
7475
resourceGroupName = GetGroupForAccount(accountName);
7576
}
7677

77-
Dictionary<string, string> tagDictionary = Helpers.CreateTagDictionary(tags, validate: true);
78-
78+
Dictionary<string, string> tagDictionary = TagsConversionHelper.CreateTagDictionary(tags, validate: true);
79+
7980
// need to the location in order to call
8081
var getResponse = BatchManagementClient.Account.Get(resourceGroupName, accountName);
8182

src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin.Test/Commands.AzureStackAdmin.Test.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,10 +66,6 @@
6666
<Reference Include="Microsoft.Azure.Common">
6767
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll</HintPath>
6868
</Reference>
69-
<Reference Include="Microsoft.Azure.Common.Authentication">
70-
<HintPath>..\..\..\packages\Microsoft.Azure.Common.Authentication.1.6.1-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
71-
<Private>True</Private>
72-
</Reference>
7369
<Reference Include="Microsoft.Azure.Common.NetFramework">
7470
<HintPath>..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.NetFramework.dll</HintPath>
7571
</Reference>

src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin.Test/Common/Commands.AzureStackAdmin.Test.Common.csproj

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,10 +72,6 @@
7272
<Reference Include="Microsoft.Azure.Common">
7373
<HintPath>..\..\..\..\packages\Microsoft.Azure.Common.2.1.0\lib\net45\Microsoft.Azure.Common.dll</HintPath>
7474
</Reference>
75-
<Reference Include="Microsoft.Azure.Common.Authentication">
76-
<SpecificVersion>False</SpecificVersion>
77-
<HintPath>..\..\..\..\packages\Microsoft.Azure.Common.Authentication.1.6.1-preview\lib\net45\Microsoft.Azure.Common.Authentication.dll</HintPath>
78-
</Reference>
7975
<Reference Include="Microsoft.AzureStack.Management">
8076
<HintPath>..\..\..\..\packages\Microsoft.AzureStack.Management.0.9.1-preview\lib\net45\Microsoft.AzureStack.Management.dll</HintPath>
8177
</Reference>

src/ResourceManager/AzureStackAdmin/Commands.AzureStackAdmin.Test/Common/packages.config

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
<package id="Microsoft.Azure.Test.Framework" version="1.0.6047.28041-prerelease" targetFramework="net45" />
88
<package id="Microsoft.Azure.Test.HttpRecorder" version="1.6.6-preview" targetFramework="net45" />
99
<package id="Microsoft.AzureStack.Management.Storage" version="0.9.2-preview" targetFramework="net45" />
10+
<package id="Microsoft.Azure.Gallery" version="2.6.2-preview" targetFramework="net45" />
11+
<package id="Microsoft.Azure.Management.Authorization" version="2.0.0" targetFramework="net45" />
1012
<package id="Microsoft.Bcl" version="1.1.9" targetFramework="net45" />
1113
<package id="Microsoft.Bcl.Async" version="1.0.168" targetFramework="net45" />
1214
<package id="Microsoft.Bcl.Build" version="1.0.14" targetFramework="net45" />

src/ResourceManager/Cdn/Commands.Cdn.Test/packages.config

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
<package id="Hyak.Common" version="1.0.3" targetFramework="net45" />
44
<package id="Microsoft.Azure.Management.Cdn" version="1.1.0" targetFramework="net45" />
55
<package id="Microsoft.Azure.Common" version="2.1.0" targetFramework="net45" />
6-
<package id="Microsoft.Azure.Common.Authentication" version="1.5.2-preview" targetFramework="net45" />
76
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
87
<package id="Microsoft.Azure.Gallery" version="2.6.2-preview" targetFramework="net45" />
98
<package id="Microsoft.Azure.Management.Authorization" version="1.0.0" targetFramework="net45" />

src/ResourceManager/Cdn/Commands.Cdn/Microsoft.Azure.Commands.Cdn.dll-help.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ CLRVersion='4.0'
4545
ProcessorArchitecture = 'None'
4646

4747
# Modules that must be imported into the global environment prior to importing this module
48-
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.5'})
48+
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.11'})
4949

5050
# Assemblies that must be loaded prior to importing this module
5151
RequiredAssemblies = @()

src/ResourceManager/Cdn/Commands.Cdn/packages.config

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<packages>
33
<package id="Hyak.Common" version="1.0.3" targetFramework="net45" />
44
<package id="Microsoft.Azure.Common" version="2.1.0" targetFramework="net45" />
5-
<package id="Microsoft.Azure.Common.Authentication" version="1.5.2-preview" targetFramework="net45" />
65
<package id="Microsoft.Azure.Common.Dependencies" version="1.0.0" targetFramework="net45" />
76
<package id="Microsoft.Azure.Management.Resources" version="2.20.0-preview" targetFramework="net45" />
87
<package id="Microsoft.Azure.Management.Cdn" version="1.1.0" targetFramework="net45" />

src/ResourceManager/CognitiveServices/AzureRM.CognitiveServices.psd1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ CLRVersion='4.0'
4848
# ProcessorArchitecture = ''
4949

5050
# Modules that must be imported into the global environment prior to importing this module
51-
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.10'})
51+
RequiredModules = @( @{ ModuleName = 'AzureRM.Profile'; ModuleVersion = '1.0.11'})
5252

5353
# Assemblies that must be loaded prior to importing this module
5454
# RequiredAssemblies = @()

src/ResourceManager/Compute/Commands.Compute.Test/Commands.Compute.Test.csproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,9 @@
421421
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineProfileTests\TestVirtualMachineProfile.json">
422422
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
423423
</None>
424+
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineTests\TestVirtualMachineCaptureNegative.json">
425+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
426+
</None>
424427
<None Include="SessionRecords\Microsoft.Azure.Commands.Compute.Test.ScenarioTests.VirtualMachineTests\TestVirtualMachineDataDisk.json">
425428
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
426429
</None>
@@ -504,4 +507,4 @@
504507
</ItemGroup>
505508
<ItemGroup />
506509
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
507-
</Project>
510+
</Project>

src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/ComputeCloudExceptionTests.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function Run-ComputeCloudExceptionTests
2323
$loc = Get-ComputeVMLocation;
2424
New-AzureRmResourceGroup -Name $rgname -Location $loc -Force;
2525

26-
$compare = "*Resource*not found*OperationID : `'*`'";
26+
$compare = "*Resource*not found*OperationID : *";
2727
Assert-ThrowsLike { $s1 = Get-AzureRmVM -ResourceGroupName $rgname -Name 'test' } $compare;
2828
Assert-ThrowsLike { $s2 = Get-AzureRmVM -ResourceGroupName 'foo' -Name 'bar' } $compare;
2929
Assert-ThrowsLike { $s3 = Get-AzureRmAvailabilitySet -ResourceGroupName $rgname -Name 'test' } $compare;

src/ResourceManager/Compute/Commands.Compute.Test/ScenarioTests/VirtualMachineTests.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,13 @@ public void TestVirtualMachineCapture()
8787
ComputeTestController.NewInstance.RunPsTest("Test-VirtualMachineCapture");
8888
}
8989

90+
[Fact]
91+
[Trait(Category.AcceptanceType, Category.CheckIn)]
92+
public void TestVirtualMachineCaptureNegative()
93+
{
94+
ComputeTestController.NewInstance.RunPsTest("Test-VirtualMachineCaptureNegative");
95+
}
96+
9097
[Fact]
9198
[Trait(Category.AcceptanceType, Category.CheckIn)]
9299
public void TestVirtualMachineDataDisk()

0 commit comments

Comments
 (0)