Skip to content

Commit 9a7ba52

Browse files
steipetecxbAsDev
andauthored
test(plugins): exercise valid oversized manifests
Co-authored-by: 陈宪彪0668000387 <[email protected]>
1 parent e3b6b09 commit 9a7ba52

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

‎src/plugins/manifest-metadata-scan.test.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,12 @@ describe("listOpenClawPluginManifestMetadata", () => {
137137
const oversizedDir = path.join(home, ".openclaw", "extensions", "big-plugin");
138138
const oversizedPath = path.join(oversizedDir, "openclaw.plugin.json");
139139
fs.mkdirSync(oversizedDir, { recursive: true });
140-
fs.writeFileSync(oversizedPath, "x".repeat(256 * 1024 + 1), "utf8");
140+
fs.writeFileSync(
141+
oversizedPath,
142+
JSON.stringify({ id: "big-plugin", pad: "x".repeat(256 * 1024) }),
143+
"utf8",
144+
);
145+
expect(fs.statSync(oversizedPath).size).toBeGreaterThan(256 * 1024);
141146

142147
const records = listOpenClawPluginManifestMetadata({
143148
OPENCLAW_HOME: home,

0 commit comments

Comments
 (0)