mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-10-07 03:00:29 +00:00
Convert serve help test to fabro_snapshot and delete orphaned snap file
Replace ad-hoc insta::assert_snapshot! with TestContext + fabro_snapshot! for consistency. Delete the orphaned snapshot file from the deleted cli.rs module. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
3dee953cd2
commit
7a777ebf01
2 changed files with 6 additions and 47 deletions
|
|
@ -1,11 +1,10 @@
|
|||
#[test]
|
||||
#[cfg(feature = "server")]
|
||||
fn help() {
|
||||
#[allow(deprecated)]
|
||||
let mut cmd = assert_cmd::Command::cargo_bin("fabro").unwrap();
|
||||
cmd.arg("--no-upgrade-check");
|
||||
let output = cmd.args(["serve", "--help"]).output().expect("runs");
|
||||
assert!(output.status.success());
|
||||
let stdout = String::from_utf8(output.stdout).unwrap();
|
||||
insta::assert_snapshot!(stdout);
|
||||
use fabro_test::{fabro_snapshot, test_context};
|
||||
|
||||
let context = test_context!();
|
||||
let mut cmd = context.command();
|
||||
cmd.args(["serve", "--help"]);
|
||||
fabro_snapshot!(context.filters(), cmd, @"");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,40 +0,0 @@
|
|||
---
|
||||
source: lib/crates/fabro-cli/tests/it/cli.rs
|
||||
assertion_line: 747
|
||||
expression: stdout
|
||||
---
|
||||
Start the HTTP API server
|
||||
|
||||
Usage: fabro serve [OPTIONS]
|
||||
|
||||
Options:
|
||||
--debug
|
||||
Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=]
|
||||
--port <PORT>
|
||||
Port to listen on [default: 3000]
|
||||
--host <HOST>
|
||||
Host address to bind to [default: 127.0.0.1]
|
||||
--no-upgrade-check
|
||||
Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=]
|
||||
--model <MODEL>
|
||||
Override default LLM model
|
||||
--quiet
|
||||
Suppress non-essential output [env: FABRO_QUIET=]
|
||||
--provider <PROVIDER>
|
||||
Override default LLM provider
|
||||
--verbose
|
||||
Enable verbose output [env: FABRO_VERBOSE=]
|
||||
--dry-run
|
||||
Execute with simulated LLM backend
|
||||
--storage-dir <STORAGE_DIR>
|
||||
Storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=]
|
||||
--sandbox <SANDBOX>
|
||||
Sandbox for agent tools
|
||||
--server-url <SERVER_URL>
|
||||
Server URL (overrides server.base_url from user.toml) [env: FABRO_SERVER_URL=]
|
||||
--max-concurrent-runs <MAX_CONCURRENT_RUNS>
|
||||
Maximum number of concurrent run executions
|
||||
--config <CONFIG>
|
||||
Path to server config file (default: ~/.fabro/server.toml)
|
||||
-h, --help
|
||||
Print help
|
||||
Loading…
Add table
Reference in a new issue