Skip to content

Commit

Permalink
chore(deps): Update Rust dependencies
Browse files Browse the repository at this point in the history
Signed-off-by: Rene Leonhardt <65483435+reneleonhardt@users.noreply.github.com>
  • Loading branch information
reneleonhardt authored and felixfontein committed Dec 1, 2024
1 parent 05b10a6 commit 981c21a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
2 changes: 1 addition & 1 deletion functional-tests/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"
authors = ["Adrian Utrilla <adrianutrilla@gmail.com>"]

[dependencies]
tempdir = "0.3.5"
tempfile = "3.12.0"
serde = "1.0"
serde_json = "1.0.133"
serde_yaml = "0.9.34"
Expand Down
25 changes: 13 additions & 12 deletions functional-tests/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#[cfg_attr(test, macro_use)]
extern crate lazy_static;
extern crate serde;
extern crate serde_json;
extern crate serde_yaml;
extern crate tempdir;
#[macro_use]
extern crate lazy_static;
#[macro_use]
extern crate serde_derive;
extern crate tempfile;

#[cfg(test)]
mod tests {
Expand All @@ -19,7 +17,8 @@ mod tests {
use std::io::{Read, Write};
use std::path::Path;
use std::process::Command;
use tempdir::TempDir;
use tempfile::Builder;
use tempfile::TempDir;
const SOPS_BINARY_PATH: &'static str = "./sops";
const KMS_KEY: &'static str = "FUNCTIONAL_TEST_KMS_ARN";

Expand All @@ -36,8 +35,10 @@ mod tests {
}

lazy_static! {
static ref TMP_DIR: TempDir =
TempDir::new("sops-functional-tests").expect("Unable to create temporary directory");
static ref TMP_DIR: TempDir = Builder::new()
.prefix("sops-functional-tests")
.tempdir()
.expect("Unable to create temporary directory");
}

fn prepare_temp_file(name: &str, contents: &[u8]) -> String {
Expand Down Expand Up @@ -806,7 +807,7 @@ b: ba"#
let file_path = "res/comments.yaml";
let output = Command::new(SOPS_BINARY_PATH)
.arg("encrypt")
.arg(file_path.clone())
.arg(file_path)
.output()
.expect("Error running sops");
assert!(output.status.success(), "SOPS didn't return successfully");
Expand All @@ -825,7 +826,7 @@ b: ba"#
let file_path = "res/comments_list.yaml";
let output = Command::new(SOPS_BINARY_PATH)
.arg("encrypt")
.arg(file_path.clone())
.arg(file_path)
.output()
.expect("Error running sops");
assert!(output.status.success(), "SOPS didn't return successfully");
Expand All @@ -844,7 +845,7 @@ b: ba"#
let file_path = "res/comments.enc.yaml";
let output = Command::new(SOPS_BINARY_PATH)
.arg("decrypt")
.arg(file_path.clone())
.arg(file_path)
.output()
.expect("Error running sops");
assert!(output.status.success(), "SOPS didn't return successfully");
Expand All @@ -863,7 +864,7 @@ b: ba"#
let file_path = "res/comments_unencrypted_comments.yaml";
let output = Command::new(SOPS_BINARY_PATH)
.arg("decrypt")
.arg(file_path.clone())
.arg(file_path)
.output()
.expect("Error running sops");
assert!(output.status.success(), "SOPS didn't return successfully");
Expand Down

0 comments on commit 981c21a

Please sign in to comment.