Fixed Issue 1104

Made changes in configure-integration-tests.ps1. For an optional value
it gives the option to change or remove the value, for a necessary value
it doesn't give an option.
This commit is contained in:
Anubhav10
2016-03-06 14:35:53 +05:30
parent d5a028c7d1
commit 652ef6a193

View File

@@ -1,4 +1,4 @@
# TODO: this should indicate whether a variable is required or optional
# TODO: this should indicate whether a variable is required or optional
function SetVariable([string]$key, [string]$value)
{
@@ -43,21 +43,34 @@ function VerifyEnvironmentVariable([string]$friendlyName, [string]$key, [bool]$o
else
{
Write-Host "$existing_value found as the configured $friendlyName"
$reset = Read-Host -Prompt "Want to change this? Press Y, otherwise we'll move on"
if ($reset -eq "Y")
{
$value = Read-Host -Prompt "Change the $friendlyName to use for the integration tests"
SetVariable $key $value
}
if ($optional -eq $true)
{
$clear = Read-Host -Prompt 'Want to remove this optional value, press Y'
$clear = Read-Host -Prompt 'Want to remove or change this optional value, press Y'
if ($clear -eq "Y")
{
SetVariable $key $null
}
}
$reset = Read-Host -Prompt "Press R to remove and Press C to change the value, otherwise we'll move on"
if ($reset -eq "C")
{
$value = Read-Host -Prompt "Change the $friendlyName to use for the integration tests"
SetVariable $key $value
}
elseif ($reset -eq "R")
{
SetVariable $key $null
}
}
}
else
{
$reset = Read-Host -Prompt "Want to change this value , press Y, otherwise we'll move on"
if ($reset -eq "Y")
{
$value = Read-Host -Prompt "Change the $friendlyName to use for the integration tests"
SetVariable $key $value
}
}
}
Write-Host