mirror of
https://github.com/ethauvin/kobalt.git
synced 2025-04-26 08:27:12 -07:00
Fix hosts for ResolveDependency.
This commit is contained in:
parent
8e583c5a73
commit
75dda87fdd
9 changed files with 50 additions and 65 deletions
|
@ -5,6 +5,7 @@ import com.beust.kobalt.KobaltTest
|
|||
import com.beust.kobalt.maven.aether.KobaltMavenResolver
|
||||
import com.beust.kobalt.misc.KobaltExecutors
|
||||
import com.beust.kobalt.misc.warn
|
||||
import org.assertj.core.api.Assertions.assertThat
|
||||
import org.testng.Assert
|
||||
import org.testng.annotations.BeforeClass
|
||||
import org.testng.annotations.Test
|
||||
|
@ -150,10 +151,9 @@ class DownloadTest @Inject constructor(
|
|||
// This id has a parent pom which defines moshi version to be 1.1.0. Make sure that this
|
||||
// version is being fetched instead of moshi:1.2.0-SNAPSHOT (which gets discarded anyway
|
||||
// since snapshots are not allowed to be returned when looking up a versionless id)
|
||||
val host = HostConfig("http://repository.jetbrains.com/all/")
|
||||
val id = "com.squareup.moshi:moshi:1.1.0"
|
||||
val dr = resolver.resolve(id)
|
||||
Assert.assertEquals(dr.dependency.artifact.version, "1.1.0")
|
||||
val artifact = resolver.resolveToArtifact(id)
|
||||
assertThat(artifact.version).isEqualTo("1.1.0")
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -47,11 +47,11 @@ class MavenResolverTest {
|
|||
|
||||
@Test(dataProvider = "rangeProvider")
|
||||
fun kobaltRangeVersion(id: String, expectedVersion: String) {
|
||||
val result = resolver.resolve(id)
|
||||
assertThat(result.dependency.artifact.version).isEqualTo(expectedVersion)
|
||||
val artifact = resolver.resolveToArtifact(id)
|
||||
assertThat(artifact.version).isEqualTo(expectedVersion)
|
||||
}
|
||||
|
||||
// @Test
|
||||
@Test
|
||||
fun aetherShouldNotIncludeOptionalDependencies() {
|
||||
val artifactResults = resolve("com.squareup.retrofit2:converter-jackson:jar:2.1.0")
|
||||
|
||||
|
@ -59,7 +59,7 @@ class MavenResolverTest {
|
|||
assertThat(artifactResults.none { it.toString().contains("android") })
|
||||
}
|
||||
|
||||
// @Test
|
||||
@Test
|
||||
fun kobaltAetherShouldNotIncludeOptionalDependencies() {
|
||||
val dep = resolver.create("com.squareup.retrofit2:converter-jackson:jar:2.1.0", optional = false)
|
||||
val closure = dependencyManager.transitiveClosure(listOf(dep))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue