From 5be25acdce294220ade9569e7b2f3f23632ddff3 Mon Sep 17 00:00:00 2001 From: foxnne Date: Sun, 18 Oct 2026 10:59:53 -0500 Subject: [PATCH] tests: the openapi test registers a command again as #536 now does it #508's test expected a second registration of `t.off` by the same plugin to be ignored. Since #536 that puts the new one in the first's place (a reload), so `main`'s integration tests failed. Co-Authored-By: Claude Opus 5.5 --- tests/integration.zig | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/integration.zig b/tests/integration.zig index 841c6b703..d1d6607e9 100644 --- a/tests/integration.zig +++ b/tests/integration.zig @@ -6881,7 +6881,8 @@ test "control: /openapi.json describes each command's body and the declared even try host.registerCommand(.{ .id = "t.off", .owner = &plugin, .title = "Off", .run = ControlFixture.nothing }); // A `runWith` written by hand, declaring no parameters (as the chat plugin's are). try host.registerCommand(.{ .id = "t.by hand{x}", .owner = &plugin, .title = "By hand", .runWith = OpenApiFixture.byHand }); - // A second of an id: the server runs the first, and the description has one path. + // The same plugin registering an id again, as a reload of its registrations does, puts the new + // one in the first's place (`Host.registerCommand`): the description has one path, the new one's. try host.registerCommand(.{ .id = "t.off", .owner = &plugin, .title = "Off again", .run = ControlFixture.nothing }); try host.declareEvent(.{ .name = "t.placed", .owner = &plugin, .description = "Something was placed.", .payload = ".{ .line = 4, .side = .left }" }); @@ -6900,7 +6901,7 @@ test "control: /openapi.json describes each command's body and the declared even return error.TestUnexpectedResult; } } - try std.testing.expectEqualStrings("Off", paths.get("/commands/t.off").?.object.get("post").?.object.get("summary").?.string); + try std.testing.expectEqualStrings("Off again", paths.get("/commands/t.off").?.object.get("post").?.object.get("summary").?.string); // The body: each parameter's type, the required ones listed, nothing else accepted. const place = paths.get("/commands/t.place").?.object.get("post").?.object;