mirror of
https://github.com/pnpm/pnpm.git
synced 2026-07-19 12:12:34 -04:00
fix(pnpr): pass MaxUsers to UserStore::in_memory in server tests
The server test helper still called UserStore::in_memory() with no arguments after in_memory gained a required MaxUsers parameter, breaking the pnpr lib-test build. This failed the Clippy, Dylint, and pnpr test jobs on main. Default the in-memory store to MaxUsers::Unlimited, matching how AuthState::in_memory constructs it.
This commit is contained in:
@@ -172,7 +172,10 @@ impl TokenBackend for OneToken {
|
||||
|
||||
fn app_with_token(tmp: &TempDir, raw: &str, record: TokenRecord) -> axum::Router {
|
||||
let tokens: Arc<dyn TokenBackend> = Arc::new(OneToken { raw: raw.to_string(), record });
|
||||
let auth = AuthState { users: Arc::new(UserStore::in_memory()), tokens };
|
||||
let auth = AuthState {
|
||||
users: Arc::new(UserStore::in_memory(crate::config::MaxUsers::Unlimited)),
|
||||
tokens,
|
||||
};
|
||||
let listen = SocketAddr::new(IpAddr::V4(Ipv4Addr::LOCALHOST), 0);
|
||||
router_with_auth(Config::static_serve(listen, tmp.path().to_path_buf()), auth)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user