Skip to content

Commit

Permalink
aliasing "update" with "update-todo" for packwerk parity (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
perryqh authored Aug 9, 2024
1 parent be1ab8b commit 6181e8d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[package]
name = "pks"
version = "0.2.19"
version = "0.2.20"
edition = "2021"
description = "Welcome! Please see https://github.com/rubyatscale/pks for more information!"
license = "MIT"
Expand Down
3 changes: 2 additions & 1 deletion src/packs/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ enum Command {
},

#[clap(
about = "Update package_todo.yml files with the current violations"
about = "Update package_todo.yml files with the current violations",
alias = "update-todo"
)]
Update,

Expand Down
14 changes: 12 additions & 2 deletions tests/update_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,24 @@ mod common;
use pretty_assertions::assert_eq;

#[test]
#[serial]
// This and the next test are run in serial because they both use the same fixtures.
fn update() -> Result<(), Box<dyn Error>> {
test_update("update")
}

#[test]
#[serial]
fn test_update() -> Result<(), Box<dyn Error>> {
fn update_todo() -> Result<(), Box<dyn Error>> {
test_update("update-todo")
}

fn test_update(command: &str) -> Result<(), Box<dyn Error>> {
Command::cargo_bin("pks")?
.arg("--project-root")
.arg("tests/fixtures/simple_app")
.arg("--debug")
.arg("update")
.arg(command)
.assert()
.success()
.stdout(predicate::str::contains(
Expand Down

0 comments on commit 6181e8d

Please sign in to comment.