From 54f3d8df6fca6fb332d18a471bb14791060009ab Mon Sep 17 00:00:00 2001 From: Rene Leonhardt <65483435+reneleonhardt@users.noreply.github.com> Date: Tue, 11 Jun 2024 18:26:41 +0200 Subject: [PATCH] chore(deps): Update Rust dependencies Signed-off-by: Rene Leonhardt <65483435+reneleonhardt@users.noreply.github.com> --- .github/dependabot.yaml | 12 +++++++++++- functional-tests/Cargo.toml | 8 ++++---- functional-tests/src/lib.rs | 19 +++++++++---------- 3 files changed, 24 insertions(+), 15 deletions(-) diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index 64a3fa8e35..7d34a441f4 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -2,7 +2,7 @@ version: 2 updates: - package-ecosystem: "docker" - directory: "/" + directory: "/.release" labels: ["dependencies"] schedule: # By default, this will be on a Monday. @@ -39,3 +39,13 @@ updates: go: patterns: - "*" + + - package-ecosystem: "cargo" + directory: "/functional-tests" + labels: ["area/CI"] + schedule: + interval: "weekly" + groups: + ci: + patterns: + - "*" diff --git a/functional-tests/Cargo.toml b/functional-tests/Cargo.toml index 1635bac935..f45c043945 100644 --- a/functional-tests/Cargo.toml +++ b/functional-tests/Cargo.toml @@ -5,9 +5,9 @@ edition = "2021" authors = ["Adrian Utrilla "] [dependencies] -tempdir = "0.3.5" +tempfile = "3" serde = "1.0" -serde_json = "1.0.99" -serde_yaml = "0.9.22" +serde_json = "1.0" +serde_yaml = "0.9" serde_derive = "1.0" -lazy_static = "1.4.0" +lazy_static = "1.5" diff --git a/functional-tests/src/lib.rs b/functional-tests/src/lib.rs index 2ec7a891bd..2227245d1d 100644 --- a/functional-tests/src/lib.rs +++ b/functional-tests/src/lib.rs @@ -1,11 +1,9 @@ extern crate serde; extern crate serde_json; extern crate serde_yaml; -extern crate tempdir; -#[macro_use] +extern crate tempfile; +#[cfg_attr(test, macro_use)] extern crate lazy_static; -#[macro_use] -extern crate serde_derive; #[cfg(test)] mod tests { @@ -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"; @@ -37,7 +36,7 @@ mod tests { lazy_static! { static ref TMP_DIR: TempDir = - TempDir::new("sops-functional-tests").expect("Unable to create temporary directory"); + Builder::new().prefix("sops-functional-tests").tempdir().expect("Unable to create temporary directory"); } fn prepare_temp_file(name: &str, contents: &[u8]) -> String { @@ -806,7 +805,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"); @@ -825,7 +824,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"); @@ -844,7 +843,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"); @@ -863,7 +862,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");