mirror of
https://github.com/fabro-sh/fabro.git
synced 2026-09-05 08:10:39 +00:00
Rename sandbox subcommand tests to follow namespace convention
Move ssh.rs, cp.rs, preview.rs to sandbox_ssh.rs, sandbox_cp.rs, sandbox_preview.rs to match the naming convention used by other namespaced tests (e.g. pr_close.rs, system_prune.rs). Use context.command() + args instead of one-off helpers. Remove redundant config_show.rs (duplicate of config.rs). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
0346edd112
commit
967b419339
6 changed files with 9 additions and 59 deletions
|
|
@ -1,28 +0,0 @@
|
|||
use fabro_test::{fabro_snapshot, test_context};
|
||||
|
||||
#[test]
|
||||
fn help() {
|
||||
let context = test_context!();
|
||||
let mut cmd = context.settings();
|
||||
cmd.arg("--help");
|
||||
fabro_snapshot!(context.filters(), cmd, @"
|
||||
success: true
|
||||
exit_code: 0
|
||||
----- stdout -----
|
||||
Inspect merged configuration
|
||||
|
||||
Usage: fabro settings [OPTIONS] [WORKFLOW]
|
||||
|
||||
Arguments:
|
||||
[WORKFLOW] Optional workflow name, .fabro path, or .toml run config to overlay
|
||||
|
||||
Options:
|
||||
--debug Enable DEBUG-level logging (default is INFO) [env: FABRO_DEBUG=]
|
||||
--no-upgrade-check Disable automatic upgrade check [env: FABRO_NO_UPGRADE_CHECK=true]
|
||||
--quiet Suppress non-essential output [env: FABRO_QUIET=]
|
||||
--verbose Enable verbose output [env: FABRO_VERBOSE=]
|
||||
--storage-dir <STORAGE_DIR> Storage directory (default: ~/.fabro) [env: FABRO_STORAGE_DIR=[STORAGE_DIR]]
|
||||
-h, --help Print help
|
||||
----- stderr -----
|
||||
");
|
||||
}
|
||||
|
|
@ -4,8 +4,6 @@ mod asset_list;
|
|||
mod attach;
|
||||
mod completion;
|
||||
mod config;
|
||||
mod config_show;
|
||||
mod cp;
|
||||
mod create;
|
||||
mod detached;
|
||||
mod diff;
|
||||
|
|
@ -32,7 +30,6 @@ mod pr_list;
|
|||
mod pr_merge;
|
||||
mod pr_view;
|
||||
mod preflight;
|
||||
mod preview;
|
||||
mod provider;
|
||||
mod provider_login;
|
||||
mod ps;
|
||||
|
|
@ -43,6 +40,9 @@ mod resume;
|
|||
mod rewind;
|
||||
mod rm;
|
||||
mod run;
|
||||
mod sandbox_cp;
|
||||
mod sandbox_preview;
|
||||
mod sandbox_ssh;
|
||||
mod secret;
|
||||
mod secret_get;
|
||||
mod secret_list;
|
||||
|
|
@ -51,7 +51,6 @@ mod secret_set;
|
|||
mod send_analytics;
|
||||
mod send_panic;
|
||||
mod server;
|
||||
mod ssh;
|
||||
mod start;
|
||||
mod store;
|
||||
mod store_dump;
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ use fabro_test::{fabro_snapshot, test_context};
|
|||
#[test]
|
||||
fn help() {
|
||||
let context = test_context!();
|
||||
let mut cmd = context.cp();
|
||||
cmd.arg("--help");
|
||||
let mut cmd = context.command();
|
||||
cmd.args(["sandbox", "cp", "--help"]);
|
||||
fabro_snapshot!(context.filters(), cmd, @"
|
||||
success: true
|
||||
exit_code: 0
|
||||
|
|
@ -3,8 +3,8 @@ use fabro_test::{fabro_snapshot, test_context};
|
|||
#[test]
|
||||
fn help() {
|
||||
let context = test_context!();
|
||||
let mut cmd = context.preview();
|
||||
cmd.arg("--help");
|
||||
let mut cmd = context.command();
|
||||
cmd.args(["sandbox", "preview", "--help"]);
|
||||
fabro_snapshot!(context.filters(), cmd, @"
|
||||
success: true
|
||||
exit_code: 0
|
||||
|
|
@ -3,8 +3,8 @@ use fabro_test::{fabro_snapshot, test_context};
|
|||
#[test]
|
||||
fn help() {
|
||||
let context = test_context!();
|
||||
let mut cmd = context.ssh();
|
||||
cmd.arg("--help");
|
||||
let mut cmd = context.command();
|
||||
cmd.args(["sandbox", "ssh", "--help"]);
|
||||
fabro_snapshot!(context.filters(), cmd, @"
|
||||
success: true
|
||||
exit_code: 0
|
||||
|
|
@ -168,13 +168,6 @@ impl TestContext {
|
|||
cmd
|
||||
}
|
||||
|
||||
/// Build a `sandbox cp` subcommand.
|
||||
pub fn cp(&self) -> Command {
|
||||
let mut cmd = self.command();
|
||||
cmd.args(["sandbox", "cp"]);
|
||||
cmd
|
||||
}
|
||||
|
||||
/// Build an `init` subcommand.
|
||||
pub fn init_cmd(&self) -> Command {
|
||||
let mut cmd = self.command();
|
||||
|
|
@ -196,13 +189,6 @@ impl TestContext {
|
|||
cmd
|
||||
}
|
||||
|
||||
/// Build a `sandbox preview` subcommand.
|
||||
pub fn preview(&self) -> Command {
|
||||
let mut cmd = self.command();
|
||||
cmd.args(["sandbox", "preview"]);
|
||||
cmd
|
||||
}
|
||||
|
||||
/// Build a `repo` subcommand.
|
||||
pub fn repo(&self) -> Command {
|
||||
let mut cmd = self.command();
|
||||
|
|
@ -210,13 +196,6 @@ impl TestContext {
|
|||
cmd
|
||||
}
|
||||
|
||||
/// Build a `sandbox ssh` subcommand.
|
||||
pub fn ssh(&self) -> Command {
|
||||
let mut cmd = self.command();
|
||||
cmd.args(["sandbox", "ssh"]);
|
||||
cmd
|
||||
}
|
||||
|
||||
/// Build a `system` subcommand.
|
||||
pub fn system(&self) -> Command {
|
||||
let mut cmd = self.command();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue