Minor tweaks to auto install configuration and cukes.

This commit is contained in:
Marco Vermeulen
2013-01-26 07:11:47 +00:00
parent 3d9ad360ad
commit 22cec73231
5 changed files with 6 additions and 6 deletions

View File

@@ -31,7 +31,7 @@ function __gvmtool_install {
if [[ ${VERSION_VALID} == 'valid' ]]; then
__gvmtool_install_candidate_version "${CANDIDATE}" "${VERSION}" || return 1
if [[ -z "${gvm_auto_answer}" ]]; then
if [[ "${gvm_auto_answer}" != 'true' ]]; then
echo -n "Do you want ${CANDIDATE} ${VERSION} to be set as default? (Y/n): "
read USE
fi

View File

@@ -24,7 +24,7 @@ function __gvmtool_use {
if [[ "${GVM_ONLINE}" == "true" && ! -d "${GVM_DIR}/${CANDIDATE}/${VERSION}" ]]; then
echo ""
echo "Stop! ${CANDIDATE} ${VERSION} is not installed."
if [[ -z "${gvm_auto_answer}" ]]; then
if [[ "${gvm_auto_answer}" != 'true' ]]; then
echo -n "Do you want to install it now? (Y/n): "
read INSTALL
fi

View File

@@ -32,7 +32,7 @@ Feature: Install Candidate
Then the candidate "grails" version "2.1.0" should be the default
Scenario: Install a candidate and select to use it automatically
And I have configured autoinstall="Y"
And I have configured "gvm_auto_answer" to "true"
When I enter "gvm install grails 2.1.0"
Then the candidate "grails" version "2.1.0" is installed
And I see "Done installing!"

View File

@@ -21,7 +21,7 @@ Feature: Use and Default Candidate
And the candidate "groovy" version "1.8.8" should be in use
Scenario: Use a candidate version that is automatically installed
And I have configured autoinstall="Y"
And I have configured "gvm_auto_answer" to "true"
When I enter "gvm use groovy 1.8.8"
Then I see "Stop! groovy 1.8.8 is not installed."
Then I see "Using groovy version 1.8.8 in this shell."

View File

@@ -80,9 +80,9 @@ And(~'^the candidate "([^"]*)" version "([^"]*)" is already linked to "([^"]*)"$
Files.createSymbolicLink(link, target)
}
And(~'^I have configured autoinstall="([^"]*)"$') { String flag ->
And(~'^I have configured "([^"]*)" to "([^"]*)"$') { String configName, String flag ->
def configFile = new File("$gvmDir/etc/config")
configFile.write "gvm_auto_answer=${flag}"
configFile.write "${configName}=${flag}"
}
private prepareCandidateFolder(String baseDir, String candidate, String version) {