UNPKG

@aligntrue/testkit

Version:

Conformance testkit for Align Spec v1 implementations

83 lines (82 loc) 2.11 kB
[ { "name": "fails-when-exec-not-allowed", "description": "Verifies that check fails with helpful message when command execution is not allowed", "check_type": "command_runner", "rule": { "id": "test-command-echo", "severity": "MUST", "check": { "type": "command_runner", "inputs": { "command": "echo \"test\"", "timeout_ms": 5000 }, "evidence": "Command failed" } }, "file_tree": {}, "expected_findings": [ { "rule_id": "test-command-echo", "severity": "MUST", "message": "Command execution not allowed. Enable with --allow-exec flag" } ], "allow_exec": false }, { "name": "parses-command-inputs", "description": "Verifies that command runner correctly parses all input fields", "check_type": "command_runner", "rule": { "id": "test-command-custom", "severity": "MUST", "check": { "type": "command_runner", "inputs": { "command": "test-command", "working_dir": "/custom/dir", "timeout_ms": 5000, "expect_exit_code": 0 }, "evidence": "Command failed" } }, "file_tree": {}, "expected_findings": [ { "rule_id": "test-command-custom", "severity": "MUST", "message": "Command execution not allowed" } ], "allow_exec": false }, { "name": "respects-working-directory", "description": "Verifies that command runner respects the working_dir input parameter", "check_type": "command_runner", "rule": { "id": "test-command-pwd", "severity": "MUST", "check": { "type": "command_runner", "inputs": { "command": "pwd", "working_dir": "/custom" }, "evidence": "Command failed" } }, "file_tree": {}, "expected_findings": [ { "rule_id": "test-command-pwd", "severity": "MUST", "message": "Command execution not allowed" } ], "allow_exec": false } ]