Fix imports
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Rafael Caricio 2023-04-27 23:20:59 +02:00
parent 3860b4780d
commit 93be6f8559
Signed by: rafaelcaricio
GPG key ID: 3C86DBCE8E93C947
4 changed files with 14 additions and 5 deletions

View file

@ -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:

View file

@ -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)

View file

@ -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;

View file

@ -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";