brewlog/Cargo.toml
copilot-swe-agent[bot] c91dd5d78d
test(auth): add CLI test for revoked tokens and server tests for session auth
- Add test_revoked_token_cannot_be_used to CLI tests
- Add test_session_authentication_via_login to verify session cookies work
- Add test_invalid_session_cookie_fails to verify unauthenticated requests fail
- Add test_logout_invalidates_session to verify logout clears sessions
- Add test_fake_session_cookie_fails to verify forged cookies don't work
- Enable cookies feature for reqwest in dev-dependencies

All 70 tests pass (8 unit + 46 server + 16 CLI) 

Co-authored-by: jnsgruk <668505+jnsgruk@users.noreply.github.com>
2025-11-25 16:28:49 +00:00

60 lines
1.3 KiB
TOML

[package]
name = "brewlog"
version = "0.1.0"
edition = "2024"
[features]
default = ["sqlite"]
sqlite = ["sqlx/sqlite"]
postgres = ["sqlx/postgres"]
[dependencies]
anyhow = "1.0"
argon2 = "0.5"
async-trait = "0.1"
axum = { version = "0.7", features = ["macros"] }
askama = "0.12"
base64 = "0.22"
block-id = "0.2.1"
chrono = { version = "0.4", features = ["serde", "clock"] }
clap = { version = "4.5", features = ["derive", "env"] }
reqwest = { version = "0.12", features = ["json", "rustls-tls"] }
rpassword = "7.3"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
once_cell = "1.19"
rand = "0.8"
sha2 = "0.10"
sqlx = { version = "0.7", default-features = false, features = [
"runtime-tokio",
"macros",
"chrono",
"any",
"migrate",
] }
thiserror = "1.0"
tokio = { version = "1.38", features = ["rt-multi-thread", "macros", "signal"] }
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
tower = "0.4"
tower-cookies = "0.10"
[dev-dependencies]
portpicker = "0.1"
reqwest = { version = "0.12", features = ["blocking", "cookies"] }
tempfile = "3.8"
wiremock = "0.6"
[[test]]
name = "cli"
path = "tests/cli/main.rs"
harness = true
[profile.test]
# Run CLI tests serially to share single server instance
opt-level = 0
[[test]]
name = "server"
path = "tests/server/main.rs"
harness = true