Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 98e6df9

Browse filesBrowse files
committed
test: correct extract test implementations
1 parent f43280f commit 98e6df9
Copy full SHA for 98e6df9

File tree

Expand file treeCollapse file tree

3 files changed

+3
-6
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+3
-6
lines changed

‎postgresql_archive/tests/archive.rs

Copy file name to clipboardExpand all lines: postgresql_archive/tests/archive.rs
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use postgresql_archive::configuration::theseus;
22
use postgresql_archive::extract;
33
use postgresql_archive::{get_archive, get_version};
44
use semver::VersionReq;
5-
use std::fs::{create_dir_all, remove_dir_all};
5+
use std::fs::remove_dir_all;
66
use test_log::test;
77

88
#[test(tokio::test)]
@@ -32,7 +32,6 @@ async fn test_get_archive_and_extract() -> anyhow::Result<()> {
3232
assert!(version_req.matches(&archive_version));
3333

3434
let out_dir = tempfile::tempdir()?.path().to_path_buf();
35-
create_dir_all(&out_dir)?;
3635
extract(url, &archive, &out_dir).await?;
3736
remove_dir_all(&out_dir)?;
3837
Ok(())

‎postgresql_archive/tests/blocking.rs

Copy file name to clipboardExpand all lines: postgresql_archive/tests/blocking.rs
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use postgresql_archive::configuration::theseus;
55
#[cfg(feature = "blocking")]
66
use postgresql_archive::VersionReq;
77
#[cfg(feature = "blocking")]
8-
use std::fs::{create_dir_all, remove_dir_all};
8+
use std::fs::remove_dir_all;
99
#[cfg(feature = "blocking")]
1010
use test_log::test;
1111

@@ -30,7 +30,6 @@ fn test_get_archive_and_extract() -> anyhow::Result<()> {
3030
assert!(version_req.matches(&archive_version));
3131

3232
let out_dir = tempfile::tempdir()?.path().to_path_buf();
33-
create_dir_all(&out_dir)?;
3433
extract(url, &archive, &out_dir)?;
3534
remove_dir_all(&out_dir)?;
3635
Ok(())

‎postgresql_archive/tests/zonky.rs

Copy file name to clipboardExpand all lines: postgresql_archive/tests/zonky.rs
+1-2Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use postgresql_archive::configuration::zonky;
22
use postgresql_archive::extract;
33
use postgresql_archive::{get_archive, get_version};
44
use semver::VersionReq;
5-
use std::fs::{create_dir_all, remove_dir_all};
5+
use std::fs::remove_dir_all;
66
use test_log::test;
77

88
#[test(tokio::test)]
@@ -32,7 +32,6 @@ async fn test_get_archive_and_extract() -> anyhow::Result<()> {
3232
assert!(version_req.matches(&archive_version));
3333

3434
let out_dir = tempfile::tempdir()?.path().to_path_buf();
35-
create_dir_all(&out_dir)?;
3635
extract(url, &archive, &out_dir).await?;
3736
remove_dir_all(&out_dir)?;
3837
Ok(())

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.