Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ The format is based on Keep a Changelog, and this project adheres to Semantic Ve
- Added a security-tooling posture topic that records Wesley's current scanner
baseline, rejects DAST for the current compiler-only surface, and gates future
Semgrep or `cargo-deny` adoption on low-noise repo-owned policies.
- Added CLI regression coverage for missing schema file diagnostics.
- Added Rust emitter coverage for single-list GraphQL nullability shapes such
as `[String]!` and `[String!]`.

Expand Down
22 changes: 22 additions & 0 deletions crates/wesley-cli/tests/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,28 @@ fn schema_commands_discover_single_schema_manifest_when_schema_flag_is_omitted()
assert!(report["schemaHash"].as_str().unwrap().len() == 64);
}

#[test]
fn schema_lower_reports_missing_schema_path() {
let dir = temp_dir("missing-schema-path");
let missing_schema = dir.join("missing-schema.graphql");

let output = wesley()
.args(["schema", "lower", "--schema"])
.arg(&missing_schema)
.arg("--json")
.output()
.expect("wesley should run");

assert_eq!(output.status.code(), Some(1));
let stdout = String::from_utf8(output.stdout).expect("stdout should be utf8");
let stderr = String::from_utf8(output.stderr).expect("stderr should be utf8");
assert!(stdout.is_empty());
assert!(stderr.contains("failed to access schema"));
assert!(stderr.contains("missing-schema.graphql"));

let _ = std::fs::remove_dir_all(dir);
}

#[test]
fn removed_footprint_checker_is_not_a_wesley_command() {
let output = wesley()
Expand Down
Loading