mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 20:47:01 +01:00
wopsies, missing imports (#2023)
* wopsies, missing imports * more clippy and fmt * adding test build for kanidm with idv-tui feature * making codespell happy --------- Co-authored-by: James Hodgkinson <james@terminaloutcomes.com>
This commit is contained in:
parent
70b19f0630
commit
47e953bfd2
1
.github/workflows/rust_build.yml
vendored
1
.github/workflows/rust_build.yml
vendored
|
@ -36,4 +36,5 @@ jobs:
|
||||||
libsqlite3-dev
|
libsqlite3-dev
|
||||||
|
|
||||||
- run: cargo build --workspace
|
- run: cargo build --workspace
|
||||||
|
- run: cargo build --bin kanidm --features idv-tui
|
||||||
- run: cargo test
|
- run: cargo test
|
1
Makefile
1
Makefile
|
@ -138,6 +138,7 @@ codespell:
|
||||||
--skip='./book/book/*' \
|
--skip='./book/book/*' \
|
||||||
--skip='./book/src/images/*' \
|
--skip='./book/src/images/*' \
|
||||||
--skip='./docs/*,./.git' \
|
--skip='./docs/*,./.git' \
|
||||||
|
--skip='*.svg' \
|
||||||
--skip='./rlm_python/mods-available/eap' \
|
--skip='./rlm_python/mods-available/eap' \
|
||||||
--skip='./server/web_ui/static/external,./server/web_ui/pkg/external' \
|
--skip='./server/web_ui/static/external,./server/web_ui/pkg/external' \
|
||||||
--skip='./server/lib/src/constants/system_config.rs,./pykanidm/site,./server/lib/src/constants/*.json'
|
--skip='./server/lib/src/constants/system_config.rs,./pykanidm/site,./server/lib/src/constants/*.json'
|
||||||
|
|
|
@ -1795,8 +1795,8 @@ async fn test_repl_increment_domain_rename(server_a: &QueryServer, server_b: &Qu
|
||||||
|
|
||||||
// Add an entry to server_b. This should have it's spn regenerated after
|
// Add an entry to server_b. This should have it's spn regenerated after
|
||||||
// the domain rename is replicated.
|
// the domain rename is replicated.
|
||||||
// - satifies:
|
// - satisfies:
|
||||||
// Test domain rename where the reciever of the rename has added entries, and
|
// Test domain rename where the receiver of the rename has added entries, and
|
||||||
// they need spn regen to stabilise.
|
// they need spn regen to stabilise.
|
||||||
|
|
||||||
let mut server_b_txn = server_b.write(duration_from_epoch_now()).await;
|
let mut server_b_txn = server_b.write(duration_from_epoch_now()).await;
|
||||||
|
|
|
@ -830,7 +830,10 @@ pub trait QueryServerTransaction<'a> {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.map_err(|e| {
|
.map_err(|e| {
|
||||||
admin_error!(?e, "Failed to retrieve authsession_expiry from system configuration");
|
admin_error!(
|
||||||
|
?e,
|
||||||
|
"Failed to retrieve authsession_expiry from system configuration"
|
||||||
|
);
|
||||||
e
|
e
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -845,7 +848,10 @@ pub trait QueryServerTransaction<'a> {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.map_err(|e| {
|
.map_err(|e| {
|
||||||
admin_error!(?e, "Failed to retrieve privilege_expiry from system configuration");
|
admin_error!(
|
||||||
|
?e,
|
||||||
|
"Failed to retrieve privilege_expiry from system configuration"
|
||||||
|
);
|
||||||
e
|
e
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -1472,8 +1472,8 @@ async fn test_authsession_expiry(rsclient: KanidmClient) {
|
||||||
.system_authsession_expiry_set(authsession_expiry)
|
.system_authsession_expiry_set(authsession_expiry)
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let ans = rsclient.system_authsession_expiry_get().await.unwrap();
|
let result = rsclient.system_authsession_expiry_get().await.unwrap();
|
||||||
assert_eq!(authsession_expiry, ans);
|
assert_eq!(authsession_expiry, result);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[kanidmd_testkit::test]
|
#[kanidmd_testkit::test]
|
||||||
|
@ -1488,6 +1488,6 @@ async fn test_privilege_expiry(rsclient: KanidmClient) {
|
||||||
.system_auth_privilege_expiry_set(authsession_expiry)
|
.system_auth_privilege_expiry_set(authsession_expiry)
|
||||||
.await
|
.await
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let ans = rsclient.system_auth_privilege_expiry_get().await.unwrap();
|
let result = rsclient.system_auth_privilege_expiry_get().await.unwrap();
|
||||||
assert_eq!(authsession_expiry, ans);
|
assert_eq!(authsession_expiry, result);
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,6 +13,10 @@ use tokio::sync::{
|
||||||
oneshot::{self, Receiver},
|
oneshot::{self, Receiver},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
use crate::{
|
||||||
|
CODE_FAILURE_ERROR_MESSAGE, IDENTITY_UNAVAILABLE_ERROR_MESSAGE, INVALID_STATE_ERROR_MESSAGE,
|
||||||
|
INVALID_USER_ID_ERROR_MESSAGE,
|
||||||
|
};
|
||||||
// here I used a simple function instead of a struct because all the channel stuff requires ownership, so if we were to use a struct with a `run` method, it would have to take ownership of everything
|
// here I used a simple function instead of a struct because all the channel stuff requires ownership, so if we were to use a struct with a `run` method, it would have to take ownership of everything
|
||||||
// so might as well just use a function
|
// so might as well just use a function
|
||||||
pub async fn run_identity_verification_tui(self_id: &str, client: KanidmClient) {
|
pub async fn run_identity_verification_tui(self_id: &str, client: KanidmClient) {
|
||||||
|
|
|
@ -230,10 +230,10 @@ mod identify_user_no_tui {
|
||||||
println!("Exiting...");
|
println!("Exiting...");
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(super) async fn run_identity_verification_no_tui<'a>(
|
pub(super) async fn run_identity_verification_no_tui(
|
||||||
mut state: IdentifyUserState,
|
mut state: IdentifyUserState,
|
||||||
client: KanidmClient,
|
client: KanidmClient,
|
||||||
self_id: &'a str,
|
self_id: &str,
|
||||||
mut other_id: Option<String>,
|
mut other_id: Option<String>,
|
||||||
) {
|
) {
|
||||||
loop {
|
loop {
|
||||||
|
|
Loading…
Reference in a new issue