mirror of
https://github.com/sdkman/sdkman-cli.git
synced 2026-06-07 23:37:27 -04:00
FIX - Broken tests repaired after SDK bin folder changes.
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -92,4 +92,9 @@ class SdkCompatibilitySpec extends Specification {
|
||||
candidateCurrentDir.toString()
|
||||
}
|
||||
|
||||
void cleanup(){
|
||||
println bash.output
|
||||
bash.stop()
|
||||
assert sdkmanBaseDirectory.deleteDir()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user