Skip to content

Commit

Permalink
Use tmpfs in database container (#3360)
Browse files Browse the repository at this point in the history
  • Loading branch information
divergentdave authored Aug 8, 2024
1 parent 99626c4 commit 613d16d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion aggregator_core/src/datastore/test_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use std::{
thread::JoinHandle,
time::Duration,
};
use testcontainers::{runners::AsyncRunner, ContainerRequest, ImageExt};
use testcontainers::{core::Mount, runners::AsyncRunner, ContainerRequest, ImageExt};
use tokio::{
io::{AsyncBufRead, AsyncBufReadExt},
join, spawn,
Expand Down Expand Up @@ -85,6 +85,7 @@ impl EphemeralDatabase {
// Start an instance of Postgres running in a container.
let db_container = ContainerRequest::from(Postgres::default())
.with_cmd(Self::postgres_configuration(&configuration))
.with_mount(Mount::tmpfs_mount("/var/lib/postgresql/data"))
.start()
.await
.unwrap();
Expand Down

0 comments on commit 613d16d

Please sign in to comment.