Skip to content

Commit

Permalink
Remove unmaintained dependency
Browse files Browse the repository at this point in the history
Replace `tempdir` development dependency with
`tempfile`.

Fixes sigstore#23

Signed-off-by: Flavio Castelli <fcastelli@suse.com>
  • Loading branch information
flavio committed Feb 1, 2022
1 parent 99ee52f commit b0d5243
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ anyhow = "1.0.44"
chrono = "0.4.19"
clap = "2.33.3"
openssl = "0.10.38"
tempdir = "0.3.7"
tempfile = "3.3.0"
tracing-subscriber = "0.2.25"
8 changes: 3 additions & 5 deletions src/tuf/repository_helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ mod tests {
use super::super::constants::*;
use super::*;
use std::path::PathBuf;
use tempdir::TempDir;
use tempfile::TempDir;

/// Returns the path to our test data directory
fn test_data() -> PathBuf {
Expand Down Expand Up @@ -274,8 +274,7 @@ mod tests {

#[test]
fn download_files_to_local_cache() {
let cache_dir =
TempDir::new("sigstore-test-tuf-cache").expect("Cannot create temp cache dir");
let cache_dir = TempDir::new().expect("Cannot create temp cache dir");

let repository = local_tuf_repo().expect("Local TUF repo should not fail");
let helper = RepositoryHelper {
Expand Down Expand Up @@ -304,8 +303,7 @@ mod tests {

#[test]
fn update_local_cache() {
let cache_dir =
TempDir::new("sigstore-test-tuf-cache").expect("Cannot create temp cache dir");
let cache_dir = TempDir::new().expect("Cannot create temp cache dir");

// put some outdated files inside of the cache
fs::write(
Expand Down

0 comments on commit b0d5243

Please sign in to comment.