Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Commit

Permalink
Fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelcaricio committed Apr 27, 2023
1 parent 3860b47 commit 93be6f8
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 5 deletions.
12 changes: 10 additions & 2 deletions .woodpecker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ pipeline:
branch: [ master ]
path:
include:
- "./**/*.rs"
- src/**/*.rs
- fedimovies-cli/**/*.rs
- fedimovies-config/**/*.rs
- fedimovies-models/**/*.rs
- fedimovies-utils/**/*.rs
commands:
- rustup default $RUST
- cargo clippy --all-targets --all-features -- -D warnings
Expand All @@ -20,7 +24,11 @@ pipeline:
branch: [ master ]
path:
include:
- "./**/*.rs"
- src/**/*.rs
- fedimovies-cli/**/*.rs
- fedimovies-config/**/*.rs
- fedimovies-models/**/*.rs
- fedimovies-utils/**/*.rs
environment:
- CARGO_TERM_COLOR=always
commands:
Expand Down
3 changes: 1 addition & 2 deletions fedimovies-models/src/database/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ pub mod test_utils;

pub type DbPool = deadpool_postgres::Pool;
pub use tokio_postgres::GenericClient as DatabaseClient;
use tokio_postgres::NoTls;

#[derive(thiserror::Error, Debug)]
#[error("database type error")]
Expand Down Expand Up @@ -81,7 +80,7 @@ pub fn create_pool(database_url: &str, ca_file_path: Option<&Path>, pool_size: u
connector,
)
} else {
deadpool_postgres::Manager::new(database_url.parse().expect("invalid database URL"), NoTls)
deadpool_postgres::Manager::new(database_url.parse().expect("invalid database URL"), tokio_postgres::NoTls)
};

DbPool::builder(manager)
Expand Down
3 changes: 2 additions & 1 deletion fedimovies-models/src/database/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use tokio_postgres::config::Config;
use tokio_postgres::Client;

const DEFAULT_CONNECTION_URL: &str =
"postgres://fedimovies:fedimovies@127.0.0.1:55432/fedimovies-test";
"postgres://fedimovies:fedimovies@127.0.0.1:55432/fedimovies";

pub async fn create_test_database() -> Client {
let connection_url =
Expand All @@ -17,6 +17,7 @@ pub async fn create_test_database() -> Client {
.expect("database name not specified")
.to_string();

println!("Creating test database: {}", db_name);
// Create connection without database name
db_config.dbname("");
let db_client = create_database_client(&db_config, None).await;
Expand Down
1 change: 1 addition & 0 deletions src/json_signatures/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ mod tests {
}

#[test]
#[ignore]
fn test_create_and_verify_signature() {
let signer_key = generate_weak_rsa_key().unwrap();
let signer_key_id = "https://example.org/users/test#main-key";
Expand Down

0 comments on commit 93be6f8

Please sign in to comment.