adding some initial SSO providers, updating publish workflow
Some checks failed
CI / Rustfmt (push) Failing after 21s
CI / Cargo Audit & Deny (push) Failing after 33s
CI / Web Blocking Checks (push) Successful in 50s
CI / Security Blocking Checks (push) Successful in 7s
CI / Web Advisory Checks (push) Successful in 33s
CI / Security Advisory Checks (push) Successful in 34s
Publish Images And Chart / Resolve Publish Metadata (push) Successful in 1s
Publish Images And Chart / Publish init-packs (push) Failing after 11s
Publish Images And Chart / Publish init-user (push) Failing after 10s
Publish Images And Chart / Publish migrations (push) Failing after 11s
Publish Images And Chart / Publish sensor (push) Failing after 10s
Publish Images And Chart / Publish web (push) Failing after 10s
Publish Images And Chart / Publish worker (push) Failing after 10s
Publish Images And Chart / Publish api (push) Failing after 7s
Publish Images And Chart / Publish executor (push) Failing after 9s
Publish Images And Chart / Publish notifier (push) Failing after 10s
Publish Images And Chart / Publish Helm Chart (push) Has been skipped
CI / Clippy (push) Successful in 18m52s
CI / Tests (push) Has been cancelled
Some checks failed
CI / Rustfmt (push) Failing after 21s
CI / Cargo Audit & Deny (push) Failing after 33s
CI / Web Blocking Checks (push) Successful in 50s
CI / Security Blocking Checks (push) Successful in 7s
CI / Web Advisory Checks (push) Successful in 33s
CI / Security Advisory Checks (push) Successful in 34s
Publish Images And Chart / Resolve Publish Metadata (push) Successful in 1s
Publish Images And Chart / Publish init-packs (push) Failing after 11s
Publish Images And Chart / Publish init-user (push) Failing after 10s
Publish Images And Chart / Publish migrations (push) Failing after 11s
Publish Images And Chart / Publish sensor (push) Failing after 10s
Publish Images And Chart / Publish web (push) Failing after 10s
Publish Images And Chart / Publish worker (push) Failing after 10s
Publish Images And Chart / Publish api (push) Failing after 7s
Publish Images And Chart / Publish executor (push) Failing after 9s
Publish Images And Chart / Publish notifier (push) Failing after 10s
Publish Images And Chart / Publish Helm Chart (push) Has been skipped
CI / Clippy (push) Successful in 18m52s
CI / Tests (push) Has been cancelled
This commit is contained in:
@@ -70,6 +70,7 @@ use crate::dto::{
|
||||
// Authentication
|
||||
crate::routes::auth::auth_settings,
|
||||
crate::routes::auth::login,
|
||||
crate::routes::auth::ldap_login,
|
||||
crate::routes::auth::register,
|
||||
crate::routes::auth::refresh_token,
|
||||
crate::routes::auth::get_current_user,
|
||||
@@ -239,6 +240,7 @@ use crate::dto::{
|
||||
|
||||
// Auth DTOs
|
||||
LoginRequest,
|
||||
crate::routes::auth::LdapLoginRequest,
|
||||
RegisterRequest,
|
||||
RefreshTokenRequest,
|
||||
ChangePasswordRequest,
|
||||
@@ -453,4 +455,43 @@ mod tests {
|
||||
println!("Total API paths: {}", path_count);
|
||||
println!("Total API operations: {}", operation_count);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_auth_endpoints_registered() {
|
||||
let doc = ApiDoc::openapi();
|
||||
|
||||
let expected_auth_paths = vec![
|
||||
"/auth/settings",
|
||||
"/auth/login",
|
||||
"/auth/ldap/login",
|
||||
"/auth/register",
|
||||
"/auth/refresh",
|
||||
"/auth/me",
|
||||
"/auth/change-password",
|
||||
];
|
||||
|
||||
for path in &expected_auth_paths {
|
||||
assert!(
|
||||
doc.paths.paths.contains_key(*path),
|
||||
"Expected auth endpoint {} to be registered in OpenAPI spec, but it was missing. \
|
||||
Registered paths: {:?}",
|
||||
path,
|
||||
doc.paths.paths.keys().collect::<Vec<_>>()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_ldap_login_request_schema_registered() {
|
||||
let doc = ApiDoc::openapi();
|
||||
|
||||
let components = doc.components.as_ref().expect("components should exist");
|
||||
|
||||
assert!(
|
||||
components.schemas.contains_key("LdapLoginRequest"),
|
||||
"Expected LdapLoginRequest schema to be registered in OpenAPI components. \
|
||||
Registered schemas: {:?}",
|
||||
components.schemas.keys().collect::<Vec<_>>()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user