mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 16:55:46 +00:00
update dependencies (#4639)
## Issue Addressed updates underlying dependencies and removes the ignored `RUSTSEC`'s for `cargo audit`. Also switches `procinfo` to `procfs` on `eth2` to remove the `nom` warning, `procinfo` is unmaintained see [here](https://github.com/danburkert/procinfo-rs/issues/46).
This commit is contained in:
@@ -41,6 +41,7 @@ tokio-postgres = "0.7.5"
|
||||
http_api = { path = "../beacon_node/http_api" }
|
||||
beacon_chain = { path = "../beacon_node/beacon_chain" }
|
||||
network = { path = "../beacon_node/network" }
|
||||
testcontainers = "0.14.0"
|
||||
# TODO: update to 0.15 when released: https://github.com/testcontainers/testcontainers-rs/issues/497
|
||||
testcontainers = { git = "https://github.com/testcontainers/testcontainers-rs/", rev = "0f2c9851" }
|
||||
unused_port = { path = "../common/unused_port" }
|
||||
task_executor = { path = "../common/task_executor" }
|
||||
|
||||
@@ -23,6 +23,7 @@ use watch::{
|
||||
};
|
||||
|
||||
use log::error;
|
||||
use std::collections::HashMap;
|
||||
use std::env;
|
||||
use std::net::SocketAddr;
|
||||
use std::time::Duration;
|
||||
@@ -30,7 +31,42 @@ use tokio::{runtime, task::JoinHandle};
|
||||
use tokio_postgres::{config::Config as PostgresConfig, Client, NoTls};
|
||||
use unused_port::unused_tcp4_port;
|
||||
|
||||
use testcontainers::{clients::Cli, images::postgres::Postgres, RunnableImage};
|
||||
use testcontainers::{clients::Cli, core::WaitFor, Image, RunnableImage};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Postgres(HashMap<String, String>);
|
||||
|
||||
impl Default for Postgres {
|
||||
fn default() -> Self {
|
||||
let mut env_vars = HashMap::new();
|
||||
env_vars.insert("POSTGRES_DB".to_owned(), "postgres".to_owned());
|
||||
env_vars.insert("POSTGRES_HOST_AUTH_METHOD".into(), "trust".into());
|
||||
|
||||
Self(env_vars)
|
||||
}
|
||||
}
|
||||
|
||||
impl Image for Postgres {
|
||||
type Args = ();
|
||||
|
||||
fn name(&self) -> String {
|
||||
"postgres".to_owned()
|
||||
}
|
||||
|
||||
fn tag(&self) -> String {
|
||||
"11-alpine".to_owned()
|
||||
}
|
||||
|
||||
fn ready_conditions(&self) -> Vec<WaitFor> {
|
||||
vec![WaitFor::message_on_stderr(
|
||||
"database system is ready to accept connections",
|
||||
)]
|
||||
}
|
||||
|
||||
fn env_vars(&self) -> Box<dyn Iterator<Item = (&String, &String)> + '_> {
|
||||
Box::new(self.0.iter())
|
||||
}
|
||||
}
|
||||
|
||||
type E = MainnetEthSpec;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user