Skip to content

Commit 3c7cef3

Browse files
committed
tests: Use real-world cdn_prefix value
1 parent 02556b5 commit 3c7cef3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/storage.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ type StdPath = std::path::Path;
3535
#[derive(Debug)]
3636
pub struct StorageConfig {
3737
backend: StorageBackend,
38-
cdn_prefix: Option<String>,
38+
pub cdn_prefix: Option<String>,
3939
}
4040

4141
#[derive(Debug)]

src/tests/util/test_app.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,14 +380,17 @@ fn simple_config() -> config::Server {
380380
dl_only_at_percentage: 80,
381381
};
382382

383+
let mut storage = StorageConfig::in_memory();
384+
storage.cdn_prefix = Some("static.crates.io".to_string());
385+
383386
config::Server {
384387
base,
385388
ip: [127, 0, 0, 1].into(),
386389
port: 8888,
387390
max_blocking_threads: None,
388391
use_nginx_wrapper: false,
389392
db,
390-
storage: StorageConfig::in_memory(),
393+
storage,
391394
session_key: cookie::Key::derive_from("test this has to be over 32 bytes long".as_bytes()),
392395
gh_client_id: ClientId::new(dotenvy::var("GH_CLIENT_ID").unwrap_or_default()),
393396
gh_client_secret: ClientSecret::new(dotenvy::var("GH_CLIENT_SECRET").unwrap_or_default()),

0 commit comments

Comments
 (0)