feat(cli/org): org init — structure + wrap + configure_git_signing + signed bootstrap commit
This commit is contained in:
24
crates/relicario-cli/tests/org_init.rs
Normal file
24
crates/relicario-cli/tests/org_init.rs
Normal file
@@ -0,0 +1,24 @@
|
||||
use tempfile::TempDir;
|
||||
|
||||
fn run(args: &[&str]) -> std::process::Output {
|
||||
std::process::Command::new(env!("CARGO_BIN_EXE_relicario"))
|
||||
.args(args)
|
||||
.output()
|
||||
.expect("run relicario")
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[ignore] // requires a device key on disk; run manually or via org_init_signing
|
||||
fn org_init_creates_expected_files() {
|
||||
let dir = TempDir::new().unwrap();
|
||||
let path = dir.path().to_str().unwrap();
|
||||
// `--dir` is a subcommand-scoped global on `org` (B14), so it must come
|
||||
// AFTER `org init`, not before it (matches B10's OrgFixture).
|
||||
let out = run(&["org", "init", "--dir", path, "--name", "Test Org"]);
|
||||
assert!(out.status.success(), "stderr: {}", String::from_utf8_lossy(&out.stderr));
|
||||
assert!(dir.path().join("org.json").exists());
|
||||
assert!(dir.path().join("members.json").exists());
|
||||
assert!(dir.path().join("collections.json").exists());
|
||||
assert!(dir.path().join("manifest.enc").exists());
|
||||
assert!(dir.path().join(".git").exists());
|
||||
}
|
||||
Reference in New Issue
Block a user