@@ -181,3 +181,55 @@ function ValidateFactoryProperties ($expected, $actual)
181
181
Assert-AreEqualObjectProperties $expected $actual
182
182
}
183
183
184
+ <#
185
+ . SYNOPSIS
186
+ Creates a data factory with VSTS repo config and then does a Get to verify that both are identical.
187
+ #>
188
+ function Test-CreateDataFactoryV2WithVSTSRepoConfig
189
+ {
190
+ $dfname = Get-DataFactoryName
191
+ $rgname = Get-ResourceGroupName
192
+ $rglocation = Get-ProviderLocation ResourceManagement
193
+ $dflocation = Get-ProviderLocation DataFactoryManagement
194
+
195
+ New-AzResourceGroup - Name $rgname - Location $rglocation - Force
196
+
197
+ try
198
+ {
199
+ $actual = Set-AzDataFactoryV2 - ResourceGroupName $rgname - Name $dfname - Location $dflocation - Force - AccountName " an" - RepositoryName " rn" - CollaborationBranch " cb" - RootFolder " rf" - LastCommitId " lci" - ProjectName " pn"
200
+ $expected = Get-AzDataFactoryV2 - ResourceGroupName $rgname - Name $dfname
201
+
202
+ ValidateFactoryProperties $expected $actual
203
+ }
204
+ finally
205
+ {
206
+ CleanUp $rgname $dfname
207
+ }
208
+ }
209
+
210
+ <#
211
+ . SYNOPSIS
212
+ Creates a data factory with VSTS repo config and then does a Get to verify that both are identical.
213
+ #>
214
+ function Test-CreateDataFactoryV2WithGitHubRepoConfig
215
+ {
216
+ $dfname = Get-DataFactoryName
217
+ $rgname = Get-ResourceGroupName
218
+ $rglocation = Get-ProviderLocation ResourceManagement
219
+ $dflocation = Get-ProviderLocation DataFactoryManagement
220
+
221
+ New-AzResourceGroup - Name $rgname - Location $rglocation - Force
222
+
223
+ try
224
+ {
225
+ $actual = Set-AzDataFactoryV2 - ResourceGroupName $rgname - Name $dfname - Location $dflocation - Force - AccountName " an" - RepositoryName " rn" - CollaborationBranch " cb" - RootFolder " rf" - LastCommitId " lci" - HostName " hn"
226
+ $expected = Get-AzDataFactoryV2 - ResourceGroupName $rgname - Name $dfname
227
+
228
+ ValidateFactoryProperties $expected $actual
229
+ }
230
+ finally
231
+ {
232
+ CleanUp $rgname $dfname
233
+ }
234
+ }
235
+
0 commit comments