Yak shaving 2343443 (#779)

This commit is contained in:
James Hodgkinson 2022-05-26 14:58:53 +10:00 committed by GitHub
parent e0ebd322dd
commit b6d3a0511f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 70 additions and 10 deletions

View file

@ -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

16
check_dependabot.sh Executable file
View file

@ -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

View file

@ -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();

View file

@ -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() {