chore(routes): close Shanghai mission and unify code channel
This commit is contained in:
parent
5e2ba5b006
commit
2bf4b63cff
24 changed files with 246 additions and 129 deletions
|
|
@ -8,13 +8,13 @@ const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
|
|||
const readJson = (relative) =>
|
||||
JSON.parse(fs.readFileSync(path.join(root, relative), "utf8"));
|
||||
|
||||
test("code channel has one root and exactly two current repositories", () => {
|
||||
test("code channel has one root and exactly three current repositories", () => {
|
||||
const map = readJson("routing/code-channel-canonical-map.json");
|
||||
assert.equal(map.web_root, "https://guanghulab.com/code/");
|
||||
assert.equal(map.repositories.length, 2);
|
||||
assert.equal(map.repositories.length, 3);
|
||||
assert.deepEqual(
|
||||
map.repositories.map((entry) => entry.code),
|
||||
["REPO-012", "REPO-014"],
|
||||
["REPO-012", "REPO-014", "REPO-015"],
|
||||
);
|
||||
for (const repository of map.repositories) {
|
||||
assert.match(
|
||||
|
|
@ -32,10 +32,10 @@ test("code channel has one root and exactly two current repositories", () => {
|
|||
test("legacy repository routes are all non-current and non-push", () => {
|
||||
const map = readJson("routing/repository-route-map.json");
|
||||
const current = map.repositories.filter((entry) =>
|
||||
["REPO-012", "REPO-014"].includes(entry.code),
|
||||
["REPO-012", "REPO-014", "REPO-015"].includes(entry.code),
|
||||
);
|
||||
assert.equal(current.length, 2);
|
||||
assert.equal(map.repositories.length, 2);
|
||||
assert.equal(current.length, 3);
|
||||
assert.equal(map.repositories.length, 3);
|
||||
for (const repository of map.historical_repositories) {
|
||||
assert.match(repository.state, /HISTORICAL.*(?:NO_PUSH|ROUTE_CLOSED)/u);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue