Add non-reg tests for Nexus proxies

Ensure everything work fine again with those (things went bad at
1.0.0-RC1, because of the use of directory listings, that may not be
exhaustive in proxies - or may be just empty, e.g. currently with nexus 3)
This commit is contained in:
Alexandre Archambault
2017-05-31 21:19:27 +02:00
parent 1cd57c071b
commit f5ef7d8179
11 changed files with 316 additions and 84 deletions
@@ -675,16 +675,47 @@ class Helper(
val task = Task.gatherUnordered(tasks)
val results = task.unsafePerformSync
val errors = results.collect{case (artifact, -\/(err)) => artifact -> err }
val files0 = results.collect{case (artifact, \/-(f)) => f }
val (ignoredErrors, errors) = results
.collect {
case (artifact, -\/(err)) =>
artifact -> err
}
.partition {
case (a, err) =>
val notFound = err match {
case _: FileError.NotFound => true
case _ => false
}
a.isOptional && notFound
}
val files0 = results.collect {
case (artifact, \/-(f)) =>
f
}
logger.foreach(_.stop())
if (verbosityLevel >= 2)
errPrintln(
" Ignoring error(s):\n" +
ignoredErrors
.map {
case (artifact, error) =>
s"${artifact.url}: $error"
}
.mkString("\n")
)
exitIf(errors.nonEmpty) {
s" Error:\n" +
errors.map { case (artifact, error) =>
s"${artifact.url}: $error"
}.mkString("\n")
errors
.map {
case (artifact, error) =>
s"${artifact.url}: $error"
}
.mkString("\n")
}
files0