Skip to content

Commit

Permalink
Test both ways of specifying multiple allowed deletion directories
Browse files Browse the repository at this point in the history
  • Loading branch information
cyqsimon committed Sep 16, 2024
1 parent 7d5374d commit a8e18a5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/rm_files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,12 @@ fn rm_is_restricted(#[case] server: TestServer) -> anyhow::Result<()> {

/// This test runs the server with --allowed-rm-dir argument and checks that
/// deletions of the specified directories themselves are allowed.
///
/// Both ways of specifying multiple directories are tested.
#[rstest]
fn can_rm_allowed_dir(
#[with(&["-R", "dira", "-R", "dirb", "-R", "dirc"])] server: TestServer,
) -> anyhow::Result<()> {
#[case(server(&["-R", "dira,dirb,dirc"]))]
#[case(server(&["-R", "dira", "-R", "dirb", "-R", "dirc"]))]
fn can_rm_allowed_dir(#[case] server: TestServer) -> anyhow::Result<()> {
assert_rm_ok(server.url(), DIRECTORIES)
}

Expand Down

0 comments on commit a8e18a5

Please sign in to comment.