You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This fixes the broken remove data source cmdlet, which had inverted
conditional logic that made it impossible to remove either type of data
source.
In addition to this fix, this change includes test cases specific to
testing adding and removing data sources, to ensure this doesn't happen
again.
Finally, all tests were run against production for both DataLake* cmdlet
services so that we have production recordings.
Copy file name to clipboardExpand all lines: src/ResourceManager/Common/Commands.ScenarioTests.ResourceManager.Common/Commands.ScenarioTests.ResourceManager.Common.csproj
Copy file name to clipboardExpand all lines: src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/Commands.DataLakeAnalytics.Test.csproj
Copy file name to clipboardExpand all lines: src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/ScenarioTests/DataLakeAnalyticsTests.cs
+9-4Lines changed: 9 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -24,28 +24,33 @@ public class DataLakeAnalyticsTests : DataLakeAnalyticsTestsBase
Copy file name to clipboardExpand all lines: src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/ScenarioTests/DataLakeAnalyticsTests.ps1
+32-1Lines changed: 32 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,10 @@ function Test-DataLakeAnalyticsAccount
9
9
$resourceGroupName,
10
10
$accountName,
11
11
$dataLakeAccountName,
12
-
$location="West US"
12
+
$secondDataLakeAccountName,
13
+
$blobAccountName,
14
+
$blobAccountKey,
15
+
$location="East US 2"
13
16
)
14
17
15
18
# Creating Account
@@ -87,6 +90,34 @@ function Test-DataLakeAnalyticsAccount
87
90
}
88
91
Assert-True {$found-eq1} "Account created earlier is not found when listing all in subscription."
89
92
93
+
# add a data lake store account to the analytics account
Assert-True {Remove-AzureRmDataLakeAnalyticsDataSource-Account $accountName-DataLakeStore $secondDataLakeAccountName-Force -PassThru} "Remove Data Lake Store account failed."
102
+
103
+
# get the account and ensure that it contains one data lake store
Assert-True {$testStoreAdd.Properties.StorageAccounts-eq$null-or$testStoreAdd.Properties.StorageAccounts.Count-eq0} "Remove blob storage reported success but failed to remove the account."
Copy file name to clipboardExpand all lines: src/ResourceManager/DataLakeAnalytics/Commands.DataLakeAnalytics.Test/ScenarioTests/DataLakeAnalyticsTestsBase.cs
0 commit comments