mirror of
https://github.com/morluto/rea.git
synced 2026-11-14 10:43:30 +00:00
* refactor: remove redundant seams and preserve cleanup ownership * fix: validate PE resource extents before budget checks
29 lines
951 B
TypeScript
29 lines
951 B
TypeScript
import { it } from "vitest";
|
|
|
|
import { expectConfigurationRefusal, serveCli } from "./cliServeHarness.js";
|
|
|
|
it.each([
|
|
["inspect-pcap-client"],
|
|
["inspect-pcap-capture", "/nonexistent/capture.pcap"],
|
|
])("%s names the missing Wireshark tool to configure", async (...argv) => {
|
|
const result = await serveCli([...argv, "--json"], {
|
|
REA_TSHARK_COMMAND: "/nonexistent/tshark",
|
|
REA_CAPINFOS_COMMAND: "/nonexistent/capinfos",
|
|
});
|
|
expectConfigurationRefusal(
|
|
result,
|
|
"The selected tshark executable /nonexistent/tshark could not be found",
|
|
);
|
|
expectConfigurationRefusal(result, "through absolute REA_TSHARK_COMMAND");
|
|
});
|
|
|
|
it("names a relative tool selection as configuration to fix", async () => {
|
|
const result = await serveCli(["inspect-pcap-client", "--json"], {
|
|
REA_TSHARK_COMMAND: "tshark",
|
|
});
|
|
expectConfigurationRefusal(
|
|
result,
|
|
"REA_TSHARK_COMMAND must be an absolute path to the tshark binary",
|
|
);
|
|
});
|