fix(jd): register Guanghu source push route
This commit is contained in:
parent
e2bb573a58
commit
cc73a708fb
4 changed files with 53 additions and 1 deletions
|
|
@ -41,6 +41,37 @@ test("repository resolution is exact and returns an explicit unregistered receip
|
|||
);
|
||||
});
|
||||
|
||||
test("Guanghu Ice Heart resolves only through its public code-channel URL", () => {
|
||||
const registry = {
|
||||
"bingshuo/guanghu-ice-heart": {
|
||||
branches: ["main"],
|
||||
remote: "file:///var/lib/guanghu/personas/guanghu/hlcc-v16.0.1/data/repositories/bingshuo/guanghu-ice-heart.git",
|
||||
source_urls: [
|
||||
"https://guanghulab.com/code/bingshuo/guanghu-ice-heart.git",
|
||||
],
|
||||
},
|
||||
};
|
||||
assert.deepEqual(
|
||||
resolveRepository(
|
||||
"https://guanghulab.com/code/bingshuo/guanghu-ice-heart.git",
|
||||
registry,
|
||||
),
|
||||
{
|
||||
ok: true,
|
||||
diagnostic_code: "repository_registered",
|
||||
repo: "bingshuo/guanghu-ice-heart",
|
||||
branches: ["main"],
|
||||
},
|
||||
);
|
||||
assert.equal(
|
||||
resolveRepository(
|
||||
"https://guanghulab.com/fifth-domain/bingshuo/guanghu-ice-heart.git",
|
||||
registry,
|
||||
).diagnostic_code,
|
||||
"repository_not_registered",
|
||||
);
|
||||
});
|
||||
|
||||
test("receiver permits only an allowlisted fast-forward bundle with an exact base", async () => {
|
||||
const uploadDir = fs.mkdtempSync(path.join(os.tmpdir(), "lake-lamp-upload-"));
|
||||
const bundle = path.join(uploadDir, "one.bundle"); fs.writeFileSync(bundle, "bundle");
|
||||
|
|
|
|||
Loading…
Reference in a new issue