diff options
| author | KunoiSayami <[email protected]> | 2026-02-09 21:50:12 +0800 |
|---|---|---|
| committer | KunoiSayami <[email protected]> | 2026-02-09 21:51:38 +0800 |
| commit | c708a63f7e5b9b22f8095ede0be56115eccbbac8 (patch) | |
| tree | 6235e5079206f48551815cc3cf8349d74a4aaa4f /src/test.rs | |
| parent | 735612ccfba150978d174fcc7d95b2ea3013ab9e (diff) | |
feat: Add configurable Redis URL (claude)
* feat: Add login rate limiting (claude)
* feat: Add SameSite cookie attribute (claude)
Signed-off-by: KunoiSayami <[email protected]>
Diffstat (limited to 'src/test.rs')
| -rw-r--r-- | src/test.rs | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/test.rs b/src/test.rs index a1d961b..7628921 100644 --- a/src/test.rs +++ b/src/test.rs @@ -55,7 +55,7 @@ mod core { } async fn async_test_redis() -> anyhow::Result<()> { - let redis_conn = redis::Client::open("redis://127.0.0.1/")?; + let redis_conn = redis::Client::open(crate::datastructures::DEFAULT_REDIS_URL)?; let mut conn = redis_conn.get_multiplexed_async_connection().await?; let s = rand_str(crate::datastructures::COOKIE_LENGTH); @@ -344,10 +344,14 @@ mod core { } async fn clear_redis_setting() -> anyhow::Result<()> { - let client = redis::Client::open("redis://127.0.0.1")?; + let client = redis::Client::open(crate::datastructures::DEFAULT_REDIS_URL)?; let mut conn = client.get_multiplexed_async_connection().await?; - for key in &["cgit_repo_test", "cgit_repo_repo"] { + for key in &[ + "cgit_repo_test", + "cgit_repo_repo", + "cgit_auth_failed_hunter2", + ] { conn.del::<_, i32>(*key).await?; } Ok(()) |
