Skip to content

Commit fd4b1d7

Browse files
author
Ivan Liu
committed
add test to Test-SsisAzure-IntegrationRuntime
1 parent cd3c12d commit fd4b1d7

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

src/DataFactory/DataFactoryV2.Test/ScenarioTests/IntegrationRuntimeTests.ps1

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,33 @@ function Test-SsisAzure-IntegrationRuntime
143143
$secpasswd = ConvertTo-SecureString $catalogAdminPassword -AsPlainText -Force
144144
$mycreds = New-Object System.Management.Automation.PSCredential($catalogAdminUsername, $secpasswd)
145145

146+
# Prepare express custom setup
147+
# Create Cmdkey
148+
$targetName = 'fakeserver'
149+
$userName = 'fakeuser'
150+
$password = New-Object Microsoft.Azure.Management.DataFactory.Models.SecureString('fakepassword')
151+
$setup1 = New-Object Microsoft.Azure.Management.DataFactory.Models.CmdkeySetup($targetName, $userName, $password)
152+
153+
# Create Environment Variable
154+
$variableName = 'name'
155+
$variableValue = 'value'
156+
$setup2 = New-Object Microsoft.Azure.Management.DataFactory.Models.EnvironmentVariableSetup($variableName, $variableValue)
157+
158+
# Create Setup for 3rd party component without license KeyName
159+
$componentName1 = 'componentName1'
160+
$setup3 = New-Object Microsoft.Azure.Management.DataFactory.Models.ComponentSetup($componentName1)
161+
162+
# Create Setup for 3rd party component with license KeyName
163+
$componentName2 = 'componentName2'
164+
$licenseKey = New-Object Microsoft.Azure.Management.DataFactory.Models.SecureString('fakelicensekey')
165+
$setup4 = New-Object Microsoft.Azure.Management.DataFactory.Models.ComponentSetup($componentName2, $licenseKey)
166+
167+
$setups = New-Object System.Collections.ArrayList
168+
$setups.Add($setup1)
169+
$setups.Add($setup2)
170+
$setups.Add($setup3)
171+
$setups.Add($setup4)
172+
146173
$actual = Set-AzDataFactoryV2IntegrationRuntime -ResourceGroupName $rgname `
147174
-DataFactoryName $dfname `
148175
-Name $irname `
@@ -159,6 +186,7 @@ function Test-SsisAzure-IntegrationRuntime
159186
-Edition Enterprise `
160187
-DataProxyIntegrationRuntimeName $proxyIrName `
161188
-DataProxyStagingLinkedServiceName $lsname `
189+
-ExpressCustomSetup $setups `
162190
-Force
163191

164192
$expected = Get-AzDataFactoryV2IntegrationRuntime -ResourceGroupName $rgname `

0 commit comments

Comments
 (0)