diff --git a/.woodpecker.yml b/.woodpecker.yml index ece8e37..bf61145 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -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 @@ -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: diff --git a/fedimovies-models/src/database/mod.rs b/fedimovies-models/src/database/mod.rs index abfc49a..2b67ee1 100644 --- a/fedimovies-models/src/database/mod.rs +++ b/fedimovies-models/src/database/mod.rs @@ -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")] @@ -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) diff --git a/fedimovies-models/src/database/test_utils.rs b/fedimovies-models/src/database/test_utils.rs index 842f972..15f9714 100644 --- a/fedimovies-models/src/database/test_utils.rs +++ b/fedimovies-models/src/database/test_utils.rs @@ -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 = @@ -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; diff --git a/src/json_signatures/verify.rs b/src/json_signatures/verify.rs index c308b9f..0e9c72f 100644 --- a/src/json_signatures/verify.rs +++ b/src/json_signatures/verify.rs @@ -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";