Skip to content

Commit

Permalink
Small cleanups in the cli-tests
Browse files Browse the repository at this point in the history
Just tidying up some naming.
  • Loading branch information
iustin committed Mar 9, 2024
1 parent f3f9f3c commit 969808b
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions tests/cli-tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use std::process::Command;
use tempfile::tempdir;

#[rstest]
fn test_oneshot_help(#[values("oneshot", "photo-backlog-exporter")] cmd_name: &str) {
fn test_help(#[values("oneshot", "photo-backlog-exporter")] cmd_name: &str) {
let mut cmd = Command::cargo_bin(cmd_name).unwrap();
cmd.arg("--help");

Expand All @@ -19,7 +19,7 @@ fn test_oneshot_help(#[values("oneshot", "photo-backlog-exporter")] cmd_name: &s
}

#[rstest]
fn test_oneshot_missing_path(#[values("oneshot", "photo-backlog-exporter")] cmd_name: &str) {
fn test_missing_path(#[values("oneshot", "photo-backlog-exporter")] cmd_name: &str) {
let mut cmd = Command::cargo_bin(cmd_name).unwrap();

cmd.assert()
Expand All @@ -28,8 +28,8 @@ fn test_oneshot_missing_path(#[values("oneshot", "photo-backlog-exporter")] cmd_
}

#[test]
fn test_oneshot_permissions_check() {
// Set test
fn test_permissions_check() {
// Setup the test environment.
let temp_dir = tempdir().unwrap();
let mut fname = PathBuf::from(temp_dir.path());
fname.push("file1.nef");
Expand All @@ -43,10 +43,6 @@ fn test_oneshot_permissions_check() {
.args(["--owner", &format!("{}", m.uid() + 1)])
.args(["--file-mode", "644"]);

// Add test cases here
// For example:
// cmd.arg("--input").arg("input_file.txt");

cmd.assert()
.success()
.stdout(predicate::str::contains(
Expand Down

0 comments on commit 969808b

Please sign in to comment.