Skip to content

Commit

Permalink
Reformatting tests/crud.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanMcCormickJr committed Dec 8, 2024
1 parent f9c3005 commit 88f89f1
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions tests/crud.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,14 @@ async fn test_database_initialization() {
}

let password: &str = pared_url.password().expect("Password not found in DATABASE_URL");

let host: &str = pared_url.host_str().expect("Host not found in DATABASE_URL");

let path: &str = pared_url.path().trim_start_matches("/");
if path.is_empty() {
panic!("Path (database name) not found in DATABASE_URL");
}

// Print out the components
println!("scheme: {}", scheme);
println!("username: {}", username);
println!("password: {}", password);
println!("host: {}", host);
println!("path: {}", path);

// Configure test database
let commands = [
{
Expand All @@ -76,7 +71,7 @@ async fn test_database_initialization() {
];

for cmd in commands {
let output = Command::new("sh")
let output: std::process::Output = Command::new("sh")
.arg("-c")
.arg(cmd)
.output()
Expand Down

0 comments on commit 88f89f1

Please sign in to comment.