FIX - Broken tests repaired after SDK bin folder changes.

This commit is contained in:
Marco Vermeulen
2015-11-20 13:37:03 +00:00
parent 282799ce2c
commit e7da3e8372
2 changed files with 9 additions and 1 deletions

View File

@@ -54,6 +54,8 @@ class CurrentCommandSpec extends Specification {
bash = SdkManBashEnvBuilder
.create(sdkmanBaseDir)
.withCurlStub(curlStub)
.withOnlineMode(true)
.withForcedOfflineMode(false)
.withAvailableCandidates(allCandidates)
.withCandidates(installedCandidates.keySet().toList())
.withVersionToken("x.y.z")
@@ -82,9 +84,10 @@ class CurrentCommandSpec extends Specification {
private prepareFoldersFor(Map installedCandidates) {
installedCandidates.forEach { candidate, version ->
def candidateVersionDir = "$candidatesDir/$candidate/$version"
def candidateVersionBinDir = "$candidateVersionDir/bin"
new File(candidateVersionBinDir).mkdirs()
def candidateVersionPath = Paths.get(candidateVersionDir)
def symlink = Paths.get("$candidatesDir/$candidate/current")
new File(candidateVersionDir).mkdirs()
createSymbolicLink(symlink, candidateVersionPath)
}
}

View File

@@ -92,4 +92,9 @@ class SdkCompatibilitySpec extends Specification {
candidateCurrentDir.toString()
}
void cleanup(){
println bash.output
bash.stop()
assert sdkmanBaseDirectory.deleteDir()
}
}