mirror of
https://github.com/apple/pkl.git
synced 2026-03-17 23:03:54 +01:00
Replace magic test port 12110 with 0 (#345)
Also introduce constants for some test package SHAs to make them easier to update.
This commit is contained in:
@@ -2,6 +2,6 @@ amends "pkl:Project"
|
||||
|
||||
dependencies {
|
||||
["birds"] {
|
||||
uri = "package://localhost:12110/birds@0.5.0"
|
||||
uri = "package://localhost:0/birds@0.5.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1132,7 +1132,7 @@ result = someLib.x
|
||||
writePklFile(
|
||||
"test.pkl",
|
||||
"""
|
||||
import "package://localhost:12110/birds@0.5.0#/catalog/Swallow.pkl"
|
||||
import "package://localhost:0/birds@0.5.0#/catalog/Swallow.pkl"
|
||||
|
||||
res = Swallow
|
||||
"""
|
||||
@@ -1212,7 +1212,7 @@ result = someLib.x
|
||||
writePklFile(
|
||||
"test.pkl",
|
||||
"""
|
||||
import "package://localhost:12110/birds@0.5.0#/catalog/Swallow.pkl"
|
||||
import "package://localhost:0/birds@0.5.0#/catalog/Swallow.pkl"
|
||||
|
||||
res = Swallow
|
||||
"""
|
||||
|
||||
@@ -49,19 +49,19 @@ class CliPackageDownloaderTest {
|
||||
),
|
||||
packageUris =
|
||||
listOf(
|
||||
PackageUri("package://localhost:12110/birds@0.5.0"),
|
||||
PackageUri("package://localhost:12110/fruit@1.0.5"),
|
||||
PackageUri("package://localhost:12110/fruit@1.1.0")
|
||||
PackageUri("package://localhost:0/birds@0.5.0"),
|
||||
PackageUri("package://localhost:0/fruit@1.0.5"),
|
||||
PackageUri("package://localhost:0/fruit@1.1.0")
|
||||
),
|
||||
noTransitive = true
|
||||
)
|
||||
cmd.run()
|
||||
assertThat(tempDir.resolve("package-1/localhost:12110/birds@0.5.0/birds@0.5.0.zip")).exists()
|
||||
assertThat(tempDir.resolve("package-1/localhost:12110/birds@0.5.0/birds@0.5.0.json")).exists()
|
||||
assertThat(tempDir.resolve("package-1/localhost:12110/fruit@1.0.5/fruit@1.0.5.zip")).exists()
|
||||
assertThat(tempDir.resolve("package-1/localhost:12110/fruit@1.0.5/fruit@1.0.5.json")).exists()
|
||||
assertThat(tempDir.resolve("package-1/localhost:12110/fruit@1.1.0/fruit@1.1.0.zip")).exists()
|
||||
assertThat(tempDir.resolve("package-1/localhost:12110/fruit@1.1.0/fruit@1.1.0.json")).exists()
|
||||
assertThat(tempDir.resolve("package-1/localhost:0/birds@0.5.0/birds@0.5.0.zip")).exists()
|
||||
assertThat(tempDir.resolve("package-1/localhost:0/birds@0.5.0/birds@0.5.0.json")).exists()
|
||||
assertThat(tempDir.resolve("package-1/localhost:0/fruit@1.0.5/fruit@1.0.5.zip")).exists()
|
||||
assertThat(tempDir.resolve("package-1/localhost:0/fruit@1.0.5/fruit@1.0.5.json")).exists()
|
||||
assertThat(tempDir.resolve("package-1/localhost:0/fruit@1.1.0/fruit@1.1.0.zip")).exists()
|
||||
assertThat(tempDir.resolve("package-1/localhost:0/fruit@1.1.0/fruit@1.1.0.json")).exists()
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -86,13 +86,13 @@ class CliPackageDownloaderTest {
|
||||
caCertificates = listOf(FileTestUtils.selfSignedCertificate),
|
||||
testPort = server.port
|
||||
),
|
||||
packageUris = listOf(PackageUri("package://localhost:12110/birds@0.5.0")),
|
||||
packageUris = listOf(PackageUri("package://localhost:0/birds@0.5.0")),
|
||||
noTransitive = true
|
||||
)
|
||||
cmd.run()
|
||||
assertThat(tempDir.resolve(".my-cache/package-1/localhost:12110/birds@0.5.0/birds@0.5.0.zip"))
|
||||
assertThat(tempDir.resolve(".my-cache/package-1/localhost:0/birds@0.5.0/birds@0.5.0.zip"))
|
||||
.exists()
|
||||
assertThat(tempDir.resolve(".my-cache/package-1/localhost:12110/birds@0.5.0/birds@0.5.0.json"))
|
||||
assertThat(tempDir.resolve(".my-cache/package-1/localhost:0/birds@0.5.0/birds@0.5.0.json"))
|
||||
.exists()
|
||||
}
|
||||
|
||||
@@ -108,15 +108,13 @@ class CliPackageDownloaderTest {
|
||||
),
|
||||
packageUris =
|
||||
listOf(
|
||||
PackageUri(
|
||||
"package://localhost:12110/birds@0.5.0::sha256:0a5ad2dc13f06f73f96ba94e8d01d48252bc934e2de71a837620ca0fef8a7453"
|
||||
),
|
||||
PackageUri("package://localhost:0/birds@0.5.0::sha256:${PackageServer.BIRDS_SHA}"),
|
||||
),
|
||||
noTransitive = true
|
||||
)
|
||||
cmd.run()
|
||||
assertThat(tempDir.resolve("package-1/localhost:12110/birds@0.5.0/birds@0.5.0.zip")).exists()
|
||||
assertThat(tempDir.resolve("package-1/localhost:12110/birds@0.5.0/birds@0.5.0.json")).exists()
|
||||
assertThat(tempDir.resolve("package-1/localhost:0/birds@0.5.0/birds@0.5.0.zip")).exists()
|
||||
assertThat(tempDir.resolve("package-1/localhost:0/birds@0.5.0/birds@0.5.0.json")).exists()
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -131,18 +129,18 @@ class CliPackageDownloaderTest {
|
||||
),
|
||||
packageUris =
|
||||
listOf(
|
||||
PackageUri("package://localhost:12110/birds@0.5.0::sha256:intentionallyBogusChecksum"),
|
||||
PackageUri("package://localhost:0/birds@0.5.0::sha256:intentionallyBogusChecksum"),
|
||||
),
|
||||
noTransitive = true
|
||||
)
|
||||
assertThatCode { cmd.run() }
|
||||
.hasMessage(
|
||||
"""
|
||||
Cannot download package `package://localhost:12110/birds@0.5.0` because the computed checksum for package metadata does not match the expected checksum.
|
||||
Cannot download package `package://localhost:0/birds@0.5.0` because the computed checksum for package metadata does not match the expected checksum.
|
||||
|
||||
Computed checksum: "0a5ad2dc13f06f73f96ba94e8d01d48252bc934e2de71a837620ca0fef8a7453"
|
||||
Computed checksum: "${PackageServer.BIRDS_SHA}"
|
||||
Expected checksum: "intentionallyBogusChecksum"
|
||||
Asset URL: "https://localhost:12110/birds@0.5.0"
|
||||
Asset URL: "https://localhost:0/birds@0.5.0"
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
@@ -153,7 +151,7 @@ class CliPackageDownloaderTest {
|
||||
val cmd =
|
||||
CliPackageDownloader(
|
||||
baseOptions = CliBaseOptions(workingDir = tempDir, noCache = true),
|
||||
packageUris = listOf(PackageUri("package://localhost:12110/birds@0.5.0")),
|
||||
packageUris = listOf(PackageUri("package://localhost:0/birds@0.5.0")),
|
||||
noTransitive = true
|
||||
)
|
||||
assertThatCode { cmd.run() }
|
||||
@@ -170,12 +168,12 @@ class CliPackageDownloaderTest {
|
||||
caCertificates = listOf(FileTestUtils.selfSignedCertificate),
|
||||
testPort = server.port
|
||||
),
|
||||
packageUris = listOf(PackageUri("package://localhost:12110/badChecksum@1.0.0")),
|
||||
packageUris = listOf(PackageUri("package://localhost:0/badChecksum@1.0.0")),
|
||||
noTransitive = true
|
||||
)
|
||||
assertThatCode { cmd.run() }
|
||||
.hasMessageStartingWith(
|
||||
"Cannot download package `package://localhost:12110/badChecksum@1.0.0` because the computed checksum does not match the expected checksum."
|
||||
"Cannot download package `package://localhost:0/badChecksum@1.0.0` because the computed checksum does not match the expected checksum."
|
||||
)
|
||||
}
|
||||
|
||||
@@ -191,7 +189,7 @@ class CliPackageDownloaderTest {
|
||||
),
|
||||
packageUris =
|
||||
listOf(
|
||||
PackageUri("package://localhost:12110/badChecksum@1.0.0"),
|
||||
PackageUri("package://localhost:0/badChecksum@1.0.0"),
|
||||
PackageUri("package://bogus.domain/notAPackage@1.0.0")
|
||||
),
|
||||
noTransitive = true
|
||||
@@ -201,12 +199,12 @@ class CliPackageDownloaderTest {
|
||||
"""
|
||||
Failed to download some packages.
|
||||
|
||||
Failed to download package://localhost:12110/badChecksum@1.0.0 because:
|
||||
Cannot download package `package://localhost:12110/badChecksum@1.0.0` because the computed checksum does not match the expected checksum.
|
||||
Failed to download package://localhost:0/badChecksum@1.0.0 because:
|
||||
Cannot download package `package://localhost:0/badChecksum@1.0.0` because the computed checksum does not match the expected checksum.
|
||||
|
||||
Computed checksum: "a6bf858cdd1c09da475c2abe50525902580910ee5cc1ff624999170591bf8f69"
|
||||
Expected checksum: "intentionally bogus checksum"
|
||||
Asset URL: "https://localhost:12110/badChecksum@1.0.0/badChecksum@1.0.0.zip"
|
||||
Asset URL: "https://localhost:0/badChecksum@1.0.0/badChecksum@1.0.0.zip"
|
||||
|
||||
Failed to download package://bogus.domain/notAPackage@1.0.0 because:
|
||||
Exception when making request `GET https://bogus.domain/notAPackage@1.0.0`:
|
||||
@@ -226,13 +224,13 @@ class CliPackageDownloaderTest {
|
||||
caCertificates = listOf(FileTestUtils.selfSignedCertificate),
|
||||
testPort = server.port
|
||||
),
|
||||
packageUris = listOf(PackageUri("package://localhost:12110/birds@0.5.0")),
|
||||
packageUris = listOf(PackageUri("package://localhost:0/birds@0.5.0")),
|
||||
noTransitive = false
|
||||
)
|
||||
.run()
|
||||
assertThat(tempDir.resolve("package-1/localhost:12110/birds@0.5.0/birds@0.5.0.zip")).exists()
|
||||
assertThat(tempDir.resolve("package-1/localhost:12110/birds@0.5.0/birds@0.5.0.json")).exists()
|
||||
assertThat(tempDir.resolve("package-1/localhost:12110/fruit@1.0.5/fruit@1.0.5.zip")).exists()
|
||||
assertThat(tempDir.resolve("package-1/localhost:12110/fruit@1.0.5/fruit@1.0.5.json")).exists()
|
||||
assertThat(tempDir.resolve("package-1/localhost:0/birds@0.5.0/birds@0.5.0.zip")).exists()
|
||||
assertThat(tempDir.resolve("package-1/localhost:0/birds@0.5.0/birds@0.5.0.json")).exists()
|
||||
assertThat(tempDir.resolve("package-1/localhost:0/fruit@1.0.5/fruit@1.0.5.zip")).exists()
|
||||
assertThat(tempDir.resolve("package-1/localhost:0/fruit@1.0.5/fruit@1.0.5.json")).exists()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ class CliProjectPackagerTest {
|
||||
|
||||
dependencies {
|
||||
["birds"] {
|
||||
uri = "package://localhost:12110/birds@0.5.0"
|
||||
uri = "package://localhost:0/birds@0.5.0"
|
||||
}
|
||||
}
|
||||
"""
|
||||
@@ -237,18 +237,18 @@ class CliProjectPackagerTest {
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"resolvedDependencies": {
|
||||
"package://localhost:12110/birds@0": {
|
||||
"package://localhost:0/birds@0": {
|
||||
"type": "remote",
|
||||
"uri": "projectpackage://localhost:12110/birds@0.5.0",
|
||||
"uri": "projectpackage://localhost:0/birds@0.5.0",
|
||||
"checksums": {
|
||||
"sha256": "04eec465b217fb9779489525d26e9b587e5e47ff4d584c7673a450109715bc31"
|
||||
}
|
||||
},
|
||||
"package://localhost:12110/fruit@1": {
|
||||
"package://localhost:0/fruit@1": {
|
||||
"type": "remote",
|
||||
"uri": "projectpackage://localhost:12110/fruit@1.0.5",
|
||||
"uri": "projectpackage://localhost:0/fruit@1.0.5",
|
||||
"checksums": {
|
||||
"sha256": "abd173e8a25f5b930b0e34269a441e32c9d95e0b0a715bc6eff918f0afd0688e"
|
||||
"sha256": "${PackageServer.FRUIT_SHA}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -433,7 +433,7 @@ class CliProjectPackagerTest {
|
||||
|
||||
dependencies {
|
||||
["birds"] {
|
||||
uri = "package://localhost:12110/birds@0.5.0"
|
||||
uri = "package://localhost:0/birds@0.5.0"
|
||||
}
|
||||
["project2"] = import("../project2/PklProject")
|
||||
}
|
||||
@@ -446,16 +446,16 @@ class CliProjectPackagerTest {
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"resolvedDependencies": {
|
||||
"package://localhost:12110/birds@0": {
|
||||
"package://localhost:0/birds@0": {
|
||||
"type": "remote",
|
||||
"uri": "projectpackage://localhost:12110/birds@0.5.0",
|
||||
"uri": "projectpackage://localhost:0/birds@0.5.0",
|
||||
"checksums": {
|
||||
"sha256": "3f19ab9fcee2f44f93a75a09e531db278c6d2cd25206836c8c2c4071cd7d3118"
|
||||
"sha256": "${PackageServer.BIRDS_SHA}"
|
||||
}
|
||||
},
|
||||
"package://localhost:12110/project2@5": {
|
||||
"package://localhost:0/project2@5": {
|
||||
"type": "local",
|
||||
"uri": "projectpackage://localhost:12110/project2@5.0.0",
|
||||
"uri": "projectpackage://localhost:0/project2@5.0.0",
|
||||
"path": "../project2"
|
||||
}
|
||||
}
|
||||
@@ -471,7 +471,7 @@ class CliProjectPackagerTest {
|
||||
|
||||
package {
|
||||
name = "project2"
|
||||
baseUri = "package://localhost:12110/project2"
|
||||
baseUri = "package://localhost:0/project2"
|
||||
version = "5.0.0"
|
||||
packageZipUrl = "https://foo.com/project2.zip"
|
||||
}
|
||||
@@ -513,15 +513,15 @@ class CliProjectPackagerTest {
|
||||
},
|
||||
"dependencies": {
|
||||
"birds": {
|
||||
"uri": "package://localhost:12110/birds@0.5.0",
|
||||
"uri": "package://localhost:0/birds@0.5.0",
|
||||
"checksums": {
|
||||
"sha256": "3f19ab9fcee2f44f93a75a09e531db278c6d2cd25206836c8c2c4071cd7d3118"
|
||||
"sha256": "${PackageServer.BIRDS_SHA}"
|
||||
}
|
||||
},
|
||||
"project2": {
|
||||
"uri": "package://localhost:12110/project2@5.0.0",
|
||||
"uri": "package://localhost:0/project2@5.0.0",
|
||||
"checksums": {
|
||||
"sha256": "6f469b28f8b62a8a1191e2749bcf9c27dedbbb1e0ea754ac34af57b534e0ddda"
|
||||
"sha256": "981787869571330b2f609a94a5912466990ce00e3fa94e7f290c2f99a6d5e5ed"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -537,7 +537,7 @@ class CliProjectPackagerTest {
|
||||
"""
|
||||
{
|
||||
"name": "project2",
|
||||
"packageUri": "package://localhost:12110/project2@5.0.0",
|
||||
"packageUri": "package://localhost:0/project2@5.0.0",
|
||||
"version": "5.0.0",
|
||||
"packageZipUrl": "https://foo.com/project2.zip",
|
||||
"packageZipChecksums": {
|
||||
@@ -571,7 +571,7 @@ class CliProjectPackagerTest {
|
||||
|
||||
dependencies {
|
||||
["birds"] {
|
||||
uri = "package://localhost:12110/birds@0.5.0"
|
||||
uri = "package://localhost:0/birds@0.5.0"
|
||||
}
|
||||
["project2"] = import("../project2/PklProject")
|
||||
}
|
||||
@@ -584,16 +584,16 @@ class CliProjectPackagerTest {
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"resolvedDependencies": {
|
||||
"package://localhost:12110/birds@0": {
|
||||
"package://localhost:0/birds@0": {
|
||||
"type": "remote",
|
||||
"uri": "projectpackage://localhost:12110/birds@0.5.0",
|
||||
"uri": "projectpackage://localhost:0/birds@0.5.0",
|
||||
"checksums": {
|
||||
"sha256": "3f19ab9fcee2f44f93a75a09e531db278c6d2cd25206836c8c2c4071cd7d3118"
|
||||
}
|
||||
},
|
||||
"package://localhost:12110/project2@5": {
|
||||
"package://localhost:0/project2@5": {
|
||||
"type": "local",
|
||||
"uri": "projectpackage://localhost:12110/project2@5.0.0",
|
||||
"uri": "projectpackage://localhost:0/project2@5.0.0",
|
||||
"path": "../project2"
|
||||
}
|
||||
}
|
||||
@@ -609,7 +609,7 @@ class CliProjectPackagerTest {
|
||||
|
||||
package {
|
||||
name = "project2"
|
||||
baseUri = "package://localhost:12110/project2"
|
||||
baseUri = "package://localhost:0/project2"
|
||||
version = "5.0.0"
|
||||
packageZipUrl = "https://foo.com/project2.zip"
|
||||
}
|
||||
@@ -884,14 +884,14 @@ class CliProjectPackagerTest {
|
||||
tempDir.writeFile("project/main.pkl", "res = 1")
|
||||
tempDir.writeFile(
|
||||
"project/PklProject",
|
||||
// intentionally conflict with localhost:12110/birds@0.5.0 from our test fixtures
|
||||
// intentionally conflict with localhost:0/birds@0.5.0 from our test fixtures
|
||||
"""
|
||||
amends "pkl:Project"
|
||||
|
||||
package {
|
||||
name = "birds"
|
||||
version = "0.5.0"
|
||||
baseUri = "package://localhost:12110/birds"
|
||||
baseUri = "package://localhost:0/birds"
|
||||
packageZipUrl = "https://foo.com"
|
||||
}
|
||||
"""
|
||||
@@ -916,10 +916,10 @@ class CliProjectPackagerTest {
|
||||
assertThat(e)
|
||||
.hasMessageStartingWith(
|
||||
"""
|
||||
Package `package://localhost:12110/birds@0.5.0` was already published with different contents.
|
||||
Package `package://localhost:0/birds@0.5.0` was already published with different contents.
|
||||
|
||||
Computed checksum: 04eec465b217fb9779489525d26e9b587e5e47ff4d584c7673a450109715bc31
|
||||
Published checksum: 0a5ad2dc13f06f73f96ba94e8d01d48252bc934e2de71a837620ca0fef8a7453
|
||||
Computed checksum: aa8c883841db22e92794f4708b01dc905b5da77645b7dfb5b22a73da8c347db1
|
||||
Published checksum: ${PackageServer.BIRDS_SHA}
|
||||
"""
|
||||
.trimIndent()
|
||||
)
|
||||
@@ -936,7 +936,7 @@ class CliProjectPackagerTest {
|
||||
package {
|
||||
name = "mangos"
|
||||
version = "1.0.0"
|
||||
baseUri = "package://localhost:12110/mangos"
|
||||
baseUri = "package://localhost:0/mangos"
|
||||
packageZipUrl = "https://foo.com"
|
||||
}
|
||||
"""
|
||||
|
||||
@@ -73,7 +73,7 @@ class CliProjectResolverTest {
|
||||
|
||||
dependencies {
|
||||
["birds"] {
|
||||
uri = "package://localhost:12110/birds@0.5.0"
|
||||
uri = "package://localhost:0/birds@0.5.0"
|
||||
}
|
||||
}
|
||||
"""
|
||||
@@ -98,18 +98,18 @@ class CliProjectResolverTest {
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"resolvedDependencies": {
|
||||
"package://localhost:12110/birds@0": {
|
||||
"package://localhost:0/birds@0": {
|
||||
"type": "remote",
|
||||
"uri": "projectpackage://localhost:12110/birds@0.5.0",
|
||||
"uri": "projectpackage://localhost:0/birds@0.5.0",
|
||||
"checksums": {
|
||||
"sha256": "0a5ad2dc13f06f73f96ba94e8d01d48252bc934e2de71a837620ca0fef8a7453"
|
||||
"sha256": "${PackageServer.BIRDS_SHA}"
|
||||
}
|
||||
},
|
||||
"package://localhost:12110/fruit@1": {
|
||||
"package://localhost:0/fruit@1": {
|
||||
"type": "remote",
|
||||
"uri": "projectpackage://localhost:12110/fruit@1.0.5",
|
||||
"uri": "projectpackage://localhost:0/fruit@1.0.5",
|
||||
"checksums": {
|
||||
"sha256": "abd173e8a25f5b930b0e34269a441e32c9d95e0b0a715bc6eff918f0afd0688e"
|
||||
"sha256": "${PackageServer.FRUIT_SHA}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -128,7 +128,7 @@ class CliProjectResolverTest {
|
||||
|
||||
dependencies {
|
||||
["birds"] {
|
||||
uri = "package://localhost:12110/birds@0.5.0"
|
||||
uri = "package://localhost:0/birds@0.5.0"
|
||||
}
|
||||
}
|
||||
"""
|
||||
@@ -153,18 +153,18 @@ class CliProjectResolverTest {
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"resolvedDependencies": {
|
||||
"package://localhost:12110/birds@0": {
|
||||
"package://localhost:0/birds@0": {
|
||||
"type": "remote",
|
||||
"uri": "projectpackage://localhost:12110/birds@0.5.0",
|
||||
"uri": "projectpackage://localhost:0/birds@0.5.0",
|
||||
"checksums": {
|
||||
"sha256": "0a5ad2dc13f06f73f96ba94e8d01d48252bc934e2de71a837620ca0fef8a7453"
|
||||
"sha256": "${PackageServer.BIRDS_SHA}"
|
||||
}
|
||||
},
|
||||
"package://localhost:12110/fruit@1": {
|
||||
"package://localhost:0/fruit@1": {
|
||||
"type": "remote",
|
||||
"uri": "projectpackage://localhost:12110/fruit@1.0.5",
|
||||
"uri": "projectpackage://localhost:0/fruit@1.0.5",
|
||||
"checksums": {
|
||||
"sha256": "abd173e8a25f5b930b0e34269a441e32c9d95e0b0a715bc6eff918f0afd0688e"
|
||||
"sha256": "${PackageServer.FRUIT_SHA}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -184,7 +184,7 @@ class CliProjectResolverTest {
|
||||
|
||||
dependencies {
|
||||
["birds"] {
|
||||
uri = "package://localhost:12110/birds@0.5.0"
|
||||
uri = "package://localhost:0/birds@0.5.0"
|
||||
}
|
||||
["project2"] = import("../project2/PklProject")
|
||||
}
|
||||
@@ -198,14 +198,14 @@ class CliProjectResolverTest {
|
||||
|
||||
package {
|
||||
name = "project2"
|
||||
baseUri = "package://localhost:12110/package2"
|
||||
baseUri = "package://localhost:0/package2"
|
||||
version = "5.0.0"
|
||||
packageZipUrl = "https://foo.com/package2.zip"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
["fruit"] {
|
||||
uri = "package://localhost:12110/fruit@1.0.5"
|
||||
uri = "package://localhost:0/fruit@1.0.5"
|
||||
}
|
||||
["project3"] = import("../project3/PklProject")
|
||||
}
|
||||
@@ -220,14 +220,14 @@ class CliProjectResolverTest {
|
||||
|
||||
package {
|
||||
name = "project3"
|
||||
baseUri = "package://localhost:12110/package3"
|
||||
baseUri = "package://localhost:0/package3"
|
||||
version = "5.0.0"
|
||||
packageZipUrl = "https://foo.com/package3.zip"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
["fruit"] {
|
||||
uri = "package://localhost:12110/fruit@1.1.0"
|
||||
uri = "package://localhost:0/fruit@1.1.0"
|
||||
}
|
||||
}
|
||||
"""
|
||||
@@ -251,28 +251,28 @@ class CliProjectResolverTest {
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"resolvedDependencies": {
|
||||
"package://localhost:12110/birds@0": {
|
||||
"package://localhost:0/birds@0": {
|
||||
"type": "remote",
|
||||
"uri": "projectpackage://localhost:12110/birds@0.5.0",
|
||||
"uri": "projectpackage://localhost:0/birds@0.5.0",
|
||||
"checksums": {
|
||||
"sha256": "0a5ad2dc13f06f73f96ba94e8d01d48252bc934e2de71a837620ca0fef8a7453"
|
||||
"sha256": "${PackageServer.BIRDS_SHA}"
|
||||
}
|
||||
},
|
||||
"package://localhost:12110/fruit@1": {
|
||||
"package://localhost:0/fruit@1": {
|
||||
"type": "remote",
|
||||
"uri": "projectpackage://localhost:12110/fruit@1.1.0",
|
||||
"uri": "projectpackage://localhost:0/fruit@1.1.0",
|
||||
"checksums": {
|
||||
"sha256": "a82e92e0c259591111d09d18a14f5ad66e2b6e13d827ee3e6f7ce06f5d0fbe0c"
|
||||
"sha256": "${PackageServer.FRUIT_1_1_SHA}"
|
||||
}
|
||||
},
|
||||
"package://localhost:12110/package2@5": {
|
||||
"package://localhost:0/package2@5": {
|
||||
"type": "local",
|
||||
"uri": "projectpackage://localhost:12110/package2@5.0.0",
|
||||
"uri": "projectpackage://localhost:0/package2@5.0.0",
|
||||
"path": "../project2"
|
||||
},
|
||||
"package://localhost:12110/package3@5": {
|
||||
"package://localhost:0/package3@5": {
|
||||
"type": "local",
|
||||
"uri": "projectpackage://localhost:12110/package3@5.0.0",
|
||||
"uri": "projectpackage://localhost:0/package3@5.0.0",
|
||||
"path": "../project3"
|
||||
}
|
||||
}
|
||||
@@ -292,7 +292,7 @@ class CliProjectResolverTest {
|
||||
|
||||
dependencies {
|
||||
["birds"] {
|
||||
uri = "package://localhost:12110/birds@0.5.0"
|
||||
uri = "package://localhost:0/birds@0.5.0"
|
||||
}
|
||||
["fruit"] = import("../fruit/PklProject")
|
||||
}
|
||||
@@ -306,7 +306,7 @@ class CliProjectResolverTest {
|
||||
|
||||
package {
|
||||
name = "fruit"
|
||||
baseUri = "package://localhost:12110/fruit"
|
||||
baseUri = "package://localhost:0/fruit"
|
||||
version = "1.0.0"
|
||||
packageZipUrl = "https://foo.com/fruit.zip"
|
||||
}
|
||||
@@ -333,18 +333,18 @@ class CliProjectResolverTest {
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"resolvedDependencies": {
|
||||
"package://localhost:12110/birds@0": {
|
||||
"package://localhost:0/birds@0": {
|
||||
"type": "remote",
|
||||
"uri": "projectpackage://localhost:12110/birds@0.5.0",
|
||||
"uri": "projectpackage://localhost:0/birds@0.5.0",
|
||||
"checksums": {
|
||||
"sha256": "0a5ad2dc13f06f73f96ba94e8d01d48252bc934e2de71a837620ca0fef8a7453"
|
||||
"sha256": "${PackageServer.BIRDS_SHA}"
|
||||
}
|
||||
},
|
||||
"package://localhost:12110/fruit@1": {
|
||||
"package://localhost:0/fruit@1": {
|
||||
"type": "remote",
|
||||
"uri": "projectpackage://localhost:12110/fruit@1.0.5",
|
||||
"uri": "projectpackage://localhost:0/fruit@1.0.5",
|
||||
"checksums": {
|
||||
"sha256": "abd173e8a25f5b930b0e34269a441e32c9d95e0b0a715bc6eff918f0afd0688e"
|
||||
"sha256": "${PackageServer.FRUIT_SHA}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -354,7 +354,7 @@ class CliProjectResolverTest {
|
||||
)
|
||||
assertThat(errOut.toString())
|
||||
.isEqualTo(
|
||||
"WARN: local dependency `package://localhost:12110/fruit@1.0.0` was overridden to remote dependency `package://localhost:12110/fruit@1.0.5`.\n"
|
||||
"WARN: local dependency `package://localhost:0/fruit@1.0.0` was overridden to remote dependency `package://localhost:0/fruit@1.0.5`.\n"
|
||||
)
|
||||
}
|
||||
|
||||
@@ -367,7 +367,7 @@ class CliProjectResolverTest {
|
||||
|
||||
dependencies {
|
||||
["birds"] {
|
||||
uri = "package://localhost:12110/birds@0.5.0"
|
||||
uri = "package://localhost:0/birds@0.5.0"
|
||||
}
|
||||
}
|
||||
"""
|
||||
@@ -381,7 +381,7 @@ class CliProjectResolverTest {
|
||||
|
||||
dependencies {
|
||||
["fruit"] {
|
||||
uri = "package://localhost:12110/fruit@1.1.0"
|
||||
uri = "package://localhost:0/fruit@1.1.0"
|
||||
}
|
||||
}
|
||||
"""
|
||||
@@ -416,18 +416,18 @@ class CliProjectResolverTest {
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"resolvedDependencies": {
|
||||
"package://localhost:12110/birds@0": {
|
||||
"package://localhost:0/birds@0": {
|
||||
"type": "remote",
|
||||
"uri": "projectpackage://localhost:12110/birds@0.5.0",
|
||||
"uri": "projectpackage://localhost:0/birds@0.5.0",
|
||||
"checksums": {
|
||||
"sha256": "0a5ad2dc13f06f73f96ba94e8d01d48252bc934e2de71a837620ca0fef8a7453"
|
||||
"sha256": "${PackageServer.BIRDS_SHA}"
|
||||
}
|
||||
},
|
||||
"package://localhost:12110/fruit@1": {
|
||||
"package://localhost:0/fruit@1": {
|
||||
"type": "remote",
|
||||
"uri": "projectpackage://localhost:12110/fruit@1.0.5",
|
||||
"uri": "projectpackage://localhost:0/fruit@1.0.5",
|
||||
"checksums": {
|
||||
"sha256": "abd173e8a25f5b930b0e34269a441e32c9d95e0b0a715bc6eff918f0afd0688e"
|
||||
"sha256": "${PackageServer.FRUIT_SHA}"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -441,11 +441,11 @@ class CliProjectResolverTest {
|
||||
{
|
||||
"schemaVersion": 1,
|
||||
"resolvedDependencies": {
|
||||
"package://localhost:12110/fruit@1": {
|
||||
"package://localhost:0/fruit@1": {
|
||||
"type": "remote",
|
||||
"uri": "projectpackage://localhost:12110/fruit@1.1.0",
|
||||
"uri": "projectpackage://localhost:0/fruit@1.1.0",
|
||||
"checksums": {
|
||||
"sha256": "a82e92e0c259591111d09d18a14f5ad66e2b6e13d827ee3e6f7ce06f5d0fbe0c"
|
||||
"sha256": "${PackageServer.FRUIT_1_1_SHA}"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user