From 9a0ed809e5fb7db56a2b46510247bcfb224a5769 Mon Sep 17 00:00:00 2001 From: Aaron Erickson Date: Wed, 1 Jul 2026 16:08:58 -0700 Subject: [PATCH] test(docs): track canonical sandbox hardening route Signed-off-by: Aaron Erickson --- test/repro-5088-best-practices-layers.test.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/repro-5088-best-practices-layers.test.ts b/test/repro-5088-best-practices-layers.test.ts index 177e00018f8..0daf8a0bee1 100644 --- a/test/repro-5088-best-practices-layers.test.ts +++ b/test/repro-5088-best-practices-layers.test.ts @@ -1,23 +1,23 @@ // SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. // SPDX-License-Identifier: Apache-2.0 -import { describe, it, expect } from "vitest"; import fs from "node:fs"; import path from "node:path"; +import { describe, expect, it } from "vitest"; // Regression for issue #5088: docs/security/best-practices.mdx described // "four layers" in the intro, the Mermaid diagram, and the at-a-glance table, // but the body documents five layer sections (it adds Gateway Authentication). -// It also linked Sandbox Hardening through the wrong directory -// (manage-sandboxes/ rather than the canonical deployment/ path). +// It also keeps the Sandbox Hardening link on the canonical +// manage-sandboxes/ route rather than the retired deployment/ path. const REPO_ROOT = path.dirname(import.meta.dirname); const DOC = path.join(REPO_ROOT, "docs", "security", "best-practices.mdx"); const text = fs.readFileSync(DOC, "utf-8"); describe("best-practices.mdx security-layer consistency (#5088)", () => { - it("links Sandbox Hardening via the canonical deployment path", () => { - expect(text).not.toMatch(/manage-sandboxes\/sandbox-hardening/); - expect(text).toMatch(/\.\.\/deployment\/sandbox-hardening/); + it("links Sandbox Hardening via the canonical manage-sandboxes path", () => { + expect(text).toMatch(/\.\.\/manage-sandboxes\/sandbox-hardening/); + expect(text).not.toMatch(/\.\.\/deployment\/sandbox-hardening/); }); it("intro and at-a-glance agree with the body's five layer sections", () => {