Skip to content

Commit

Permalink
test: try to fix gpg
Browse files Browse the repository at this point in the history
  • Loading branch information
oknozor committed Sep 18, 2024
1 parent 2535408 commit 8341b99
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/dots.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,6 @@ mod tests {
Ok(())
}

#[cfg(target_os = "linux")]
#[sealed_test(files = ["tests/dotfiles_with_multiple_nested_dir"], before = setup("dotfiles_with_multiple_nested_dir"))]
fn copy() -> Result<()> {
// Arrange
Expand Down Expand Up @@ -412,7 +411,6 @@ mod tests {
Ok(())
}

#[cfg(target_os = "linux")]
#[sealed_test(files = ["tests/dotfiles_non_utf8"], before = setup("dotfiles_non_utf8"))]
fn copy_non_utf8() -> Result<()> {
let source = PathBuf::from("dotfiles_non_utf8/ferris.png");
Expand All @@ -425,6 +423,8 @@ mod tests {
vars: Dot::default_vars(),
};

run_cmd!(ls - larth)?;

dot.traverse_and_copy(
&source,
&PathBuf::from("dotfiles_non_utf8/.dots/ferris.png"),
Expand Down
9 changes: 5 additions & 4 deletions src/gpg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,11 @@ mod test {
let crate_dir = env::var("CARGO_MANIFEST_DIR").unwrap();

run_cmd!(
gpg --import $crate_dir/tests/gpg/public.gpg;
gpg --import $crate_dir/tests/gpg/private.gpg;
echo -e "5\ny\n" | gpg --no-tty --command-fd 0 --expert --edit-key [email protected] trust;
).unwrap();
gpg --batch --yes --import $crate_dir/tests/gpg/public.gpg;
gpg --batch --yes --import $crate_dir/tests/gpg/private.gpg;
gpg --batch --yes --import-ownertrust < $crate_dir/tests/gpg/trust.txt
)
.unwrap();
}

#[sealed_test(before = gpg_setup())]
Expand Down
1 change: 1 addition & 0 deletions tests/gpg/trust.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
F171AE59235901B583FAD3DBCA95EAE6059F541F:6:

0 comments on commit 8341b99

Please sign in to comment.