Skip to content

Commit 6306bba

Browse files
committed
Merged PR 180: Fixing logic trap
- Updated - Changes the -or to a -and to make sure we skipp Endpoitns that dont exist
1 parent 0eff79c commit 6306bba

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

inheritedprocessmigration/vCurrent/processmigratestart-debug.ps1

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ $erroractionpreference='stop'
4242
# Command
4343
$env:INPUT_command = $TestData.command
4444
# Source Account
45-
$env:INPUT_sourceAccount = 'EP1'
46-
$env:ENDPOINT_URL_EP1 = $TestData.sourceAccountUrl
47-
$env:ENDPOINT_AUTH_EP1 = "{ `"Parameters`": { `"ApiToken`": `"$($TestData.sourceAccountToken)`"}, `"Scheme`": `"Token`" }"
48-
$env:ENDPOINT_DATA_EP1 = '{ "Key1": "Value1", "Key2": "Value2" }'
45+
#$env:INPUT_sourceAccount = 'EP1'
46+
#$env:ENDPOINT_URL_EP1 = $TestData.sourceAccountUrl
47+
#$env:ENDPOINT_AUTH_EP1 = "{ `"Parameters`": { `"ApiToken`": `"$($TestData.sourceAccountToken)`"}, `"Scheme`": `"Token`" }"
48+
#$env:ENDPOINT_DATA_EP1 = '{ "Key1": "Value1", "Key2": "Value2" }'
4949
# sourceProcessName
50-
$env:INPUT_sourceProcessName = $TestData.sourceProcessName
50+
#$env:INPUT_sourceProcessName = $TestData.sourceProcessName
5151
# Target Account
5252
$env:INPUT_targetAccount = 'EP2'
5353
$env:ENDPOINT_URL_EP2 = $TestData.targetAccountUrl

inheritedprocessmigration/vCurrent/processmigratestart.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ $command = Get-VstsInput -Name command -Require
66

77
# sourceAccount
88
$sourceAccountName = Get-VstsInput -Name sourceAccount
9-
if ($sourceAccountName -ne $null -or $sourceAccountName -ne "")
9+
if ($sourceAccountName -ne $null -and $sourceAccountName -ne "")
1010
{
1111
$sourceAccountEp = Get-VstsEndpoint -Name $sourceAccountName
1212
$sourceAccountToken = [string]$sourceAccountEp.Auth.Parameters.ApiToken
@@ -17,7 +17,7 @@ if ($sourceAccountName -ne $null -or $sourceAccountName -ne "")
1717
$sourceProcessName = Get-VstsInput -Name sourceProcessName
1818
# TargetAccount
1919
$targetAccountName = Get-VstsInput -Name targetAccount
20-
if ($targetAccountName -ne $null -or $targetAccountName -ne "")
20+
if ($targetAccountName -ne $null -and $targetAccountName -ne "")
2121
{
2222
$targetAccountEp = Get-VstsEndpoint -Name $targetAccountName
2323
$targetAccountToken = [string]$targetAccountEp.Auth.Parameters.ApiToken

0 commit comments

Comments
 (0)