Skip to content

test: update test code coverage #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions postgresql_embedded/tests/blocking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@ use test_log::test;
#[test]
fn test_lifecycle() -> Result<()> {
let mut postgresql = PostgreSQL::default();
let settings = postgresql.settings();

if settings.installation_dir.exists() {
assert_eq!(Status::Installed, postgresql.status());
} else {
assert_eq!(Status::NotInstalled, postgresql.status());
}
let initial_statuses = [Status::NotInstalled, Status::Installed, Status::Stopped];
assert!(initial_statuses.contains(&postgresql.status()));

postgresql.setup()?;
assert_eq!(Status::Stopped, postgresql.status());
Expand Down
8 changes: 2 additions & 6 deletions postgresql_embedded/tests/postgresql.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,9 @@ use test_log::test;

async fn lifecycle() -> Result<()> {
let mut postgresql = PostgreSQL::default();
let settings = postgresql.settings();

if settings.installation_dir.exists() {
assert_eq!(Status::Installed, postgresql.status());
} else {
assert_eq!(Status::NotInstalled, postgresql.status());
}
let initial_statuses = [Status::NotInstalled, Status::Installed, Status::Stopped];
assert!(initial_statuses.contains(&postgresql.status()));

postgresql.setup().await?;
assert_eq!(Status::Stopped, postgresql.status());
Expand Down