Show the instance ID when its details can't be fetched

InstanceDetailsGetRequest needs core.instance.get, which the
player-sync list and show commands are not documented to require.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bbassieandClaude Opus 5.5 committed 2026-10-17 18:52:29 +00:00
1 parent 004fb13f1c
commit 1d14148606
2 files changed
+17 -2

No files matched your search

+10
View File
@@ -181,6 +181,16 @@ describe("player_sync plugin", function() {
` 1 exported item ${lib.formatBytes(4)}`,
]);
});
it("should show the instance ID when details can't be fetched", async function() {
responses.set(lib.InstanceDetailsGetRequest, () => {
throw new lib.PermissionError("Permission denied");
});
await run("list");
assert.equal(printed[2], "bob | - | - | 1");
printed = [];
await run("show", { player: "alice" });
assert.equal(printed[0], "acquired by: 1");
});
it("show should handle players without data", async function() {
await run("show", { player: "carol" });
assert.deepEqual(printed, ["acquired by: -", "No player data stored for carol"]);