mirror of
https://git.asonix.dog/asonix/pict-rs
synced 2024-12-22 11:21:24 +00:00
Don't let the doctests step on each other via /tmp
This commit is contained in:
parent
e3183c923f
commit
d41fca5b6c
1 changed files with 12 additions and 5 deletions
17
src/lib.rs
17
src/lib.rs
|
@ -1868,7 +1868,8 @@ impl<P: AsRef<Path>, T: serde::Serialize> ConfigSource<P, T> {
|
||||||
/// fn main() -> Result<(), Box<dyn std::error::Error>> {
|
/// fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
/// let configuration = pict_rs::ConfigSource::memory(serde_json::json!({
|
/// let configuration = pict_rs::ConfigSource::memory(serde_json::json!({
|
||||||
/// "server": {
|
/// "server": {
|
||||||
/// "address": "127.0.0.1:8080"
|
/// "address": "127.0.0.1:8080",
|
||||||
|
/// "temporary_directory": "/tmp/t1"
|
||||||
/// },
|
/// },
|
||||||
/// "repo": {
|
/// "repo": {
|
||||||
/// "type": "sled",
|
/// "type": "sled",
|
||||||
|
@ -1945,13 +1946,16 @@ impl PictRsConfiguration {
|
||||||
/// #[tokio::main]
|
/// #[tokio::main]
|
||||||
/// async fn main() -> color_eyre::Result<()> {
|
/// async fn main() -> color_eyre::Result<()> {
|
||||||
/// let pict_rs_server = pict_rs::ConfigSource::memory(serde_json::json!({
|
/// let pict_rs_server = pict_rs::ConfigSource::memory(serde_json::json!({
|
||||||
|
/// "server": {
|
||||||
|
/// "temporary_directory": "/tmp/t2"
|
||||||
|
/// },
|
||||||
/// "repo": {
|
/// "repo": {
|
||||||
/// "type": "sled",
|
/// "type": "sled",
|
||||||
/// "path": "/tmp/pict-rs/run-on-localset/sled-repo",
|
/// "path": "/tmp/pict-rs-run-on-localset/sled-repo",
|
||||||
/// },
|
/// },
|
||||||
/// "store": {
|
/// "store": {
|
||||||
/// "type": "filesystem",
|
/// "type": "filesystem",
|
||||||
/// "path": "/tmp/pict-rs/run-on-localset/files",
|
/// "path": "/tmp/pict-rs-run-on-localset/files",
|
||||||
/// },
|
/// },
|
||||||
/// }))
|
/// }))
|
||||||
/// .init::<&str>(None)?
|
/// .init::<&str>(None)?
|
||||||
|
@ -1976,13 +1980,16 @@ impl PictRsConfiguration {
|
||||||
/// fn main() -> color_eyre::Result<()> {
|
/// fn main() -> color_eyre::Result<()> {
|
||||||
/// actix_web::rt::System::new().block_on(async move {
|
/// actix_web::rt::System::new().block_on(async move {
|
||||||
/// let pict_rs_server = pict_rs::ConfigSource::memory(serde_json::json!({
|
/// let pict_rs_server = pict_rs::ConfigSource::memory(serde_json::json!({
|
||||||
|
/// "server": {
|
||||||
|
/// "temporary_directory": "/tmp/t3"
|
||||||
|
/// },
|
||||||
/// "repo": {
|
/// "repo": {
|
||||||
/// "type": "sled",
|
/// "type": "sled",
|
||||||
/// "path": "/tmp/pict-rs/run/sled-repo",
|
/// "path": "/tmp/pict-rs-run/sled-repo",
|
||||||
/// },
|
/// },
|
||||||
/// "store": {
|
/// "store": {
|
||||||
/// "type": "filesystem",
|
/// "type": "filesystem",
|
||||||
/// "path": "/tmp/pict-rs/run/files",
|
/// "path": "/tmp/pict-rs-run/files",
|
||||||
/// },
|
/// },
|
||||||
/// }))
|
/// }))
|
||||||
/// .init::<&str>(None)?
|
/// .init::<&str>(None)?
|
||||||
|
|
Loading…
Reference in a new issue