Skip to content

Commit 9cc9fee

Browse files
authored
Merge pull request #89 from cgwalters/alias-upgrade
cli: Add an alias `update` for `upgrade`
2 parents 1230755 + d4ba2f5 commit 9cc9fee

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

lib/src/cli.rs

+1
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ pub(crate) enum TestingOpts {
101101
#[allow(clippy::large_enum_variant)]
102102
pub(crate) enum Opt {
103103
/// Look for updates to the booted container image.
104+
#[clap(alias = "update")]
104105
Upgrade(UpgradeOpts),
105106
/// Target a new container image reference to boot.
106107
Switch(SwitchOpts),

lib/src/privtests.rs

+7-5
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,13 @@ pub(crate) fn impl_run_container() -> Result<()> {
105105
let stout = cmd!(sh, "bootc status").read()?;
106106
assert!(stout.contains("Running in a container (ostree base)."));
107107
drop(stout);
108-
let o = Command::new("bootc").arg("upgrade").output()?;
109-
let st = o.status;
110-
assert!(!st.success());
111-
let stderr = String::from_utf8(o.stderr)?;
112-
assert!(stderr.contains("this command requires a booted host system"));
108+
for c in ["upgrade", "update"] {
109+
let o = Command::new("bootc").arg(c).output()?;
110+
let st = o.status;
111+
assert!(!st.success());
112+
let stderr = String::from_utf8(o.stderr)?;
113+
assert!(stderr.contains("this command requires a booted host system"));
114+
}
113115
println!("ok container integration testing");
114116
Ok(())
115117
}

0 commit comments

Comments
 (0)