diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e99d10455..fd489626e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -30,7 +30,21 @@ updates: timezone: Australia/Brisbane open-pull-requests-limit: 99 - package-ecosystem: cargo - directory: "/kanidmd" + directory: "/kanidmd/idm" + schedule: + interval: weekly + time: "06:00" + timezone: Australia/Brisbane + open-pull-requests-limit: 99 + - package-ecosystem: cargo + directory: "/kanidmd/score" + schedule: + interval: weekly + time: "06:00" + timezone: Australia/Brisbane + open-pull-requests-limit: 99 + - package-ecosystem: cargo + directory: "/kanidmd/daemon" schedule: interval: weekly time: "06:00" @@ -43,12 +57,39 @@ updates: time: "06:00" timezone: Australia/Brisbane open-pull-requests-limit: 99 + - package-ecosystem: cargo + directory: "/kanidmd_web_ui" + schedule: + interval: weekly + time: "06:00" + timezone: Australia/Brisbane + open-pull-requests-limit: 99 - package-ecosystem: cargo directory: "/kanidm_unix_int" schedule: interval: weekly time: "06:00" timezone: Australia/Brisbane + - package-ecosystem: cargo + directory: "/kanidm_unix_int/nss_kanidm" + schedule: + interval: weekly + time: "06:00" + timezone: Australia/Brisbane + open-pull-requests-limit: 99 + - package-ecosystem: cargo + directory: "/kanidm_unix_int/pam_kanidm" + schedule: + interval: weekly + time: "06:00" + timezone: Australia/Brisbane + open-pull-requests-limit: 99 + - package-ecosystem: cargo + directory: "/kanidm_unix_int/pam_tester" + schedule: + interval: weekly + time: "06:00" + timezone: Australia/Brisbane open-pull-requests-limit: 99 - package-ecosystem: cargo directory: "/orca" @@ -57,3 +98,10 @@ updates: time: "06:00" timezone: Australia/Brisbane open-pull-requests-limit: 99 + - package-ecosystem: cargo + directory: "/profiles" + schedule: + interval: weekly + time: "06:00" + timezone: Australia/Brisbane + open-pull-requests-limit: 99 diff --git a/check_dependabot.sh b/check_dependabot.sh new file mode 100755 index 000000000..205149e80 --- /dev/null +++ b/check_dependabot.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# checks that all the cargo files are found in the dependabot config +# doesn't check that extras are there, dependabot will tell you +# typically here - https://github.com/kanidm/kanidm/network/updates + +DIRNAMES="$(find . -type f -name Cargo.toml | sed -E 's/^\.//' | xargs -n1 dirname)" + +for dirname in $DIRNAMES; do + echo "Checking for ${dirname}" + if [ "$(grep -c "\"${dirname}\"" .github/dependabot.yml)" -ne 1 ]; then + echo "Need to find this!" + else + echo "OK!" + fi +done diff --git a/kanidmd/score/tests/common.rs b/kanidmd/score/tests/common.rs index 331ed1ec2..502fda411 100644 --- a/kanidmd/score/tests/common.rs +++ b/kanidmd/score/tests/common.rs @@ -12,7 +12,7 @@ pub const ADMIN_TEST_USER: &str = "admin"; pub const ADMIN_TEST_PASSWORD: &str = "integration test admin password"; pub static PORT_ALLOC: AtomicU16 = AtomicU16::new(18080); -fn is_free_port(port: u16) -> bool { +pub fn is_free_port(port: u16) -> bool { // TODO: Refactor to use `Result::is_err` in a future PR match TcpStream::connect(("0.0.0.0", port)) { Ok(_) => false, @@ -21,6 +21,9 @@ fn is_free_port(port: u16) -> bool { } // Test external behaviours of the service. + +// allowed because the use of this function is behind a test gate +#[allow(dead_code)] pub async fn setup_async_test() -> KanidmClient { let _ = tracing_tree::test_init(); diff --git a/kanidmd/score/tests/https_middleware.rs b/kanidmd/score/tests/https_middleware.rs index fafe0d49d..ae659da35 100644 --- a/kanidmd/score/tests/https_middleware.rs +++ b/kanidmd/score/tests/https_middleware.rs @@ -1,4 +1,3 @@ -use std::net::TcpStream; use std::sync::atomic::Ordering; mod common; @@ -10,13 +9,7 @@ use kanidm::tracing_tree; use score::create_server_core; use tokio::task; -fn is_free_port(port: u16) -> bool { - // TODO: Refactor to use `Result::is_err` in a future PR - match TcpStream::connect(("0.0.0.0", port)) { - Ok(_) => false, - Err(_) => true, - } -} +use crate::common::is_free_port; #[tokio::test] async fn test_https_middleware_headers() {