mirror of
https://github.com/openclaw/openclaw.git
synced 2026-06-23 04:38:13 +00:00
fix(test): reject attestation platform flags
This commit is contained in:
@@ -134,7 +134,7 @@ function inspectRaw(imageRef) {
|
||||
|
||||
function readOptionValue(argv, index, optionName) {
|
||||
const value = argv[index + 1];
|
||||
if (value === undefined || value === "" || value.startsWith("--")) {
|
||||
if (value === undefined || value === "" || value.startsWith("-")) {
|
||||
throw new Error(`${optionName} requires a value`);
|
||||
}
|
||||
return value;
|
||||
|
||||
@@ -69,6 +69,7 @@ describe("verify-docker-attestations", () => {
|
||||
|
||||
it("rejects missing platform option values", () => {
|
||||
expect(() => parseArgs(["--platform"])).toThrow("--platform requires a value");
|
||||
expect(() => parseArgs(["--platform", "-h"])).toThrow("--platform requires a value");
|
||||
expect(() => parseArgs(["--platform", "--help"])).toThrow("--platform requires a value");
|
||||
expect(() => parseArgs(["--platform", ""])).toThrow("--platform requires a value");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user